Net-IMAP-Server

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    unauth_idle
        How long, in seconds, to wait before disconnecting idle connections
        which have not authenticated yet. The default is 5 minutes; set to
        zero to disable (which is not advised).

    auth_idle
        How long, in seconds, to wait before disconnecting authenticated
        connections. By RFC specification, this must be longer than 30
        minutes. The default is an hour; set to zero to disable.

    server_cert
        Path to the SSL certificate that the server should use. This can be
        either a relative or absolute path.

    server_key
        Path to the SSL certificate key that the server should use. This can
        be either a relative or absolute path.

    It also accepts the following Net::Server arguments -- see its
    documentation for details on their use.

    "log_level" in Net::Server
    "log_file" in Net::Server
    "syslog_logsock" in Net::Server
    "syslog_ident" in Net::Server
    "syslog_logopt" in Net::Server
    "syslog_facility" in Net::Server
    "pid_file" in Net::Server
    "chroot" in Net::Server
    "user" in Net::Server
    "group" in Net::Server
    "reverse_lookups" in Net::Server
    "allow" in Net::Server
    "deny" in Net::Server
    "cidr_allow" in Net::Server
    "cidr_deny" in Net::Server

  run
    Starts the server; this method shouldn't be expected to return. Within
    this method, $Net::IMAP::Server::Server is set to the object that this
    was called on; thus, all IMAP objects have a way of referring to the
    server -- and though "connection", whatever parts of the IMAP internals
    they need.

    Any arguments are passed through to "run" in Net::Server.

  process_request
    Accepts a client connection; this method is needed for the Net::Server
    infrastructure.

  DESTROY
    On destruction, ensure that we close all client connections and
    listening sockets.

  connections
    Returns an arrayref of Net::IMAP::Server::Connection objects which are
    currently connected to the server.

  connection
    Returns the currently active Net::IMAP::Server::Connection object, if
    there is one. This is determined by examining the current coroutine.

  concurrent_mailbox_connections [MAILBOX]
    This can be called as either a class method or an instance method; it
    returns the set of connections which are concurrently connected to the
    given mailbox object (which defaults to the current connection's
    selected mailbox)

  concurrent_user_connections [USER]
    This can be called as either a class method or an instance method; it
    returns the set of connections whose "user" in
    Net::IMAP::Server::DefaultAuth is the same as the given USER (which
    defaults to the current connection's user)

  capability
    Returns the "CAPABILITY" string for the server. This string my be
    modified by the connection before being sent to the client (see
    "capability" in Net::IMAP::Server::Connection).

  id
    Returns a hash of properties to be conveyed to the client, should they
    ask the server's identity.

  add_command NAME => PACKAGE
    Adds the given command "NAME" to the server's list of known commands.
    "PACKAGE" should be the name of a class which inherits from
    Net::IMAP::Server::Command.

  log SEVERITY, MESSAGE
    By default, defers to "log" in Net::Server, which outputs to syslog, a
    logfile, or STDERR, depending how it was configured. Net::Server's
    default is to print to STDERR. If you have custom logging needs,
    override this method, or "write_to_log_hook" in Net::Server.

Object model
    An ASCII model of the relationship between objects is below. In it,
    single lines represent scalar values, and lines made of other characters
    denote array references or relations.

       +----------------------------------------------+
       |                                              |
       |                    Server                    |
       |                                              |
       +1-----2---------------------------------------+
        #     |      ^         ^            ^        ^
        #     |      |         |            |        |
        #     v      |         |            |        |
        #   +--------1-------+ |     +------1------+ |
        ###>|   Connection   |<------2   Command   | |
        #   +--4-----3------2+ |     +-------------+ |
      ,-#------'     |      `--------------.         |
      | #            v         |           v         |
      | #   +----------------+ |     +-------------+ |
      | #   |     Model      2------>|    Auth     | |
      | #   +--------1-------+ |     +-------------+ |
      | #            `---------------------------------.
      | #                      |                     | |
      | #                  ,---'                 ,---' |
      | #   +--------------1-+       +-----------1-+   |
      | ###>|   Connection   |<------2   Command   |   |
      |     +--4-5---3------2+       +-------------+   |



( run in 0.615 second using v1.01-cache-2.11-cpan-39bf76dae61 )