Module Expr Str Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign NameStore Num FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Expr Call NameLoad NameLoad Str NameLoad Return decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr Return decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str If CompareNotIn NameLoad AttributeLoad NameLoad attr body If CompareEq NameLoad Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse If CompareEq NameLoad Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse If CompareEq NameLoad Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse If CompareEq NameLoad Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body TryExcept body Assign NameStore Call NameLoad Call AttributeLoad Call AttributeLoad Str attr AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Return Assign NameStore Call AttributeLoad Str attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad AttributeLoad NameLoad attr attr body If CompareNotEq Call AttributeLoad Call AttributeLoad NameLoad attr attr Str body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr name NameStore body If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr Call NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str Call NameLoad NameLoad Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareEq AttributeLoad AttributeLoad NameLoad attr attr Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Return decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Return decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIn AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr body Delete SubscriptDel AttributeLoad AttributeLoad NameLoad attr attr Index AttributeLoad NameLoad attr For NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareEq Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore NameLoad attr BinOpAdd Call AttributeLoad NameLoad attr Num Return decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr If CompareIs AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr TupleLoad Str Num Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr BinOpAdd Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Return decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr orelse Assign AttributeStore NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Return decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad GeneratorExp CompareGt Call NameLoad AttributeLoad NameLoad attr Num comprehension NameStore Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListComp NameLoad comprehension NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr If CompareEq Call NameLoad NameLoad Num body Return Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad GeneratorExp Call NameLoad AttributeLoad NameLoad attr comprehension NameStore NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body If CompareEq Call NameLoad AttributeLoad NameLoad attr Num body Continue Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num If UnaryOpNot AttributeLoad AttributeLoad NameLoad attr attr body Continue TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Assign TupleStore NameStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr If CompareGt BinOpSub NameLoad NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str BinOpSub NameLoad NameLoad Return Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str BinOpSub NameLoad NameLoad Return decorator_list FunctionDef arguments args NameParam defaults body Expr Str AugAssignAdd AttributeStore NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str TupleLoad Call NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str If CompareNotIn NameLoad AttributeLoad NameLoad attr body If CompareEq NameLoad Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse If CompareEq NameLoad Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse If CompareEq NameLoad Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse If CompareEq NameLoad Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Expr Str If CompareEq Call AttributeLoad NameLoad attr Str body Assign NameStore Str If CompareIn NameLoad AttributeLoad NameLoad attr body Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body If Call NameLoad GeneratorExp AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type TupleLoad NameLoad NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad Call NameLoad NameLoad Return decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body If BoolOpAnd CompareEq Call NameLoad AttributeLoad NameLoad attr Num CompareIsNot AttributeLoad NameLoad attr NameLoad CompareLt AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Expr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Delete SubscriptDel AttributeLoad NameLoad attr Index NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareGt Call NameLoad NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str Call NameLoad NameLoad Return decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Dict Assign NameStore ListLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str For NameStore NameLoad body Assign TupleStore NameStore NameStore NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Expr Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad body For NameStore NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If CompareNotIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str BinOpSub Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr For TupleStore NameStore NameStore NameLoad body If BoolOpAnd CompareIn NameLoad AttributeLoad NameLoad attr BoolOpOr Call NameLoad GeneratorExp AttributeLoad NameLoad attr comprehension NameStore Call AttributeLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr attr CompareGt Call NameLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Num body Continue Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str TryExcept body Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr NameLoad If BoolOpOr CompareGt NameLoad NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Num If BoolOpAnd CompareGtE AttributeLoad NameLoad attr NameLoad UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr keyword NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad name NameStore body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad Call NameLoad NameLoad ExceptHandler type TupleLoad NameLoad NameLoad name NameStore body If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str BinOpSub Call AttributeLoad NameLoad attr NameLoad Return decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Assign TupleStore NameStore NameStore NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num NameLoad AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index SubscriptLoad NameLoad Index Num NameLoad decorator_list decorator_list
N/A N/A 
The heart of the asimap server process to handle a single user's
mailbox for multiple IMAP clients.

We get all of our data relayed to us from the main asimapd server via
connections on localhost.
 N/A sys N/A socket N/A asyncore N/A asynchat N/A logging N/A os N/A os.path N/A pwd N/A mailbox N/A time N/A errno N/A random N/A asimap N/A asimap.parse N/A asimap.mbox N/A asimap.message_cache asimap.client Authenticated asimap.db Database asimap.exceptions MailboxLock MailboxInconsistency N/A module_logger N/A N/A logging getLogger N/A asimap.%s __name__ N/A BACKLOG 5 set_user_server_program N/A N/A prg N/A N/A N/A 
    Sets the 'USER_SERVER_PROGRAM' attribute on this module (so other modules
    will known how to launch the user server.)

    Arguments:
    - `prg`: An absolute path to the user server program.
     N/A module N/A N/A sys modules N/A __name__ N/A N/A setattr module USER_SERVER_PROGRAM prg N/A N/A IMAPUserClientHandler N/A N/A asynchat async_chat N/A N/A 
    This class receives messages from the main server process.

    These messages are recevied by the main server process from an IMAP client
    and it has sent them on to us to process.

    All of the messages we receive will be for an IMAP client that has
    successfully authenticated with the main server.

    The messages will be in the form of a decimal ascii integer followed by a
    new line that represents the length of the entire IMAP message we are being
    sent.

    After that will be the IMAP message (of the pre-indicated length.)

    To send messages back to the IMAP client we follow the same protocol.
     N/A LINE_TERMINATOR __init__ N/A N/A self sock rem_address port server options N/A N/A N/A N/A N/A N/A N/A asynchat async_chat __init__ self sock sock N/A N/A self log N/A N/A logging getLogger N/A %s.%s N/A __name__ N/A N/A self __class__ __name__ N/A N/A self reading_message False N/A N/A self ibuffer N/A N/A N/A N/A self set_terminator N/A self LINE_TERMINATOR N/A N/A self port port N/A N/A self rem_addr rem_address N/A N/A self server server N/A N/A self options options N/A N/A self cmd_processor N/A Authenticated self N/A self server N/A N/A log_string N/A N/A self N/A N/A N/A 
        A bit of DRY: format the username/remote address/port as a string
         N/A N/A from %s:%d N/A N/A self rem_addr N/A self port N/A log_info N/A N/A self message type N/A info N/A N/A 
        Replace the log_info method with one that uses our stderr logger
        instead of trying to write to stdout.

        Arguments:
        - `message`: The message to log
        - `type`: Type of message to log.. maps to 'info','error',etc on the
                  logger object.
         N/A N/A type N/A self ignore_log_types N/A N/A N/A type info N/A N/A N/A N/A N/A self log info message N/A N/A N/A type error N/A N/A N/A N/A N/A self log error message N/A N/A N/A type warning N/A N/A N/A N/A N/A self log warning message N/A N/A N/A type debug N/A N/A N/A N/A N/A self log debug message N/A N/A N/A N/A N/A self log info message N/A collect_incoming_data N/A N/A self data N/A N/A N/A 
        Buffer data read from the connect for later processing.
         N/A N/A N/A N/A self ibuffer append data N/A N/A found_terminator N/A N/A self N/A N/A N/A 
        We have come across a message terminator from the IMAP client talking
        to us.

        This is invoked in two different states:

        1) we have hit LINE_TERMINATOR and we were waiting for it.  At this
           point the buffer should contain an integer as an ascii string. This
           integer is the length of the actual message.

        2) We are reading the message itself.. we read the appropriate number
           of bytes from the channel.

        If (2) then we exit the state where we are reading the IMAP message
        from the channel and set the terminator back to LINE_TERMINATOR so that
        we can read the rest of the message from the IMAP client.
         N/A N/A N/A self reading_message N/A N/A N/A N/A msg_length N/A int N/A N/A N/A N/A join N/A self ibuffer strip N/A N/A self ibuffer N/A N/A N/A self reading_message True N/A N/A N/A self set_terminator msg_length N/A N/A N/A ValueError N/A e N/A N/A N/A N/A N/A self log error N/A found_terminator(): %s expected an int, got: '%s' N/A N/A N/A self log_string N/A N/A join N/A self ibuffer N/A N/A imap_msg N/A N/A join N/A self ibuffer N/A N/A self ibuffer N/A N/A N/A self reading_message False N/A N/A N/A self set_terminator N/A self LINE_TERMINATOR N/A N/A N/A self cmd_processor idling N/A N/A N/A N/A N/A N/A N/A imap_msg lower strip done N/A N/A N/A N/A self push N/A * BAD Expected 'DONE' not: %s
 imap_msg N/A N/A N/A N/A N/A self cmd_processor do_done None N/A N/A N/A N/A imap_cmd N/A N/A N/A asimap parse IMAPClientCommand imap_msg N/A N/A N/A imap_cmd parse N/A N/A N/A N/A N/A asimap parse BadCommand N/A e N/A N/A N/A N/A imap_cmd tag None N/A N/A N/A N/A self push N/A %s BAD %s
 N/A N/A imap_cmd tag N/A str e N/A N/A N/A N/A self push N/A * BAD %s
 N/A str e N/A N/A N/A N/A N/A self cmd_processor command imap_cmd N/A N/A N/A N/A self cmd_processor state logged_out N/A N/A N/A N/A N/A self log info N/A Client %s has logged out of the subprocess N/A N/A self log_string N/A N/A N/A self cleanup N/A N/A N/A self socket None N/A N/A N/A N/A self close N/A N/A handle_close N/A N/A self N/A N/A N/A 
        Huh. The main server process severed its connection with us. That is a
        bit strange, but, I guess it crashed or something.
         N/A N/A N/A N/A self log info main server closed its connection with us. N/A N/A N/A self cleanup N/A N/A N/A self socket None N/A N/A N/A N/A self close N/A N/A cleanup N/A N/A self N/A N/A N/A 
        This cleans up various references and resources held open by this
        client.

        The code was collected here because it is called when a client logs out
        or when the main server closes the connection to us.
         N/A N/A N/A self port N/A N/A self server clients N/A N/A N/A N/A N/A self server clients N/A N/A self port N/A mbox N/A N/A N/A N/A self server active_mailboxes itervalues N/A N/A N/A N/A mbox unselected N/A self cmd_processor N/A N/A N/A len N/A N/A self server clients 0 N/A N/A N/A N/A N/A self log debug cleanup(): Server has no clients, starting timeout clock N/A N/A self expiry N/A N/A N/A time time 1800 N/A N/A N/A IMAPUserServer N/A N/A asyncore dispatcher N/A N/A 
    Listen on a port on localhost for connections from the
    asimapd. When we get one create an IMAPUserClientHandler object that
    gets the new connection (and handles all further IMAP related
    communications with the client.)
     __init__ N/A N/A self options maildir N/A N/A N/A 
        Setup our dispatcher.. listen on a port we are supposed to accept
        connections on. When something connects to it create an
        IMAPClientHandler and pass it the socket.

        Arguments:
        - `options` : The options set on the command line
        - `maildir` : The directory our mailspool and database are in
         N/A N/A self options options N/A N/A N/A N/A asyncore dispatcher __init__ self N/A N/A self log N/A N/A logging getLogger N/A %s.%s N/A __name__ N/A N/A self __class__ __name__ N/A N/A N/A N/A self options standalone_mode False N/A N/A N/A N/A self create_socket N/A socket AF_INET N/A socket SOCK_STREAM N/A N/A N/A self set_reuse_addr N/A N/A N/A self bind N/A 127.0.0.1 0 N/A N/A self address N/A N/A N/A self socket getsockname N/A N/A N/A self listen BACKLOG N/A N/A self maildir maildir N/A N/A self mailbox N/A N/A mailbox MH N/A self maildir create True N/A N/A self uid_vv 0 N/A N/A self db N/A Database maildir N/A N/A self active_mailboxes N/A N/A N/A self clients N/A N/A N/A self msg_cache N/A N/A N/A asimap message_cache MessageCache N/A N/A self expiry N/A N/A N/A time time 1800 N/A N/A N/A self _restore_from_db N/A N/A _restore_from_db N/A N/A self N/A N/A N/A 
        Restores any user server persistent state we may have in the db.
        If there is none saved yet then we save a bunch of default values.
         N/A c N/A N/A N/A self db cursor N/A N/A N/A c execute select uid_vv from user_server order by id desc limit 1 N/A results N/A N/A c fetchone N/A N/A results None N/A N/A N/A N/A c execute insert into user_server (uid_vv) values (?) N/A str N/A self uid_vv N/A N/A N/A c close N/A N/A N/A N/A self db commit N/A N/A N/A self uid_vv N/A int N/A results N/A 0 N/A N/A N/A c close N/A N/A has_queued_commands N/A N/A self N/A N/A N/A 
        Returns True if any active mailbox has queued commands.
         N/A N/A any N/A N/A N/A len N/A x command_queue 0 N/A x N/A N/A N/A self active_mailboxes itervalues N/A process_queued_commands N/A N/A self N/A N/A N/A 
        See if any active mailboxes have queued commands that still need to be
        processed and let them run if they do.
         N/A mboxes N/A x N/A x N/A N/A N/A self active_mailboxes values N/A N/A x has_queued_commands N/A N/A N/A len mboxes 0 N/A N/A N/A start_time N/A N/A time time N/A num_queued_cmds N/A sum N/A N/A len N/A x command_queue N/A x mboxes N/A N/A N/A N/A self log debug N/A process_queued_command: ** START Number of queued commands: %d num_queued_cmds N/A N/A N/A random shuffle mboxes N/A mbox mboxes N/A N/A N/A N/A len N/A mbox command_queue 0 N/A N/A N/A N/A N/A N/A self log debug N/A process_queued_command:    mbox: %s - commands in queue: %d N/A N/A mbox name N/A len N/A mbox command_queue N/A N/A client imap_cmd N/A N/A N/A mbox command_queue pop 0 N/A N/A N/A N/A client client connected N/A N/A N/A N/A N/A N/A N/A N/A self log debug N/A process_queued_command mbox: %s, client: %s, cmd: %s N/A N/A mbox name N/A client name N/A str imap_cmd N/A N/A N/A client command imap_cmd N/A N/A N/A Exception N/A N/A N/A nil t v tbinfo N/A N/A asyncore compact_traceback N/A N/A N/A N/A self log error N/A Exception handling queued command: %s:%s %s N/A t v tbinfo N/A now N/A N/A time time N/A N/A N/A now start_time 5 N/A N/A N/A N/A N/A self log debug N/A process_queued_command: ** Running for %f seconds. Will run more commands later N/A now start_time N/A N/A now N/A N/A time time N/A N/A N/A N/A self log debug N/A process_queued_command: ** Finished all queued commands. Took %f seconds N/A now start_time N/A N/A get_next_uid_vv N/A N/A self N/A N/A N/A 
        Return the next uid_vv. Also update the underlying database
        so that its uid_vv state remains up to date.
         N/A N/A self uid_vv 1 N/A c N/A N/A N/A self db cursor N/A N/A N/A c execute update user_server set uid_vv = ? N/A N/A str N/A self uid_vv N/A N/A N/A c close N/A N/A N/A N/A self db commit N/A N/A self uid_vv N/A log_info N/A N/A self message type N/A info N/A N/A 
        Replace the log_info method with one that uses our stderr logger
        instead of trying to write to stdout.

        Arguments:
        - `message`:
        - `type`:
         N/A N/A type N/A self ignore_log_types N/A N/A N/A type info N/A N/A N/A N/A N/A self log info message N/A N/A N/A type error N/A N/A N/A N/A N/A self log error message N/A N/A N/A type warning N/A N/A N/A N/A N/A self log warning message N/A N/A N/A type debug N/A N/A N/A N/A N/A self log debug message N/A N/A N/A N/A N/A self log info message N/A N/A get_mailbox N/A N/A self name expiry N/A 900 N/A N/A 
        A factory of sorts.. if we have an active mailbox with the given name
        return it.

        If we do not instantiate an instance of that mailbox and add it to our
        list of active mailboxes.

        Arguments:
        - `name`: The name of the mailbox our caller wants.
        - `expiry`: If we have to instantiate a mailbox give it this expiry
          time. Used so that boxes that are just being updated rarely expire
          and do not take up excess memory in the server. Defaults to 15
          minutes.
         N/A N/A N/A N/A name lower inbox N/A N/A name inbox N/A N/A name N/A self active_mailboxes N/A N/A N/A N/A self active_mailboxes N/A name N/A mbox N/A N/A N/A asimap mbox Mailbox name self expiry expiry N/A N/A N/A self active_mailboxes N/A name mbox N/A mbox N/A check_all_active_folders N/A N/A self N/A N/A N/A 
        Like 'check_all_folders' except this only checks folders that are
        active and have clients in IDLE listening to them.
         N/A N/A name mbox N/A N/A N/A self active_mailboxes iteritems N/A N/A N/A any N/A N/A x idling N/A x N/A N/A N/A mbox clients itervalues N/A N/A N/A N/A N/A N/A N/A self log debug N/A check_all_active: checking '%s' name N/A N/A N/A mbox resync N/A N/A N/A N/A MailboxLock MailboxInconsistency N/A e N/A N/A N/A N/A N/A self log warn N/A check-all-active: skipping '%s' due to: %s N/A name N/A str e N/A N/A expire_inactive_folders N/A N/A self N/A N/A N/A 
        Go through the list of active mailboxes and if any of them are around
        past their expiry time, expire time.
         N/A expired N/A N/A N/A mbox_name mbox N/A N/A N/A self active_mailboxes iteritems N/A N/A N/A N/A N/A len N/A mbox clients 0 N/A N/A mbox expiry None N/A N/A mbox expiry N/A N/A time time N/A N/A N/A N/A expired append mbox_name N/A mbox_name expired N/A N/A N/A N/A N/A N/A self active_mailboxes N/A mbox_name commit_to_db N/A N/A N/A self active_mailboxes N/A mbox_name N/A N/A N/A N/A self msg_cache clear_mbox mbox_name N/A N/A N/A len expired 0 N/A N/A N/A N/A N/A self log debug N/A expire_inactive_folders: Expired %d folders N/A len expired N/A N/A find_all_folders N/A N/A self N/A N/A N/A 
        compare the list of folders on disk with the list of known folders in
        our database.

        For every folder found on disk that does not exist in the database
        create an entry for it.
         N/A start_time N/A N/A time time N/A N/A N/A N/A self log debug find_all_folders: STARTING N/A extant_mboxes N/A N/A mboxes_to_create N/A N/A c N/A N/A N/A self db cursor N/A N/A N/A c execute select name, mtime from mailboxes order by name N/A row c N/A N/A N/A name mtime row N/A N/A extant_mboxes N/A name mtime N/A N/A N/A c close N/A N/A root dirs files N/A N/A os walk . followlinks True N/A N/A d dirs N/A N/A dirname N/A N/A N/A os path normpath N/A N/A N/A os path join root d N/A N/A dirname extant_mboxes N/A N/A N/A N/A mboxes_to_create append dirname N/A mbox_name mboxes_to_create N/A N/A N/A N/A N/A self log debug N/A Creating mailbox %s mbox_name N/A N/A N/A self get_mailbox mbox_name expiry 0 N/A N/A N/A N/A self log debug N/A find_all_folders: FINISHED. Took %f seconds N/A N/A N/A time time start_time N/A check_all_folders N/A N/A self force N/A False N/A N/A 
        This goes through all of the folders and sees if any of the mtimes we
        have on disk disagree with the mtimes we have in the database.

        If they do we then do a resync of that folder.

        If the folder is an active folder it may cause messages to be generated
        and sent to clients that are watching it in some way.

        The folder's \Marked and \Unmarked attributes maybe set in the process
        of this run.

        - `force` : If True this will force a full resync on all
                    mailbox regardless of their mtimes.
         N/A start_time N/A N/A time time N/A N/A N/A N/A self log debug check_all_folders begun N/A mboxes N/A N/A c N/A N/A N/A self db cursor N/A N/A N/A c execute select name, mtime from mailboxes where attributes not like '%%ignored%%' order by name N/A row c N/A N/A N/A N/A mboxes append row N/A N/A N/A c close N/A N/A mbox_name mtime mboxes N/A N/A N/A N/A mbox_name N/A self active_mailboxes N/A N/A any N/A N/A x idling N/A x N/A N/A N/A N/A N/A self active_mailboxes N/A mbox_name clients itervalues N/A N/A len N/A N/A N/A self active_mailboxes N/A mbox_name command_queue 0 N/A N/A N/A path N/A N/A N/A os path join N/A N/A self mailbox _path mbox_name N/A seq_path N/A N/A N/A os path join path .mh_sequences N/A N/A N/A fmtime N/A N/A N/A N/A asimap mbox Mailbox get_actual_mtime N/A self mailbox mbox_name N/A N/A N/A fmtime mtime force N/A N/A N/A N/A N/A self log debug N/A check_all_folders: doing resync on '%s' stored mtime: %d, actual mtime: %d N/A mbox_name mtime fmtime N/A m N/A N/A self get_mailbox mbox_name 30 N/A N/A N/A N/A m mtime fmtime N/A force N/A N/A N/A N/A m commit_to_db N/A N/A N/A N/A m resync force force N/A N/A N/A N/A MailboxLock MailboxInconsistency N/A e N/A N/A N/A N/A N/A self log warn N/A check_all_folders: skipping '%s' due to: %s N/A mbox_name N/A str e N/A N/A N/A OSError IOError N/A e N/A N/A N/A N/A e errno N/A errno ENOENT N/A N/A N/A N/A N/A self log error N/A check_all_folders: One of %s or %s does not exist for mtime check N/A path seq_path N/A N/A N/A N/A self log debug N/A check_all_folders finished, Took %f seconds N/A N/A N/A time time start_time N/A N/A handle_accept N/A N/A self N/A N/A N/A 
        A client has connected to us. Create the IMAPClientHandler object to
        handle that client and let it deal with it.
         N/A pair N/A N/A self accept N/A N/A pair None N/A N/A N/A sock addr pair N/A N/A N/A N/A self log info N/A Incoming connection from %s:%d addr N/A N/A self expiry None N/A handler N/A IMAPUserClientHandler sock N/A addr N/A 0 N/A addr N/A 1 self N/A self options N/A N/A N/A self clients N/A N/A addr N/A 1 handler N/A N/A