spf-engine


Namespf-engine JSON
Version 3.0.4 PyPI version JSON
download
home_page
SummarySPF (Sender Policy Framework) processing engine for Postfix policy server and Milter implemented in Python.
upload_time2023-04-08 02:42:08
maintainer
docs_urlNone
author
requires_python>=3.3
license
keywords postfix sendmail milter spf email
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            SPF Engine - provides:
Python Postfix Policy for SPF (python-policy-spf) 2.0.0
Python based policy daemon for Postfix SPF checking
pyspf-milter Milter for SPF checking for Sendmail and other milter users

Tumgreyspf source
 Copyright © 2004-2005, Sean Reifschneider, tummy.com, ltd.
 <jafo@tummy.com>
python-policyd-spf changes
 Copyright © 2007-2016 Scott Kitterman <scott@kitterman.com>
<https://launchpad.net/pypolicyd-spf>
Documentation inputs:
 Copyright © 2004-2005, Sean Reifschneider, tummy.com, ltd.
 <jafo@tummy.com>
 2003-2004 Meng Weng Wong <mengwong@pobox.com> from postfix-policyd-spf-perl
 Copyright © 2007-2018 Scott Kitterman <scott@kitterman.com>

Dual Apache 2.0/GPL 2 licensed:
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; version 2.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License along
   with this program; if not, write to the Free Software Foundation, Inc.,
   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
=================

This is an external policy checker for the postfix mail server.  It will use
pyspf to check SPF records to determine if email should be rejected or
deferred by your server.

It requires Python3 (python3.3+) - as of version 2.0.0, python2 is no longer
supported, the pyspf (python-spf) library version 2.0.9 or higher, and authres.  

As of version 3.0.0, it uses flit to build/install.  It requires at least flit
3.8.0.

Nothing is configured by default, so this will not interact with Postfix until
it has been set up.

See man 1 policyd-spf for information on setting up and using this policy
server.

See man 5 policyd-spf.conf for configuration file information.

The milter is relatively new and less well tested/mature.  If used with
pymilter version 1.0.5 or later, it will work for messages where the local
part of the Mail From is not valid UTF-8, but the "l" macro will not work.

This package includes a default configuration file and man pages. 

[sudo] pip install pyspf_milter

Using pip will cause required packages to be installed via easy_install if they
have not been previously installed.  Because pymilter is a compiled Python
extension, the system will need appropriate development packages and
an C compiler.  Alternately, install it from dsitribution/OS packages and then
pip install pyspf_milter.

Both a systemd unit file and a sysv init file are provided.  Both make
assumptions about defaults being used, e.g. if a non-standard pidfile name is
used, they will need to be updated.  The sysv init file uses start-stop-deamon
from Debian.  It is not portable to systems without that available.

The pyspf-milter drops priviledges after setup to the user/group specified in
UserID.  During initial setup, this system user needs to be manually created.
As an example, using the default dkimpy-user on Debian, the command would be:

[sudo] adduser --system --no-create-home --quiet --disabled-password \
               --disabled-login --shell /bin/false --group \
               --home /run/pyspf-milter pyspf-milter

Since /var/run or /run is sometimes on a tempfs, if the PID file directory is
missing, the milter will create it on startup.

To start pyspf-milter with systemd for the first time, you will need to take
the following steps:

[sudo] systemctl daemon-reload
[sudo] systemctl enable pyspf-milter
[sudo] systemctl start pyspf-milter
[sudo] systemctl status pyspf-milter (to verify it started correctly)

As with all milters, pyspf-milter needs to be integrated with your MTA of
choice (Sendmail or Postfix).

For Sendmail:

Configuration is very similar to opendkim, but needs some adjustment for
dkimpy-milter. Here's an example configuration line to include in your
sendmail.mc:

INPUT_MAIL_FILTER(`pyspf-milter', `S=local:/run/pyspf-milter/pyspf-milter.sock')dnl

Changing the sendmail.mc file requires a Make (to compile it into sendmail.cf)
and a restart of sendmail.  Note that S= needs to match the value of Socket in
the configuration file.

Milter support should be present by default in most versions of sendmail
these days, but if not included in your Sendmail build, see:
http://www.elandsys.com/resources/sendmail/milter.html

For Postfix:

Integration of pyspf-milter into Postfix is like any milter (See Postfix's
README_FILES/MILTER_README).  Here's an example master.cf excerpt:

smtp       inet  n       -       -       -      -       smtpd
    ...
    -o smtpd_milters=inet:localhost:8893
    ...

These need to match the Socket value for pyspf-milter.

Care is required to segregate outbound mail from inbound mail to be checked.
verified.  There are many possible ways.  Here is another example using milter
macros to keep the mail streams segregated:

Postfix main.cf:

smtpd_milters=inet:localhost:8893

Postfix master.cf:

smtp       inet  n       -       -       -       -       smtpd
    ...
    -o milter_macro_daemon_name=VERIFYING
    ...


In the pyspf-milter configuration file:

...
MacroList		daemon_name|VERIFYING
...



            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "spf-engine",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.3",
    "maintainer_email": "",
    "keywords": "Postfix,Sendmail,milter,spf,email",
    "author": "",
    "author_email": "Scott Kitterman <scott@kitterman.com>",
    "download_url": "https://files.pythonhosted.org/packages/a4/e9/8208c1602b8269e2a0ff91dde7fb56d1fc0949f832a8f9743babdfb09499/spf-engine-3.0.4.tar.gz",
    "platform": null,
    "description": "SPF Engine - provides:\nPython Postfix Policy for SPF (python-policy-spf) 2.0.0\nPython based policy daemon for Postfix SPF checking\npyspf-milter Milter for SPF checking for Sendmail and other milter users\n\nTumgreyspf source\n Copyright \u00a9 2004-2005, Sean Reifschneider, tummy.com, ltd.\n <jafo@tummy.com>\npython-policyd-spf changes\n Copyright \u00a9 2007-2016 Scott Kitterman <scott@kitterman.com>\n<https://launchpad.net/pypolicyd-spf>\nDocumentation inputs:\n Copyright \u00a9 2004-2005, Sean Reifschneider, tummy.com, ltd.\n <jafo@tummy.com>\n 2003-2004 Meng Weng Wong <mengwong@pobox.com> from postfix-policyd-spf-perl\n Copyright \u00a9 2007-2018 Scott Kitterman <scott@kitterman.com>\n\nDual Apache 2.0/GPL 2 licensed:\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n\n\n   This program is free software; you can redistribute it and/or modify\n   it under the terms of the GNU General Public License as published by\n   the Free Software Foundation; version 2.\n\n   This program is distributed in the hope that it will be useful,\n   but WITHOUT ANY WARRANTY; without even the implied warranty of\n   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n   GNU General Public License for more details.\n\n   You should have received a copy of the GNU General Public License along\n   with this program; if not, write to the Free Software Foundation, Inc.,\n   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n=================\n\nThis is an external policy checker for the postfix mail server.  It will use\npyspf to check SPF records to determine if email should be rejected or\ndeferred by your server.\n\nIt requires Python3 (python3.3+) - as of version 2.0.0, python2 is no longer\nsupported, the pyspf (python-spf) library version 2.0.9 or higher, and authres.  \n\nAs of version 3.0.0, it uses flit to build/install.  It requires at least flit\n3.8.0.\n\nNothing is configured by default, so this will not interact with Postfix until\nit has been set up.\n\nSee man 1 policyd-spf for information on setting up and using this policy\nserver.\n\nSee man 5 policyd-spf.conf for configuration file information.\n\nThe milter is relatively new and less well tested/mature.  If used with\npymilter version 1.0.5 or later, it will work for messages where the local\npart of the Mail From is not valid UTF-8, but the \"l\" macro will not work.\n\nThis package includes a default configuration file and man pages. \n\n[sudo] pip install pyspf_milter\n\nUsing pip will cause required packages to be installed via easy_install if they\nhave not been previously installed.  Because pymilter is a compiled Python\nextension, the system will need appropriate development packages and\nan C compiler.  Alternately, install it from dsitribution/OS packages and then\npip install pyspf_milter.\n\nBoth a systemd unit file and a sysv init file are provided.  Both make\nassumptions about defaults being used, e.g. if a non-standard pidfile name is\nused, they will need to be updated.  The sysv init file uses start-stop-deamon\nfrom Debian.  It is not portable to systems without that available.\n\nThe pyspf-milter drops priviledges after setup to the user/group specified in\nUserID.  During initial setup, this system user needs to be manually created.\nAs an example, using the default dkimpy-user on Debian, the command would be:\n\n[sudo] adduser --system --no-create-home --quiet --disabled-password \\\n               --disabled-login --shell /bin/false --group \\\n               --home /run/pyspf-milter pyspf-milter\n\nSince /var/run or /run is sometimes on a tempfs, if the PID file directory is\nmissing, the milter will create it on startup.\n\nTo start pyspf-milter with systemd for the first time, you will need to take\nthe following steps:\n\n[sudo] systemctl daemon-reload\n[sudo] systemctl enable pyspf-milter\n[sudo] systemctl start pyspf-milter\n[sudo] systemctl status pyspf-milter (to verify it started correctly)\n\nAs with all milters, pyspf-milter needs to be integrated with your MTA of\nchoice (Sendmail or Postfix).\n\nFor Sendmail:\n\nConfiguration is very similar to opendkim, but needs some adjustment for\ndkimpy-milter. Here's an example configuration line to include in your\nsendmail.mc:\n\nINPUT_MAIL_FILTER(`pyspf-milter', `S=local:/run/pyspf-milter/pyspf-milter.sock')dnl\n\nChanging the sendmail.mc file requires a Make (to compile it into sendmail.cf)\nand a restart of sendmail.  Note that S= needs to match the value of Socket in\nthe configuration file.\n\nMilter support should be present by default in most versions of sendmail\nthese days, but if not included in your Sendmail build, see:\nhttp://www.elandsys.com/resources/sendmail/milter.html\n\nFor Postfix:\n\nIntegration of pyspf-milter into Postfix is like any milter (See Postfix's\nREADME_FILES/MILTER_README).  Here's an example master.cf excerpt:\n\nsmtp       inet  n       -       -       -      -       smtpd\n    ...\n    -o smtpd_milters=inet:localhost:8893\n    ...\n\nThese need to match the Socket value for pyspf-milter.\n\nCare is required to segregate outbound mail from inbound mail to be checked.\nverified.  There are many possible ways.  Here is another example using milter\nmacros to keep the mail streams segregated:\n\nPostfix main.cf:\n\nsmtpd_milters=inet:localhost:8893\n\nPostfix master.cf:\n\nsmtp       inet  n       -       -       -       -       smtpd\n    ...\n    -o milter_macro_daemon_name=VERIFYING\n    ...\n\n\nIn the pyspf-milter configuration file:\n\n...\nMacroList\t\tdaemon_name|VERIFYING\n...\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "SPF (Sender Policy Framework) processing engine for Postfix policy server and Milter implemented in Python.",
    "version": "3.0.4",
    "split_keywords": [
        "postfix",
        "sendmail",
        "milter",
        "spf",
        "email"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1dac755855e418f640aff8e654bad1af1e528d06710945dfea7f125ab2315077",
                "md5": "ea97393ad63d60e58c45b811f7da2ccc",
                "sha256": "21b79a222bf9578fa9d09f3d0c2bf60f6f71628f186d48ab388581e07926b958"
            },
            "downloads": -1,
            "filename": "spf_engine-3.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ea97393ad63d60e58c45b811f7da2ccc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.3",
            "size": 66283,
            "upload_time": "2023-04-08T02:42:43",
            "upload_time_iso_8601": "2023-04-08T02:42:43.359964Z",
            "url": "https://files.pythonhosted.org/packages/1d/ac/755855e418f640aff8e654bad1af1e528d06710945dfea7f125ab2315077/spf_engine-3.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a4e98208c1602b8269e2a0ff91dde7fb56d1fc0949f832a8f9743babdfb09499",
                "md5": "b3223d7dfb540227255bf64af344634c",
                "sha256": "19cc3b7a73486ff4eb64461ad19d387b31d499f32673527e6841fa1655db853a"
            },
            "downloads": -1,
            "filename": "spf-engine-3.0.4.tar.gz",
            "has_sig": true,
            "md5_digest": "b3223d7dfb540227255bf64af344634c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.3",
            "size": 61428,
            "upload_time": "2023-04-08T02:42:08",
            "upload_time_iso_8601": "2023-04-08T02:42:08.590017Z",
            "url": "https://files.pythonhosted.org/packages/a4/e9/8208c1602b8269e2a0ff91dde7fb56d1fc0949f832a8f9743babdfb09499/spf-engine-3.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-08 02:42:08",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "spf-engine"
}
        
Elapsed time: 0.07401s