{ "info": { "author": "vsyrakis", "author_email": "cetanu@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Internet :: Name Service (DNS)", "Topic :: System :: Systems Administration", "Topic :: Utilities" ], "description": "|Build Status|\n\nsender_policy_flattener\n=======================\n\nWe had a problem in our organisation that caused our SPF records to become invalid:\n\nWhen customers computers were querying our SPF records, there were more than 10 lookups required after following all of the ``include:`` remarks.\n\nSolution? Query them ourselves, and create a much more condense list of SPF records.\n\nBut wait... What if the downstream records change?\n------------------------------------------------\n\nPart of what the script does is that it creates a JSON file that keeps track of the last list of IP Addresses that your combination of SPF records had.\n\nWhen the hashsum of your IP Addresses changes, it will send out an email (or just dump HTML if it can't find an email server) with a handy diff & BIND format for viewing what has changed, and promptly updating it.\n\nYou could theoretically extract the flat IP records from the resulting JSON file and automatically update your DNS configuration with it.\n\nHow do I install it?\n--------------------\n\nvia git clone\n~~~~~~~~~~~~~\n\nClone this repo and run \n\n.. code:: shell\n\n pip install -r requirements.txt\n python setup.py install\n\nYou can also do this from within a virtualenv if that tickles your fancy (I recommend it).\n\nvia pip\n~~~~~~~\n\n.. code:: shell\n\n pip install sender_policy_flattener\n \nthis package also supports RPM builds\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: shell\n\n yum -y install rpm-build\n python setup.py bdist_rpm\n\nHow do I use it?\n----------------\n\nPython 2.6, 2.7, or 3.3+ is required.\n\nHere's the usage:\n\n.. code:: shell\n\n usage: spflat [-h] [-c CONFIG] [-r RESOLVERS] [-e MAILSERVER] [-t TOADDR]\n [-f FROMADDR] [-s SUBJECT] [-D SENDING_DOMAIN] [-d DOMAINS]\n [-o OUTPUT]\n \n A script that crawls and compacts SPF records into IP networks. This helps to\n avoid exceeding the DNS lookup limit of the Sender Policy Framework (SPF)\n https://tools.ietf.org/html/rfc7208#section-4.6.4\n \n optional arguments:\n -h, --help show this help message and exit\n -c CONFIG, --config CONFIG\n Name/path of JSON configuration file\n -r RESOLVERS, --resolvers RESOLVERS\n Comma separated DNS servers to be used\n -e MAILSERVER, -mailserver MAILSERVER\n Server to use for mailing alerts\n -t TOADDR, -to TOADDR\n Recipient address for email alert\n -f FROMADDR, -from FROMADDR\n Sending address for email alert\n -s SUBJECT, -subject SUBJECT\n Subject string, must contain {zone}\n -D SENDING_DOMAIN, --sending-domain SENDING_DOMAIN\n The domain which emails are being sent from\n -d DOMAINS, --domains DOMAINS\n Comma separated domain:rrtype to flatten to IP\n addresses. Imagine these are your SPF include\n statements.\n -o OUTPUT, --output OUTPUT\n Name/path of output file\n\nExample\n\n.. code:: shell\n\n spflat --resolvers 8.8.8.8,8.8.4.4 \\\n --to me@mydomain.com \\\n --from admin@mydomain.com \\\n --subject 'SPF for {zone} has changed!' \\\n --domains gmail.com:txt,sendgrid.com:txt,yahoo.com:a \\\n --sending-domain mydomain.com\n \nor\n\n.. code:: shell\n\n spflat --config spf.json\n\nYou can specify a config file, or you can specify all of the optional arguments from the command line.\n\nI've provided a ``settings.json`` file with an example configuration file.\n\n\n3rd party dependencies\n----------------------\n\n* netaddr\n* dnspython\n\nExample email format\n--------------------\n\n|Example screenshot|\n\n\n.. |Build Status| image:: https://api.travis-ci.org/cetanu/sender_policy_flattener.svg?branch=master\n :target: https://travis-ci.org/cetanu/sender_policy_flattener\n.. |Example screenshot| image:: https://raw.githubusercontent.com/cetanu/sender_policy_flattener/master/example/email_example.png", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cetanu/sender_policy_flattener", "keywords": "spf dns sender policy framework", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "sender-policy-flattener", "package_url": "https://pypi.org/project/sender-policy-flattener/", "platform": "", "project_url": "https://pypi.org/project/sender-policy-flattener/", "project_urls": { "Homepage": "https://github.com/cetanu/sender_policy_flattener" }, "release_url": "https://pypi.org/project/sender-policy-flattener/0.2.3/", "requires_dist": null, "requires_python": "", "summary": "Condense SPF records to network blocks to avoid DNS Lookup Limits", "version": "0.2.3" }, "last_serial": 3432283, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "7e545ff4c9645203ddb324f266bff344", "sha256": "62d8a2d35e45e360f8ff8899225f66a24b31d77da25b489bb521e122f8ecfd63" }, "downloads": -1, "filename": "sender_policy_flattener-0.1.0.zip", "has_sig": false, "md5_digest": "7e545ff4c9645203ddb324f266bff344", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12154, "upload_time": "2017-11-06T06:46:31", "url": "https://files.pythonhosted.org/packages/6b/7b/949485f89df0967284ee1c187cae7193946a62a955c551a517f2c60983aa/sender_policy_flattener-0.1.0.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "2224498c7b21b4d094164445cdfed487", "sha256": "0f66b30a55c4bc1b0bceb5d1df86941057d16a71ebb8257395521b2065d0978b" }, "downloads": -1, "filename": "sender_policy_flattener-0.1.1.zip", "has_sig": false, "md5_digest": "2224498c7b21b4d094164445cdfed487", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13968, "upload_time": "2017-11-06T07:00:21", "url": "https://files.pythonhosted.org/packages/99/db/142a704cf3ed00af0b611e1e60ef8ddfed95c8e920af965148b1521778da/sender_policy_flattener-0.1.1.zip" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "cd857dc82d04cf823d11abe2de312da0", "sha256": "0d7a409dc4a39b3f8117c429d0986e427ea019402d45a57862d02369cc042b80" }, "downloads": -1, "filename": "sender_policy_flattener-0.1.2.zip", "has_sig": false, "md5_digest": "cd857dc82d04cf823d11abe2de312da0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14119, "upload_time": "2017-11-06T07:04:36", "url": "https://files.pythonhosted.org/packages/cf/1b/75cfa80822a96c4a17fc5b71448b7b039ec4f2791dc5941805ac1018dace/sender_policy_flattener-0.1.2.zip" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "bf2a2d07b4d5f0f6c1e8b9ebe30a685f", "sha256": "047497f5281905eac4083268a7bd053fbae5cd5230bde6f8dfec6c757ad4c395" }, "downloads": -1, "filename": "sender_policy_flattener-0.1.3.zip", "has_sig": false, "md5_digest": "bf2a2d07b4d5f0f6c1e8b9ebe30a685f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14166, "upload_time": "2017-12-05T03:46:03", "url": "https://files.pythonhosted.org/packages/23/be/d45e5d72b9967d9e6d5f7bf475ace2b0f99f0852843c7bfd222ab088905b/sender_policy_flattener-0.1.3.zip" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "eb8d8542dfe80e362992f771d1a78541", "sha256": "033c5c2b5fbd5c902f6c1c011da626617bb9c0d91c899d5725046357d9339768" }, "downloads": -1, "filename": "sender_policy_flattener-0.1.4.zip", "has_sig": false, "md5_digest": "eb8d8542dfe80e362992f771d1a78541", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14501, "upload_time": "2017-12-05T05:26:37", "url": "https://files.pythonhosted.org/packages/44/44/0af2a1971e5ac6fa95e3fd5cbde9c0bd58ed757497a6b8bbd481f4ef5f07/sender_policy_flattener-0.1.4.zip" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "ba27e59cfd11b394000d76c2beb529cf", "sha256": "aa658e6a01346202c616c2fde8b19d55af533e5032a22416460f4b5d8d26f1d1" }, "downloads": -1, "filename": "sender_policy_flattener-0.1.5.zip", "has_sig": false, "md5_digest": "ba27e59cfd11b394000d76c2beb529cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14525, "upload_time": "2017-12-05T05:48:24", "url": "https://files.pythonhosted.org/packages/68/84/f428a1d12391cda5b9e41cebaa9b2e7696021e1f8c3361089bfd15735f2b/sender_policy_flattener-0.1.5.zip" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "8f216a87a00fdad4d42e515642131a7c", "sha256": "c6bd0c58f86d9f00b46aacb1ad45b042d7e8d616372a2d37e9d9f4c19c17b9bf" }, "downloads": -1, "filename": "sender_policy_flattener-0.2.0.zip", "has_sig": false, "md5_digest": "8f216a87a00fdad4d42e515642131a7c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15070, "upload_time": "2017-12-15T12:22:02", "url": "https://files.pythonhosted.org/packages/b0/5a/2a2bbe8260921bd860bc5d4ccb70a18a05d58e2bde01d053bed09266115d/sender_policy_flattener-0.2.0.zip" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "f86214af51f40ddbe0d278527c570da3", "sha256": "803dd7a82daec0ca56ac8e6b27f64030b651404603f3e663dba1e237f7644e1e" }, "downloads": -1, "filename": "sender_policy_flattener-0.2.1.zip", "has_sig": false, "md5_digest": "f86214af51f40ddbe0d278527c570da3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15096, "upload_time": "2017-12-17T23:42:46", "url": "https://files.pythonhosted.org/packages/dc/f6/29f459a1358c8f4be04fb4622e0740f2c6f40830f536797783dc8f9a6e0a/sender_policy_flattener-0.2.1.zip" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "a9bb05418b387fea075ed7b928f6baaf", "sha256": "55515cd55c805c9d4cf3f0e5862b16ff9a433582460b1e20c3f89064cf81823d" }, "downloads": -1, "filename": "sender_policy_flattener-0.2.2.zip", "has_sig": false, "md5_digest": "a9bb05418b387fea075ed7b928f6baaf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15152, "upload_time": "2017-12-18T03:17:19", "url": "https://files.pythonhosted.org/packages/0c/21/6f5ad6666fad4532953ab940aea3b53a0db6d64047bf62a6a15de666500f/sender_policy_flattener-0.2.2.zip" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "61020bf9930887a1c5d267c40769def9", "sha256": "88daacdef085952039ea47c57391f5f14129e476afe51c6e272fc49f9908c303" }, "downloads": -1, "filename": "sender_policy_flattener-0.2.3.tar.gz", "has_sig": false, "md5_digest": "61020bf9930887a1c5d267c40769def9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8375, "upload_time": "2017-12-20T19:37:41", "url": "https://files.pythonhosted.org/packages/91/42/a32d29fcc9a615a07ab2ae1c400a6b93a0418fa751097e7124755e8cf554/sender_policy_flattener-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "61020bf9930887a1c5d267c40769def9", "sha256": "88daacdef085952039ea47c57391f5f14129e476afe51c6e272fc49f9908c303" }, "downloads": -1, "filename": "sender_policy_flattener-0.2.3.tar.gz", "has_sig": false, "md5_digest": "61020bf9930887a1c5d267c40769def9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8375, "upload_time": "2017-12-20T19:37:41", "url": "https://files.pythonhosted.org/packages/91/42/a32d29fcc9a615a07ab2ae1c400a6b93a0418fa751097e7124755e8cf554/sender_policy_flattener-0.2.3.tar.gz" } ] }