Module Expr Str Import alias Import alias Import alias alias ImportFrom alias ImportFrom alias alias alias ImportFrom alias alias alias alias ImportFrom alias alias alias alias ImportFrom alias Assign NameStore Str Assign NameStore Str Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Assign NameStore Dict TryExcept body If Call NameLoad NameLoad NameLoad body Assign SubscriptStore NameLoad Index SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num orelse Assign SubscriptStore NameLoad Index Str SubscriptLoad SubscriptLoad NameLoad Index Num Index Str If SubscriptLoad SubscriptLoad NameLoad Index Num Index Str body For TupleStore NameStore NameStore Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str attr body If CompareIn NameLoad ListLoad Str Str Str Str Str body Assign SubscriptStore NameLoad Index NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Pass ExceptHandler type NameLoad name NameStore body Pass Print Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str TryExcept body Return Call NameLoad NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body If Call NameLoad AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad AttributeLoad NameLoad attr orelse Expr Call NameLoad Dict Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call NameLoad Lambda arguments args defaults Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Lambda arguments args defaults Call AttributeLoad AttributeLoad NameLoad attr attr If CompareIs NameLoad NameLoad body Return Str orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Return CompareGt BinOpSub Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str body Expr Call NameLoad SubscriptLoad NameLoad Index Num BinOpAdd NameLoad NameLoad Return TupleLoad Str NameLoad orelse Return Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num If UnaryOpNot Call NameLoad NameLoad body Expr Call NameLoad NameLoad BinOpAdd NameLoad NameLoad Return TupleLoad Str NameLoad orelse Expr Call NameLoad NameLoad BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str NameLoad Assign NameStore SubscriptLoad NameLoad Index Num Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr Return TupleLoad Str TupleLoad NameLoad NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad NameLoad If NameLoad body Print Str SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str If BoolOpOr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad NameLoad BinOpAdd Str NameLoad Return TupleLoad Str NameLoad orelse Expr Call NameLoad NameLoad BinOpAdd NameLoad NameLoad Return TupleLoad Str NameLoad decorator_list Return Call NameLoad NameLoad NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore Call NameLoad NameLoad If NameLoad body Print Str SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad NameLoad If BoolOpOr CompareIs NameLoad NameLoad UnaryOpNot Call NameLoad NameLoad body Expr Call NameLoad NameLoad BinOpAdd NameLoad NameLoad Return TupleLoad Str NameLoad orelse Expr Call NameLoad NameLoad BinOpAdd Str NameLoad Assign NameStore SubscriptLoad NameLoad Index Num Assign SubscriptStore NameLoad Index Str NameLoad Return TupleLoad Str TupleLoad NameLoad NameLoad orelse Expr Call NameLoad NameLoad BinOpAdd NameLoad NameLoad Return TupleLoad Str NameLoad decorator_list Return Call NameLoad NameLoad NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore ListLoad Assign NameStore NameLoad While Num body Assign NameStore Call NameLoad NameLoad If NameLoad body Print Str SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str If Call NameLoad SubscriptLoad NameLoad Index Str body Assign NameStore NameLoad Break orelse If Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad NameLoad If BoolOpOr CompareIs NameLoad NameLoad UnaryOpNot Call NameLoad NameLoad body Assign NameStore NameLoad Break orelse If CompareNotIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad NameLoad BinOpAdd Str NameLoad orelse If Call AttributeLoad NameLoad attr NameLoad body Break orelse Assign NameStore NameLoad Break Assign NameStore Call NameLoad Lambda arguments args NameParam defaults CompareEq Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num attr NameLoad NameLoad Assign NameStore Call NameLoad Call NameLoad Lambda arguments args NameParam defaults Call AttributeLoad SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num attr NameLoad If CompareIs NameLoad NameLoad body Expr Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore NameLoad If BoolOpOr NameLoad CompareEq Call NameLoad NameLoad Num body Expr Call NameLoad NameLoad BinOpAdd NameLoad NameLoad Return TupleLoad Str NameLoad orelse Assign SubscriptStore NameLoad Index Str NameLoad Assign SubscriptStore NameLoad Index Str NameLoad Return TupleLoad Str TupleLoad NameLoad NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num Expr Call NameLoad NameLoad BinOpAdd Str NameLoad Assign NameStore ListLoad Assign NameStore NameLoad Assign NameStore NameLoad While Num body Assign NameStore Call NameLoad NameLoad If Call NameLoad SubscriptLoad NameLoad Index Str body Assign NameStore NameLoad Break orelse If Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr body Break orelse Expr Call AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body If Call AttributeLoad NameLoad attr NameLoad body TryExcept body Assign NameStore Call AttributeLoad SubscriptLoad Call NameLoad Lambda arguments args NameParam defaults CompareNotEq NameLoad Str Call AttributeLoad NameLoad attr NameLoad NameLoad Index Num attr Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad If UnaryOpNot Call NameLoad NameLoad body Assign NameStore NameLoad Break handlers ExceptHandler type NameLoad body Pass If BoolOpOr NameLoad CompareEq Call NameLoad NameLoad Num body Expr Call NameLoad NameLoad BinOpAdd NameLoad NameLoad Return TupleLoad Str NameLoad orelse Expr Call NameLoad NameLoad BinOpAdd Str NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad Str attr NameLoad Return TupleLoad Str TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call NameLoad SubscriptLoad NameLoad Index Num Return TupleLoad Str NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad keyword Num Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr TupleLoad NameLoad Dict handlers ExceptHandler type NameLoad name NameStore body Assign NameStore Dict Str AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str SubscriptLoad AttributeLoad NameLoad attr Index Num Assign AttributeStore NameLoad attr TupleLoad NameLoad Raise decorator_list decorator_list FunctionDef arguments args defaults body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call NameLoad AttributeLoad NameLoad attr decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A 

The custom smtp server: respond to all incoming email based on its inbox address

 N/A re N/A time N/A socket SocketServer statemachine StateMachine anti_spam valid_ip_address valid_subject block_ip_address config domain_logo smtp_server_domain smtp_server_port smtp_server_debug utils.email_utils valid_email_address get_email_address domain_recipients_valid get_base_subject smtp_processor process_email N/A cr_lf N/A bad_request 550 No such user N/A idle_threshold 600.0 N/A recipient_domain N/A N/A domain_logo lower printException N/A N/A ex_args N/A N/A N/A data N/A N/A N/A N/A N/A isinstance ex_args tuple N/A N/A N/A data N/A N/A ex_args N/A 0 N/A ex_args N/A 1 N/A N/A N/A data N/A state N/A N/A ex_args N/A 0 N/A state N/A N/A N/A ex_args N/A 0 N/A data N/A N/A N/A k v N/A N/A N/A N/A ex_args N/A 0 N/A data items N/A N/A N/A k N/A ip start sender recipients subject N/A N/A N/A data N/A k v N/A N/A N/A IndexError N/A i N/A N/A N/A N/A KeyError N/A k N/A N/A N/A Exception: N/A N/A time strftime %a, %d %b %Y %H:%M:%S +0000 N/A N/A time gmtime data N/A with_stream N/A N/A fn N/A args N/A N/A A higher-order function to attempt stream functions, trapping any socket errors which may occur N/A N/A N/A N/A fn args N/A N/A N/A N/A socket error N/A e N/A N/A N/A isinstance N/A e args tuple N/A N/A N/A printException N/A e args N/A N/A N/A printException N/A Socket error e N/A with_stream_write N/A N/A st s N/A N/A N/A Write the given string (s) to the stream (st) N/A N/A with_stream N/A N/A N/A N/A N/A N/A N/A st wfile write s N/A with_stream_read N/A N/A st N/A N/A N/A Read a line from the given stream (st) N/A data N/A with_stream N/A N/A N/A N/A N/A N/A N/A st rfile readline N/A N/A data None N/A N/A N/A N/A data N/A client_is_idle N/A N/A start_time threshold N/A idle_threshold N/A N/A Has this client taken longer than allowed by idle_threshold? N/A N/A N/A N/A N/A time time start_time threshold N/A as_timed_client N/A N/A cargo fn N/A N/A N/A Enforce the idle_threshold condition here:
    stop the client with a bad request reply and close the connection if idle_threshold has been exceeded;
    else proceed with the given function N/A N/A client_is_idle N/A N/A cargo N/A 1 N/A start N/A N/A N/A with_stream_write N/A cargo N/A 0 N/A bad_request cr_lf N/A N/A done cargo N/A N/A N/A fn N/A greeting N/A N/A cargo N/A N/A N/A stream N/A cargo N/A 0 N/A ip N/A N/A stream client_address N/A 0 N/A N/A N/A valid_ip_address ip N/A N/A N/A with_stream_write stream N/A bad_request cr_lf N/A N/A done cargo N/A N/A N/A with_stream_write stream N/A N/A N/A 220  domain_logo  SMTP cr_lf N/A email_data N/A cargo N/A 1 N/A N/A email_data N/A ip ip N/A N/A email_data N/A start N/A N/A time time N/A N/A helo N/A stream email_data N/A N/A helo_pattern N/A N/A re compile ^HELO N/A re IGNORECASE N/A ehlo_pattern N/A N/A re compile ^EHLO N/A re IGNORECASE helo N/A N/A cargo N/A N/A _helo N/A N/A N/A N/A N/A stream N/A cargo N/A 0 N/A client_msg N/A with_stream_read stream N/A smtp_server_debug N/A N/A Debug: N/A N/A cargo N/A 1 N/A ip N/A N/A time strftime %a, %d %b %Y %H:%M:%S +0000 N/A N/A time gmtime N/A N/A client_msg rstrip N/A N/A N/A N/A helo_pattern search client_msg N/A N/A ehlo_pattern search client_msg N/A N/A N/A with_stream_write stream N/A 250 Hello cr_lf N/A N/A mail cargo N/A N/A N/A with_stream_write stream N/A bad_request cr_lf N/A N/A done cargo N/A N/A N/A as_timed_client cargo _helo N/A N/A mail_pattern N/A N/A re compile ^MAIL N/A re IGNORECASE mail N/A N/A cargo N/A N/A _mail N/A N/A N/A N/A N/A stream N/A cargo N/A 0 N/A client_msg N/A with_stream_read stream N/A smtp_server_debug N/A N/A Debug: N/A N/A cargo N/A 1 N/A ip N/A N/A time strftime %a, %d %b %Y %H:%M:%S +0000 N/A N/A time gmtime N/A N/A client_msg rstrip N/A N/A N/A mail_pattern search client_msg N/A N/A sender N/A get_email_address client_msg N/A N/A N/A sender None N/A N/A valid_email_address sender N/A N/A N/A with_stream_write stream N/A bad_request cr_lf N/A N/A done cargo N/A N/A N/A with_stream_write stream N/A 250 Ok cr_lf N/A email_data N/A cargo N/A 1 N/A N/A email_data N/A sender sender N/A N/A rcpt N/A stream email_data N/A N/A N/A with_stream_write stream N/A bad_request cr_lf N/A N/A done cargo N/A N/A N/A as_timed_client cargo _mail N/A N/A rcpt_pattern N/A N/A re compile ^RCPT N/A re IGNORECASE N/A data_pattern N/A N/A re compile ^DATA N/A re IGNORECASE rcpt N/A N/A cargo N/A N/A N/A stream N/A cargo N/A 0 N/A email_data N/A cargo N/A 1 N/A recipients N/A N/A client_error False N/A 1 N/A N/A client_msg N/A with_stream_read stream N/A smtp_server_debug N/A N/A Debug: N/A N/A cargo N/A 1 N/A ip N/A N/A time strftime %a, %d %b %Y %H:%M:%S +0000 N/A N/A time gmtime N/A N/A client_msg rstrip N/A N/A client_is_idle N/A email_data N/A start N/A N/A client_error True N/A N/A N/A N/A N/A rcpt_pattern search client_msg N/A N/A recipient N/A get_email_address client_msg N/A N/A N/A recipient None N/A N/A valid_email_address recipient N/A N/A client_error True N/A N/A N/A N/A recipient recipients N/A N/A N/A N/A recipients append recipient N/A N/A with_stream_write stream N/A 250 Ok cr_lf N/A N/A N/A N/A data_pattern search client_msg N/A N/A N/A N/A client_error True N/A N/A server_recipients N/A filter N/A N/A N/A x N/A N/A N/A N/A N/A N/A N/A x split @ N/A 1 lower recipient_domain recipients N/A inbox N/A domain_recipients_valid N/A map N/A N/A N/A x N/A N/A N/A N/A N/A N/A x split @ N/A 0 lower server_recipients N/A N/A inbox None N/A N/A N/A block_ip_address N/A email_data N/A ip N/A client_error True N/A N/A client_error N/A N/A len server_recipients 0 N/A N/A N/A with_stream_write stream N/A bad_request cr_lf N/A N/A done cargo N/A N/A N/A email_data N/A inbox inbox N/A N/A email_data N/A recipients recipients N/A N/A data N/A stream email_data N/A N/A end_pattern N/A N/A re compile ^.$ N/A subject_pattern N/A N/A re compile ^Subject:  N/A re IGNORECASE data N/A N/A cargo N/A N/A N/A stream N/A cargo N/A 0 N/A email_data N/A cargo N/A 1 N/A N/A with_stream_write stream N/A 354 End data with \r\n.\r\n cr_lf N/A contents N/A N/A client_error False N/A subject None N/A 1 N/A N/A client_msg N/A with_stream_read stream N/A N/A client_is_idle N/A email_data N/A start N/A N/A client_error True N/A N/A N/A N/A N/A end_pattern search N/A N/A client_msg rstrip N/A N/A N/A N/A N/A N/A contents append client_msg N/A N/A subject None N/A N/A N/A N/A subject_pattern search client_msg N/A N/A N/A N/A subject N/A N/A N/A N/A filter N/A N/A N/A x N/A N/A x N/A N/A re split subject_pattern client_msg N/A 0 lstrip N/A N/A email_data N/A subject N/A get_base_subject subject N/A N/A N/A valid_subject subject N/A N/A client_error True N/A N/A N/A N/A IndexError N/A N/A N/A N/A client_error N/A N/A len contents 0 N/A N/A N/A with_stream_write stream N/A bad_request cr_lf N/A N/A done cargo N/A N/A N/A with_stream_write stream N/A 250 Ok: queued cr_lf N/A N/A email_data N/A contents N/A N/A join contents N/A N/A process N/A stream email_data N/A process N/A N/A cargo N/A N/A N/A N/A process_email N/A cargo N/A 1 N/A N/A done cargo N/A SMTPRequestHandler N/A N/A SocketServer StreamRequestHandler N/A handle N/A N/A self N/A N/A N/A m N/A StateMachine N/A N/A N/A N/A N/A m add_state greeting greeting N/A N/A N/A m add_state helo helo N/A N/A N/A m add_state mail mail N/A N/A N/A m add_state rcpt rcpt N/A N/A N/A m add_state data data N/A N/A N/A m add_state process process N/A N/A N/A m add_state done None end_state 1 N/A N/A N/A m set_start greeting N/A N/A N/A m run N/A self N/A N/A N/A N/A Exception N/A e N/A N/A exception_data N/A state N/A m current_state N/A N/A m current_cargo N/A N/A N/A exception_data N/A data N/A N/A m current_cargo N/A 1 N/A N/A e args N/A exception_data N/A N/A N/A start N/A N/A N/A N/A N/A N/A N/A tcpserver N/A N/A SocketServer ThreadingTCPServer N/A smtp_server_domain smtp_server_port SMTPRequestHandler N/A N/A N/A N/A tcpserver socket settimeout idle_threshold N/A N/A N/A tcpserver serve_forever N/A N/A N/A Exception N/A e N/A N/A N/A printException N/A e args N/A N/A N/A __name__ __main__ N/A N/A N/A start