{ "info": { "author": "Daniel Monteiro Basso", "author_email": "daniel@basso.inf.br", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Twisted", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", "Programming Language :: Python :: 2", "Topic :: Communications :: Email", "Topic :: Communications :: Email :: Filters", "Topic :: Communications :: Email :: Mail Transport Agents", "Topic :: Communications :: Email :: Post-Office :: IMAP", "Topic :: Communications :: Email :: Post-Office :: POP3" ], "description": "Mail Services Plugin\n====================\n\n *Note:* this is alpha software, use it only if willing to help debug\n it.\n\nThis plugin provides full mail services:\n\n- relay: signs mail messages (DKIM) and transports them to other\n servers\n- relay through smarthost: forwards the messages to the configured SMTP\n server to do the relaying\n- delivery: receives and filters messages, then delivers them to Phen\n mailboxes, to other plugins, or to external agents (e.g. dovecot LDA)\n- fetching: retrieves messages from other servers\n- access: serves messages through IMAP4, POP3, or direct shell\n management\n\nWhen used in conjunction with Phen's DNS plugin, outgoing mail passes\ncommon anti-spam tests. The module dkimpy (python-dkim in Debian) is\nrequired for DKIM signatures.\n\nOther plugins can easily send mail using the ``send_mail`` method.\n\nServer Configuration\n--------------------\n\n *Note:* all configuration files are in JSON format, but allow hash\n (#) comments.\n\nEdit the file ``/[device-identity]/system/mail/mail.jcfg`` using the\nreference below:\n\n::\n\n {\n \"sender-domain\": \"example.com\",\n \"receivers\": [ # DNS MX records (requires dns plugin)\n [0, \"mail1.example.com\"], # priority, server name\n [5, \"mail2.example.com\"],\n ],\n \"domains\": {\n \"example.com\": {\n \"postmaster\": \":alice\",\n \"abuse\": \":alice\",\n \"alice\": \"/[user-identity]/path/to/mail-folder\",\n \"bob\": \"-disabled account\",\n \"carol\": \">external-MDA-command parameters [hashed-passphrase]\"\n \"dan\": \">forward@domain.org [hashed-passphrase]\"\n \"robot\": \".plugin-name parameters\"\n }\n },\n \"relay\": {\n \"dkim-key\": \"/[device-identity]/system/mail/dkim.key\", # default\n \"queue-folder\": \"/[device-identity]/system/mail/queue\" # default\n },\n # if instead of relaying by yourself you prefer/need a smarthost:\n # \"hosted\": {\n # \"server\": \"smtp.example.com\",\n # \"port\": 587, # default\n # \"username\": \"user@example.com\",\n # \"password\": \"KTgyfDNrNH0kbCkCKgMtAi4D\",\n # \"require-tls\": false\n # },\n\n \"imap\": true,\n \"pop\": {\"port\": 111, \"disable-ssl\": true}\n }\n\nRemember that mail servers are required by RFC822 6.3, RFC1123 5.2.7,\nand RFC2821 4.5.1 to have a valid ``postmaster`` address, and by RFC2142\nSection 2 to have a valid ``abuse`` address.\n\nYou only have to specify configuration sections if you want to change a\ndefault value. For instance, the ``relay`` section in the reference\nabove could be replaced with ``\"relay\": true``.\n\nThe first character of the user definition string sets the action to\ntake when receiving or relaying mails:\n\n- **-** disables the service to the user\n- **/** indicates the path to the mail folder, where the user can\n specify preferences in the ``mail.jcfg`` file\n- **:** specifies an alias to another username (with @domain if not the\n same)\n- **>** forwards the email to an external mail delivery agent, or to\n another mail server if a mail address is specified; if the last\n argument is a sha256 hashed passphrase, the user can relay messages\n using the mail address as username\n- **.** delivers the message to a Phen plugin; the mail plugin itself\n replies messages with an aknowledgment echo\n\n *Note:* the IMAP server only works with Evolution so far.\n Thunderbird and Geary still can't retrieve messages correctly.\n\nUser Configuration\n------------------\n\nReference ``/[user-identity]/mail/mail.jcfg``:\n\n::\n\n {\n \"passphrase\": \"sha256-passphrase\",\n \"pop3pwd\": \"obscured-passphrase\",\n \"external-MDA\": \"command parameters\",\n \"authorization\": \"admin sign allowing the external-MDA command\",\n \"delivery\": \"path-to-custom-folder\", # default: mail-foder/delivery\n \"filters\": \"path-to-custom-file\" # default: mail-foder/filters.jcfg\n }\n\nThe passphrase is used for SMTP and IMAP authentication, and its hash\ncan be calculated with Phen's shell command ``sha256``:\n\n::\n\n admin:iYPM7:/[iYPM7]$ sha256\n Type in your pass phrase:\n 08fc92f4ad885e06491aa5b19435849eb62232a056dd840a53fee62a5507b654\n\nThe POP implementation requires the unhashed storage of the passphrase,\nso to avoid using clear-text you can use the shell command ``obscure``:\n\n::\n\n admin:iYPM7:/[iYPM7]$ obscure\n Type in your pass phrase:\n KTgyfDNrNH0kbCkCKgMtAi4D\n\nIdentities that don't belong to the *admin* account must have *admin*\nauthorization to use the host system's resources, such as using and\nexternal MDA or executing a code filter.\n\nExample filter configuration file:\n\n::\n\n {\n \"filters\": [\n {\"type\": \"py\", \"code\": \"file:test-filter.py\"},\n {\"type\": \"match\", \"content\": \"[3ug-l]\", \"action\": \"accept:Lists/3ug-l\"}\n ]\n }\n\nExample code filter:\n\n.. code:: python\n\n try:\n cnt = int(msg[\"Subject\"].split()[-1])\n if cnt % 2:\n accept(\"odd\")\n accept(\"even\")\n except:\n pass\n\nFetcher Configuration\n~~~~~~~~~~~~~~~~~~~~~\n\nExample ``/[user-identity]/system/config/mail-fetcher.jcfg``:\n\n::\n\n {\n \"mail-folders\": {\n \"mail\": \"/[user-identity]/mail\"\n },\n \"accounts\": [\n {\n \"server\": \"imap.example.com\",\n \"protocol\": \"imap\", # imap / imaps\n \"username\": \"alice\",\n \"passphrase\": \"KTgyfDNrNH0kbCkCKgMtAi4D\",\n \"period\": \"5 min\",\n \"first-time\": \"download-all\", # default is \"ignore-all\"\n \"boxes\": [\n {\"Inbox\": \"filter\"},\n \"SomeList\", # same as {\"SomeList\": \"filter\"}\n {\"SomeOtherList\": \"accept:mail:Lists/SomeOther\"},\n {\"Spam\": \"delete\"}\n ]\n }\n ]\n }\n\nThe above ``mail-folders`` section is the default, and can be ommited if\nunchanged.\n\n *Note:* protocols pop / pops not available yet.\n\nImmediate ToDo List\n-------------------\n\n- better user documentation (some features are not currently described)\n- developer documentation\n- fetching through POP\n- continous fetching through IMAP (don't disconnect, go IDLEing)\n- Python3 support\n- tests\n- optimizations (lots of room for improvement here)\n\nFuture Plans\n------------\n\n- Gateway for using Phen's internal messaging mechanism\n- Long term storage in a ``phen.db`` database.\n- Keyword search using Woosh.\n- Interaction with Notmuch.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://phen.eu", "keywords": null, "license": "AGPLv3+", "maintainer": null, "maintainer_email": null, "name": "phen.mail", "package_url": "https://pypi.org/project/phen.mail/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/phen.mail/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://phen.eu" }, "release_url": "https://pypi.org/project/phen.mail/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "Mail Services Plugin for Phen", "version": "0.1.2" }, "last_serial": 1886278, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "0cd86650d081a9434c26849e6bbb6623", "sha256": "f86074ec63179a535bd66d2370558a028588bbbd07ef92707cb9e40eda5f4bec" }, "downloads": -1, "filename": "phen.mail-0.1.0.zip", "has_sig": false, "md5_digest": "0cd86650d081a9434c26849e6bbb6623", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 31873, "upload_time": "2015-12-31T22:20:40", "url": "https://files.pythonhosted.org/packages/06/96/f4163227d0e16cb6c478dae0cbb4fbdc1dfc9f4ab3ba8fb1c7103be637bf/phen.mail-0.1.0.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ed27e69b122010603d1bbf8fe7ed98fe", "sha256": "43c41278b5dc0cb259635b3ecf4591fa1bce8b0ff12d3e27d670d9e9f7ea3471" }, "downloads": -1, "filename": "phen.mail-0.1.1.zip", "has_sig": false, "md5_digest": "ed27e69b122010603d1bbf8fe7ed98fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34760, "upload_time": "2016-01-03T11:58:48", "url": "https://files.pythonhosted.org/packages/8b/3d/1433d05231f3fef6b765510e28159ea9f63bac35901dfbc2d800dbcc4a9e/phen.mail-0.1.1.zip" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "ce5cfbd15cb69a98480fafc669586af1", "sha256": "614308917d651ad8fb598753f8de533eb7cedbb1cfb702a2b351df4c5f509631" }, "downloads": -1, "filename": "phen.mail-0.1.2.zip", "has_sig": false, "md5_digest": "ce5cfbd15cb69a98480fafc669586af1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34834, "upload_time": "2016-01-03T12:58:27", "url": "https://files.pythonhosted.org/packages/df/06/2822cdacb58882b953eb256f78422786a91234067c342276d6c04c48741a/phen.mail-0.1.2.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ce5cfbd15cb69a98480fafc669586af1", "sha256": "614308917d651ad8fb598753f8de533eb7cedbb1cfb702a2b351df4c5f509631" }, "downloads": -1, "filename": "phen.mail-0.1.2.zip", "has_sig": false, "md5_digest": "ce5cfbd15cb69a98480fafc669586af1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 34834, "upload_time": "2016-01-03T12:58:27", "url": "https://files.pythonhosted.org/packages/df/06/2822cdacb58882b953eb256f78422786a91234067c342276d6c04c48741a/phen.mail-0.1.2.zip" } ] }