{ "info": { "author": "Humantech Knowledge Management", "author_email": "humantech@humantech.com.br", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Plugins", "Framework :: Twisted", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "Intended Audience :: Telecommunications Industry", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Topic :: Communications :: Email :: Filters", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Networking :: Monitoring" ], "description": "yatxmilter (yet another)\r\n========================\r\n\r\n_we recently changed the name of the project from **txmilter** to **yatxmilter** because there already was a [txmilter](https://github.com/flaviogrossi/txmilter) project under development with a different license and we didn't feel comfortable to use the name._\r\n\r\nThe milter protocol written in pure python as a twisted protocol, licensed under [GPLv2!](../master/LICENSE)\r\n\r\n##wait, what?\r\n\r\nThe **yatxmilter** is a project that aims to bring the milter protocol to python using the [Twisted Matrix Framework](https://twistedmatrix.com/trac/). It was inspired after people telling us to use [crochet](https://pypi.python.org/pypi/crochet/) and libmilter to achieve our goals. As we like to use things inside Twisted the way Twisted works, it was decided to create this project.\r\n\r\nThe goal of using **yatxmilter** is to provide a _faster_ response using Twisted's power of asynchronous calls instead the threaded solution used by libmilter. **yatxmilter** is _really fast_ and can handle _lots_ of simultaneous connections. In pure python ;)\r\n\r\n###how do I use it?\r\n\r\nfirst, you'll have to install it using pip or from [PyPI](https://pypi.python.org/pypi/yatxmilter):\r\n\r\n```\r\n$ pip install yatxmilter\r\n```\r\n\r\n**yatxmilter** is designed to be as simple as possible, and as close as possible to libmilter (that you can check here: HTTPS://www.milter.org/developers/api/), having that in mind, if you know how libmilter works you won't get any trouble\r\nworking with yatxmilter. Function calls are (_almost_) the same and functions names really remembers libmilter name calls.\r\n\r\nFor example, take a close look to the code:\r\n\r\n\r\n```\r\n#!/usr/bin/python\r\n# -*- coding: utf-8 -*-\r\n\r\nfrom __future__ import unicode_literals\r\n\r\nfrom yatxmilter.protocol import MilterProtocolFactory\r\nfrom yatxmilter.defaults import MilterFactory\r\n\r\n\r\ndef main():\r\n # we consider a \"good pattern\" to import reactor just when you'll use it,\r\n # since we have other reactors in our codebase\r\n from twisted.internet import reactor\r\n\r\n reactor.listenTCP(1234, MilterProtocolFactory(\r\n MilterFactory()\r\n ))\r\n\r\n reactor.run()\r\n\r\nif __name__ == '__main__':\r\n main()\r\n\r\n```\r\n\r\nThis is _just_ a twisted protocol inicialization as any twisted protocol will do ...\r\n\r\n`MilterFactory` is just an empty factory that creates `Milter` objects. You should build your own factory to instantiate your milter objects. The `MilterProtocolFactory` is the one that does the magic for you, abstracting communication to expose you the `Milter` interface.\r\n\r\nYour job is to extend `Milter`, override any method you need to work with _and_ the `xxfi_negotiate` method to exchange what signals your milter will support to build a `MilterFactory`.\r\n\r\nAs a plus, the **yatxmilter** can handle more than one milter plugin on the same connection, taking care of handling any signal different from continue and communicating with the MTA.\r\n\r\n\r\n```\r\n MTA yatxmilter your milter\r\n\r\n ___________________\r\n | |\r\n | MTA opens |\r\n | connection |\r\n |__________________|\r\n | __________________\r\n | | |\r\n |_________> | Instantiate |\r\n | all plugins |\r\n |_________________|\r\n ___________________ |\r\n | | |\r\n | MTA starts | |\r\n | negotiation | <_________|\r\n |__________________|\r\n | ____________________\r\n | | |\r\n |________________________________> | Send flags |\r\n |___________________|\r\n |\r\n __________________ |\r\n | | |\r\n | Merge flags | <_________|\r\n |_________________|\r\n |\r\n ___________________ |\r\n | | |\r\n | Status filtering | |\r\n | request | <_________|\r\n |__________________|\r\n |\r\n | ____________________\r\n | | |\r\n |________________________________> | Process and reply |\r\n |___________________|\r\n |\r\n __________________ |\r\n | | |\r\n | Wait all finish | |\r\n | or first error | <_________|\r\n |_________________|\r\n |\r\n V\r\n __________________\r\n | |\r\n | Reply status |\r\n |_________________|\r\n |\r\n V\r\n _________________________________________________________________\r\n | |\r\n | Close connection |\r\n |________________________________________________________________|\r\n\r\n```\r\n\r\nand that's all :)\r\n\r\n#todo\r\n\r\n* we still have no test units and code coverage, but you're welcome to push them if you want :)\r\n* docs: wow, better examples and sphinx related docs are still pending;\r\n* py3 was just completely ignored for now.\r\n\r\n\r\n#license\r\n\r\n**yatxmilter** code and docs are released under the [GPLv2](../master/LICENSE) license, from which is derived from the libmilter license - as we used its code as a base for ours and also as a form of gratitude.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/humantech/yatxmilter", "keywords": "milter,twisted,protocol", "license": "GNU GPLv2", "maintainer": "Jean Marcel Duvoisin Schmidt", "maintainer_email": "jean.schmidt@humantech.com.br", "name": "yatxmilter", "package_url": "https://pypi.org/project/yatxmilter/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/yatxmilter/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/humantech/yatxmilter" }, "release_url": "https://pypi.org/project/yatxmilter/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Twisted protocol to handle Milter Connections in libmilter style", "version": "0.1.1" }, "last_serial": 1179328, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "7e32234b261c6330f3eb4918d982c3e2", "sha256": "a61371dc2a0d75c59deb5321f9fc875d24c52ce96c626fb5a2a018e07aa979d2" }, "downloads": -1, "filename": "yatxmilter-0.1.1.tar.gz", "has_sig": false, "md5_digest": "7e32234b261c6330f3eb4918d982c3e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7260, "upload_time": "2014-08-04T13:29:03", "url": "https://files.pythonhosted.org/packages/cd/06/6954ec51ee6bb65c3e8d4f6b8f7df4cc5797c18d950d84548b348aa6f274/yatxmilter-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7e32234b261c6330f3eb4918d982c3e2", "sha256": "a61371dc2a0d75c59deb5321f9fc875d24c52ce96c626fb5a2a018e07aa979d2" }, "downloads": -1, "filename": "yatxmilter-0.1.1.tar.gz", "has_sig": false, "md5_digest": "7e32234b261c6330f3eb4918d982c3e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7260, "upload_time": "2014-08-04T13:29:03", "url": "https://files.pythonhosted.org/packages/cd/06/6954ec51ee6bb65c3e8d4f6b8f7df4cc5797c18d950d84548b348aa6f274/yatxmilter-0.1.1.tar.gz" } ] }