{"id":19648585,"url":"https://github.com/bestpractical/net-imap-server","last_synced_at":"2025-04-28T16:30:28.433Z","repository":{"id":550200,"uuid":"180537","full_name":"bestpractical/net-imap-server","owner":"bestpractical","description":null,"archived":false,"fork":false,"pushed_at":"2016-05-01T08:01:48.000Z","size":668,"stargazers_count":11,"open_issues_count":2,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T09:25:23.889Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://search.cpan.org/dist/net-imap-server","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bestpractical.png","metadata":{"files":{"readme":"README","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2009-04-20T04:32:37.000Z","updated_at":"2019-08-16T17:23:30.000Z","dependencies_parsed_at":"2022-08-03T03:46:22.901Z","dependency_job_id":null,"html_url":"https://github.com/bestpractical/net-imap-server","commit_stats":null,"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestpractical%2Fnet-imap-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestpractical%2Fnet-imap-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestpractical%2Fnet-imap-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bestpractical%2Fnet-imap-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bestpractical","download_url":"https://codeload.github.com/bestpractical/net-imap-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251345726,"owners_count":21574765,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T14:49:07.159Z","updated_at":"2025-04-28T16:30:27.869Z","avatar_url":"https://github.com/bestpractical.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"NAME\n    Net::IMAP::Server - A single-threaded multiplexing IMAP server\n    implementation, using Net::Server::Coro.\n\nSYNOPSIS\n      use Net::IMAP::Server;\n      Net::IMAP::Server-\u003enew(\n          port        =\u003e 193,\n          ssl_port    =\u003e 993,\n          auth_class  =\u003e \"Your::Auth::Class\",\n          model_class =\u003e \"Your::Model::Class\",\n          user        =\u003e \"nobody\",\n          group       =\u003e \"nobody\",\n      )-\u003erun;\n\nDESCRIPTION\n    This model provides a complete implementation of the \"RFC 3501\"\n    specification, along with several IMAP4rev1 extensions. It provides\n    separation of the mailbox and message store from the client interaction\n    loop.\n\n    Note that, following RFC suggestions, login is not allowed except under\n    either SSL or TLS. Thus, you are required to have a certs/ directory\n    under the current working directory, containing files server-cert.pem\n    and \"server-key.pem\". Failure to do so will cause the server to fail to\n    start. Note that if the default paths suit your needs, you can specify\n    different ones using the \"server_cert\" and \"server_key\" arguments to\n    \"new\".\n\nINTERFACE\n    The primary method of using this module is to supply your own model and\n    auth classes, which inherit from Net::IMAP::Server::DefaultModel and\n    Net::IMAP::Server::DefaultAuth. This allows you to back your messages\n    from arbitrary data sources, or provide your own authorization backend.\n    For the most part, the implementation of the IMAP components should be\n    opaque.\n\nMETHODS\n  new PARAMHASH\n    Creates a new IMAP server object. This doesn't even bind to the sockets;\n    it merely initializes the object. It will \"die\" if it cannot find the\n    appropriate certificate files. Valid arguments to \"new\" include:\n\n    port\n        The port to bind to. Defaults to port 1430.\n\n    ssl_port\n        The port to open an SSL listener on; by default, this is disabled,\n        and any true value enables it.\n\n    auth_class\n        The name of the class which implements authentication. This must be\n        a subclass of Net::IMAP::Server::DefaultAuth.\n\n    model_class\n        The name of the class which implements the model backend. This must\n        be a subclass of Net::IMAP::Server::DefaultModel.\n\n    connection_class\n        On rare occasions, you may wish to subclass the connection class;\n        this class must be a subclass of Net::IMAP::Server::Connection.\n\n    poll_every\n        How often the current mailbox should be polled, in seconds; defaults\n        to 0, which means it will be polled after every client command.\n\n    unauth_commands\n        The number of commands before unauthenticated users are\n        disconnected. The default is 10; set to zero to disable.\n\n    unauth_idle\n        How long, in seconds, to wait before disconnecting idle connections\n        which have not authenticated yet. The default is 5 minutes; set to\n        zero to disable (which is not advised).\n\n    auth_idle\n        How long, in seconds, to wait before disconnecting authenticated\n        connections. By RFC specification, this must be longer than 30\n        minutes. The default is an hour; set to zero to disable.\n\n    server_cert\n        Path to the SSL certificate that the server should use. This can be\n        either a relative or absolute path.\n\n    server_key\n        Path to the SSL certificate key that the server should use. This can\n        be either a relative or absolute path.\n\n    It also accepts the following Net::Server arguments -- see its\n    documentation for details on their use.\n\n    \"log_level\" in Net::Server\n    \"log_file\" in Net::Server\n    \"syslog_logsock\" in Net::Server\n    \"syslog_ident\" in Net::Server\n    \"syslog_logopt\" in Net::Server\n    \"syslog_facility\" in Net::Server\n    \"pid_file\" in Net::Server\n    \"chroot\" in Net::Server\n    \"user\" in Net::Server\n    \"group\" in Net::Server\n    \"reverse_lookups\" in Net::Server\n    \"allow\" in Net::Server\n    \"deny\" in Net::Server\n    \"cidr_allow\" in Net::Server\n    \"cidr_deny\" in Net::Server\n\n  run\n    Starts the server; this method shouldn't be expected to return. Within\n    this method, $Net::IMAP::Server::Server is set to the object that this\n    was called on; thus, all IMAP objects have a way of referring to the\n    server -- and though \"connection\", whatever parts of the IMAP internals\n    they need.\n\n    Any arguments are passed through to \"run\" in Net::Server.\n\n  process_request\n    Accepts a client connection; this method is needed for the Net::Server\n    infrastructure.\n\n  DESTROY\n    On destruction, ensure that we close all client connections and\n    listening sockets.\n\n  connections\n    Returns an arrayref of Net::IMAP::Server::Connection objects which are\n    currently connected to the server.\n\n  connection\n    Returns the currently active Net::IMAP::Server::Connection object, if\n    there is one. This is determined by examining the current coroutine.\n\n  concurrent_mailbox_connections [MAILBOX]\n    This can be called as either a class method or an instance method; it\n    returns the set of connections which are concurrently connected to the\n    given mailbox object (which defaults to the current connection's\n    selected mailbox)\n\n  concurrent_user_connections [USER]\n    This can be called as either a class method or an instance method; it\n    returns the set of connections whose \"user\" in\n    Net::IMAP::Server::DefaultAuth is the same as the given USER (which\n    defaults to the current connection's user)\n\n  capability\n    Returns the \"CAPABILITY\" string for the server. This string my be\n    modified by the connection before being sent to the client (see\n    \"capability\" in Net::IMAP::Server::Connection).\n\n  id\n    Returns a hash of properties to be conveyed to the client, should they\n    ask the server's identity.\n\n  add_command NAME =\u003e PACKAGE\n    Adds the given command \"NAME\" to the server's list of known commands.\n    \"PACKAGE\" should be the name of a class which inherits from\n    Net::IMAP::Server::Command.\n\n  log SEVERITY, MESSAGE\n    By default, defers to \"log\" in Net::Server, which outputs to syslog, a\n    logfile, or STDERR, depending how it was configured. Net::Server's\n    default is to print to STDERR. If you have custom logging needs,\n    override this method, or \"write_to_log_hook\" in Net::Server.\n\nObject model\n    An ASCII model of the relationship between objects is below. In it,\n    single lines represent scalar values, and lines made of other characters\n    denote array references or relations.\n\n       +----------------------------------------------+\n       |                                              |\n       |                    Server                    |\n       |                                              |\n       +1-----2---------------------------------------+\n        #     |      ^         ^            ^        ^\n        #     |      |         |            |        |\n        #     v      |         |            |        |\n        #   +--------1-------+ |     +------1------+ |\n        ###\u003e|   Connection   |\u003c------2   Command   | |\n        #   +--4-----3------2+ |     +-------------+ |\n      ,-#------'     |      `--------------.         |\n      | #            v         |           v         |\n      | #   +----------------+ |     +-------------+ |\n      | #   |     Model      2------\u003e|    Auth     | |\n      | #   +--------1-------+ |     +-------------+ |\n      | #            `---------------------------------.\n      | #                      |                     | |\n      | #                  ,---'                 ,---' |\n      | #   +--------------1-+       +-----------1-+   |\n      | ###\u003e|   Connection   |\u003c------2   Command   |   |\n      |     +--4-5---3------2+       +-------------+   |\n      | ,------' *   |      `--------------.           |\n      | | ********   v                     v           |\n      | | * +----------------+       +-------------+   |\n      | | * |     Model      2------\u003e|    Auth     |   |\n      | | * +--------1-------+       +-------------+   |\n      | | *          |                                 |\n      | | *          |  ,------------------------------'\n      | | *          |  |           ^ SERVER\n     .|.|.*..........|..|................................\n      | | *          |  |           v MODEL\n      | | *          v  v\n      | '-*----\u003e+-------------+\u003c------------.\n      '---*----\u003e|   Mailbox   |\u003c----------. |\n          *     +-1------2-3--+\u003c----.     | |\n          *       @   ^  $ %        |     | |\n          *       @   |  $$$$\u003e+-----1---+ | |\n          *       @   |  $ %  |         | | |\n          *       @   |  $ %%\u003e| Message | | |\n          *       @   |  $ %  |         | | |\n          ********@***|******\u003e+---------+ | |\n          *       @   |  $ %              | |\n          *       @   |  $$$$\u003e+---------+ | |\n          *       @   |    %  |         | | |\n          *       @   |    %%\u003e| Message 1-' |\n          *       @   |       |         |   |\n          ********@***|******\u003e+---------+   |\n          *       @   |                     |\n          *       @   |       +---------+   |\n          *       @   |       | Message 1---'\n          ********@***|******\u003e+---------+\n                  @   |\n                  @  +4----------+\n                  @@\u003e|  Mailbox  |\n                     +-----------+\n\n    The top half consists of the parts which implement the IMAP protocol\n    itself; the bottom contains the models for the backing store. Note that,\n    for the most part, the backing store is unaware of the framework of the\n    server itself.\n\n    Each model has references to others, as follows:\n\n    Server\n        Contains references to the set of \"connections\" (1). It also has a\n        sense of the *current* \"connection\" (2), based on the active Coro\n        thread.\n\n    Connection\n        Connections hold a reference to their \"server\" (1). If the\n        connection has authenticated, they hold a reference to the \"auth\"\n        object (2), and to their \"model\" (3). If a mailbox is \"selected\"\n        (4), they hold a pointer to that, as well. Infrequently, the\n        connection will need to temporarily store references to the set of\n        \"temporary_messages\" (5) which have been expunged in other\n        connections, but we have been unable to notify this connection of.\n\n    Command\n        Commands store their \"server\" (1) and \"connection\" (2).\n\n    Model\n        Models store a reference to the \"root\" (1) of their mailbox tree, as\n        well as to the \"auth\" (2) which gives them access to such.\n\n    Mailbox\n        Mailboxes store a list of \"children\" mailboxes (1), and \"messages\"\n        (2) contained within them, which are stored in sequence order. They\n        also contain a hash of \"uids\" (3) for fast UID retrieval of\n        messages. If they are not the root mailbox, they also store a\n        reference to their \"parent\" mailbox (4).\n\n    Message\n        Messages store the \"mailbox\" (1) in which they are contained.\n\nDEPENDENCIES\n    Coro, Net::Server::Coro\n\nBUGS AND LIMITATIONS\n    No bugs have been reported.\n\n    Please report any bugs or feature requests to\n    \"bug-net-imap-server@rt.cpan.org\", or through the web interface at\n    \u003chttp://rt.cpan.org\u003e.\n\n    A low-traffic mailing list exists for discussion on how to (ab)use this\n    module, at\n    \u003chttp://lists.bestpractical.com/cgi-bin/mailman/listinfo/net-imap-server\n    \u003e.\n\nAUTHOR\n    Alex Vandiver \"\u003calexmv@bestpractical.com\u003e\"\n\nLICENCE AND COPYRIGHT\n    Copyright (c) 2010, Best Practical Solutions, LLC. All rights reserved.\n\n    This module is free software; you can redistribute it and/or modify it\n    under the same terms as Perl itself. See perlartistic.\n\nDISCLAIMER OF WARRANTY\n    BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY\n    FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN\n    OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES\n    PROVIDE THE SOFTWARE \"AS IS\" WITHOUT WARRANTY OF ANY KIND, EITHER\n    EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE\n    ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH\n    YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL\n    NECESSARY SERVICING, REPAIR, OR CORRECTION.\n\n    IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\n    WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR\n    REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE\n    TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR\n    CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE\n    SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING\n    RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A\n    FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF\n    SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH\n    DAMAGES.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbestpractical%2Fnet-imap-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbestpractical%2Fnet-imap-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbestpractical%2Fnet-imap-server/lists"}