Add mail/py-spf-engine, Deprecate mail/postfix-policyd-spf-python
Give time to users to change their env The new port is the successor, it supports milter feature and its config file is in another path. PR: 244424 Submitted by: Yasuhiro KIMURA <yasu@utahime.org> (maintainer)
This commit is contained in:
parent
85f511b012
commit
49387ba716
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=537162
2
GIDs
2
GIDs
|
@ -820,7 +820,7 @@ bitmark-recorder:*:873:
|
|||
# free: 877
|
||||
# free: 878
|
||||
# free: 879
|
||||
# free: 880
|
||||
pyspf-milter:*:880:
|
||||
ultimaker:*:881:
|
||||
midpoint:*:882:
|
||||
ipfs-go:*:883:
|
||||
|
|
2
UIDs
2
UIDs
|
@ -825,7 +825,7 @@ bitmark-recorder:*:873:873::0:0:Bitmark Property Recorder:/var/lib/recorderd:/us
|
|||
# free: 877
|
||||
# free: 878
|
||||
# free: 879
|
||||
# free: 880
|
||||
pyspf-milter:*:880:880::0:0:pyspf-milter:/nonexistent:/usr/sbin/nologin
|
||||
ultimaker:*:881:881::0:0:Ultimaker user:/nonexistent:/usr/sbin/nologin
|
||||
midpoint:*:882:882::0:0:midPoint user:/var/db/midpoint:/usr/sbin/nologin
|
||||
ipfs-go:*:883:883::0:0:ipfs-go user:/var/db/ipfs-go:/bin/sh
|
||||
|
|
11
UPDATING
11
UPDATING
|
@ -5,6 +5,17 @@ they are unavoidable.
|
|||
You should get into the habit of checking this file for changes each time
|
||||
you update your ports collection, before attempting any port upgrades.
|
||||
|
||||
20200531:
|
||||
AFFECTS: users of mail/postfix-policyd-spf-python
|
||||
AUTHOR: yasu@utahime.org
|
||||
|
||||
This port is now deprecated because upstream project is superseded by its
|
||||
successor. So uninstall this port and install mail/py-spf-engine instead.
|
||||
Keep in mind that the path of configuration file is changed from
|
||||
${PREFIX}/etc/postfix-policyd-spf-python/policyd-spf.conf to
|
||||
${PREFIX}/etc/python-policyd-spf/policyd-spf.conf. So you need to move
|
||||
it to new location unless you use the default one without changing.
|
||||
|
||||
20200526:
|
||||
AFFECTS: users of databases/mariadb104-client, databases/mariadb104-server
|
||||
AUTHOR: brnrd@FreeBSD.org
|
||||
|
|
|
@ -510,6 +510,7 @@
|
|||
SUBDIR += py-pyspf
|
||||
SUBDIR += py-pyzmail
|
||||
SUBDIR += py-spambayes
|
||||
SUBDIR += py-spf-engine
|
||||
SUBDIR += py-validate_email
|
||||
SUBDIR += pymsgauth
|
||||
SUBDIR += pyzor
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
PORTNAME= postfix-policyd-spf-python
|
||||
PORTVERSION= 2.0.2
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= mail python
|
||||
MASTER_SITES= CHEESESHOP
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
@ -14,6 +15,9 @@ COMMENT= Pure Python Postfix policy daemon for SPF checking
|
|||
LICENSE= APACHE20
|
||||
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||
|
||||
DEPRECATED= Use mail/py-spf-engine instead (Project is superseded by successor)
|
||||
EXPIRATION_DATE= 2020-08-31
|
||||
|
||||
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyspf>0:mail/py-pyspf@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}authres>0:mail/py-authres@${PY_FLAVOR}
|
||||
|
||||
|
@ -21,6 +25,8 @@ USES= python:3.3+
|
|||
USE_PYTHON= autoplist distutils
|
||||
NO_ARCH= yes
|
||||
|
||||
CONFLICTS= py*-spf-engine
|
||||
|
||||
PORTDOCS= CHANGES \
|
||||
README \
|
||||
README.per_user_whitelisting \
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
# Created by: Giel van Schijndel <me@mortis.eu>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= spf-engine
|
||||
PORTVERSION= 2.9.2
|
||||
CATEGORIES= mail python
|
||||
MASTER_SITES= CHEESESHOP
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
||||
MAINTAINER= yasu@utahime.org
|
||||
COMMENT= SPF engine for Postfix policy server and milter implemented in Python
|
||||
|
||||
LICENSE= APACHE20 GPLv2+
|
||||
LICENSE_COMB= multi
|
||||
LICENSE_FILE_APACHE20= ${WRKSRC}/COPYING
|
||||
LICENSE_FILE_GPLv2+ = ${WRKSRC}/GPL-2
|
||||
|
||||
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}authres>0:mail/py-authres@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}milter>0:mail/py-milter@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pyspf>0:mail/py-pyspf@${PY_FLAVOR}
|
||||
|
||||
USES= python:3.3+ shebangfix
|
||||
USE_PYTHON= autoplist distutils
|
||||
USE_RC_SUBR= pyspf-milter
|
||||
NO_ARCH= yes
|
||||
|
||||
CONFLICTS= py*-postfix-policyd-spf-python
|
||||
|
||||
USERS= pyspf-milter
|
||||
GROUPS= pyspf-milter
|
||||
|
||||
PYSPF_MILTER_RUNDIR= /var/run/pyspf-milter
|
||||
|
||||
PLIST_FILES= '@sample etc/python-policyd-spf/policyd-spf.conf.sample' \
|
||||
'@dir(${USERS},${GROUPS},755) ${PYSPF_MILTER_RUNDIR}'
|
||||
|
||||
SHEBANG_FILES= spf_engine/milter_spf.py \
|
||||
spf_engine/policyd_spf.py
|
||||
|
||||
PORTDOCS= CHANGES \
|
||||
README \
|
||||
README.per_user_whitelisting \
|
||||
policyd-spf.conf.commented
|
||||
|
||||
SUB_FILES= pkg-message
|
||||
SUB_LIST= PYTHON_CMD=${PYTHON_CMD} \
|
||||
PYSPF_MILTER_RUNDIR=${PYSPF_MILTER_RUNDIR}
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e "s|/usr/local/etc/|${PREFIX}/etc/|" \
|
||||
${WRKSRC}/spf_engine/milter_spf.py
|
||||
@${REINPLACE_CMD} -e "s|/etc/|${PREFIX}/etc/|" \
|
||||
${WRKSRC}/spf_engine/policyd_spf.py
|
||||
@${REINPLACE_CMD} -e "s|/run|/var/run|" ${WRKSRC}/spf_engine/policydspfsupp.py
|
||||
@${REINPLACE_CMD} -e "s|/etc/|${PREFIX}/etc/|" -e "s|/usr/bin/|${PREFIX}/bin/|" \
|
||||
${WRKSRC}/policyd-spf.1 ${WRKSRC}/policyd-spf.conf.5 \
|
||||
${WRKSRC}/policyd-spf.peruser.5
|
||||
|
||||
post-install:
|
||||
@${MKDIR} ${STAGEDIR}/var/run/pyspf-milter \
|
||||
${STAGEDIR}${PREFIX}/etc/python-policyd-spf
|
||||
${INSTALL_DATA} ${WRKSRC}/policyd-spf.conf \
|
||||
${STAGEDIR}${PREFIX}/etc/python-policyd-spf/policyd-spf.conf.sample
|
||||
|
||||
post-install-DOCS-on:
|
||||
@${MKDIR} ${STAGEDIR}/${DOCSDIR}
|
||||
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
|
||||
|
||||
.include <bsd.port.mk>
|
|
@ -0,0 +1,3 @@
|
|||
TIMESTAMP = 1582568246
|
||||
SHA256 (spf-engine-2.9.2.tar.gz) = 188a8bc78f1ddb40f1b87a0b6fe2fa78efa0b4cc5d984ff19a53724bb5c28131
|
||||
SIZE (spf-engine-2.9.2.tar.gz) = 52737
|
|
@ -0,0 +1,16 @@
|
|||
--- setup.py.orig 2019-10-27 01:15:11 UTC
|
||||
+++ setup.py
|
||||
@@ -25,11 +25,8 @@ setup(name='spf-engine',
|
||||
include_package_data=True,
|
||||
data_files=[(os.path.join('share', 'man', 'man1'),
|
||||
['policyd-spf.1']), (os.path.join('share', 'man', 'man5'),
|
||||
- ['policyd-spf.conf.5']), (os.path.join('etc', 'python-policyd-spf'),
|
||||
- ['policyd-spf.conf']), (os.path.join('share', 'man', 'man5'),
|
||||
- ['policyd-spf.peruser.5']), (os.path.join('lib', 'systemd', 'system'),
|
||||
- ['system/pyspf-milter.service']),(os.path.join('etc', 'init.d'),
|
||||
- ['system/pyspf-milter']) ],
|
||||
+ ['policyd-spf.conf.5']), (os.path.join('share', 'man', 'man5'),
|
||||
+ ['policyd-spf.peruser.5'])],
|
||||
classifiers = [
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Environment :: No Input/Output (Daemon)',
|
|
@ -0,0 +1,10 @@
|
|||
--- spf_engine/milter_spf.py.orig 2020-02-26 02:21:41 UTC
|
||||
+++ spf_engine/milter_spf.py
|
||||
@@ -37,7 +37,6 @@ import spf_engine.policydspfsupp as config
|
||||
from spf_engine.util import drop_privileges
|
||||
from spf_engine.policydspfsupp import _setExceptHook
|
||||
from spf_engine.util import write_pid
|
||||
-from spf_engine.util import own_socketfile
|
||||
from spf_engine.util import fold
|
||||
|
||||
__version__ = "2.9.2"
|
|
@ -0,0 +1,76 @@
|
|||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
#
|
||||
# Using policyd-spf with Postfix
|
||||
#
|
||||
|
||||
Policyd-spf must be integrated with Postfix to be effective:
|
||||
|
||||
1. Add to your postfix master.cf:
|
||||
|
||||
policyd-spf unix - n n - 0 spawn
|
||||
user=nobody argv=%%PREFIX%%/bin/policyd-spf
|
||||
|
||||
2. Configure the Postfix policy service in your main.cf so that the
|
||||
"smtpd_recipient_restrictions" includes a call to the policyd-spf policy
|
||||
filter. If you already have a "smtpd_recipient_restrictions" line, you can
|
||||
add the "check_policy_service" command anywhere *after* the line which
|
||||
reads "reject_unauth_destination" (otherwise you're system can become an
|
||||
open relay).
|
||||
|
||||
smtpd_recipient_restrictions =
|
||||
...
|
||||
reject_unauth_destination
|
||||
check_policy_service unix:private/policyd-spf
|
||||
...
|
||||
|
||||
policyd-spf_time_limit = 3600
|
||||
|
||||
3. Please consult the postfix documentation for more information on these and
|
||||
other settings you may wish to have in the "smtpd_recipient_restrictions"
|
||||
configuration.
|
||||
|
||||
4. Reload postfix.
|
||||
|
||||
#
|
||||
# Automatically starting pyspf-milter at boot time.
|
||||
#
|
||||
|
||||
Add 'pyspf_milter_enable="YES"' to /etc/rc.conf.
|
||||
|
||||
#
|
||||
# Using pyspf-milter with Sendmail
|
||||
#
|
||||
|
||||
Following is an example configuration line to include in your sendmail.mc.
|
||||
|
||||
INPUT_MAIL_FILTER(`pyspf-milter', `S=local:/var/run/pyspf-milter/pyspf-milter.sock')dnl
|
||||
|
||||
#
|
||||
# Using pyspf-milter with Postfix
|
||||
#
|
||||
|
||||
Integration of pyspf-milter into Postfix is like any milter (See Postfix's
|
||||
README_FILES/MILTER_README). But care is required to segregate outbound mail
|
||||
from inbound mail to be checked. Here is example using milter macros to keep
|
||||
the mail streams segregated.
|
||||
|
||||
%%PREFIX%%/etc/postfix/main.cf:
|
||||
|
||||
smtpd_milters = unix:/var/run/pyspf-milter/pyspf-milter.sock
|
||||
|
||||
%%PREFIX%%/etc/postfix/master.cf:
|
||||
|
||||
smtp inet n - - - - smtpd
|
||||
...
|
||||
-o milter_macro_daemon_name=VERIFYING
|
||||
...
|
||||
|
||||
%%PREFIX%%/etc/python-policyd-spf/policyd-spf.conf:
|
||||
|
||||
MacroList daemon_name|VERIFYING
|
||||
|
||||
EOM
|
||||
}
|
||||
]
|
|
@ -0,0 +1,42 @@
|
|||
#!/bin/sh
|
||||
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: pyspf_milter
|
||||
# REQUIRE: LOGIN
|
||||
# BEFORE: mail
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf to enable pyspf_milter:
|
||||
#
|
||||
# pyspf_milter_enable (bool) Set to 'YES' to enable.
|
||||
# Default: NO
|
||||
# pyspf_milter_conffile (path) Location of configuration file.
|
||||
# Default: %%PREFIX%%/etc/python-policyd-spf/policyd-spf.conf
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=pyspf_milter
|
||||
rcvar=pyspf_milter_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${pyspf_milter_enable:=NO}
|
||||
: ${pyspf_milter_conffile:=%%PREFIX%%/etc/python-policyd-spf/policyd-spf.conf}
|
||||
|
||||
command=/usr/sbin/daemon
|
||||
command_interpreter=%%PYTHON_CMD%%
|
||||
procname=%%PREFIX%%/bin/pyspf-milter
|
||||
command_args="-c -f ${procname} ${pyspf_milter_conffile}"
|
||||
pidfile=%%PYSPF_MILTER_RUNDIR%%/pyspf-milter.pid
|
||||
required_dirs=%%PYSPF_MILTER_RUNDIR%%
|
||||
required_files=${pyspf_milter_conffile}
|
||||
start_precmd=pyspf_milter_cleanup
|
||||
stop_postcmd=pyspf_milter_cleanup
|
||||
|
||||
pyspf_milter_cleanup ()
|
||||
{
|
||||
rm -f ${pidfile}
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
|
@ -0,0 +1,8 @@
|
|||
This project provides the SPF (Sender Policy Framework) back-end for both
|
||||
pypolicyd-spf (for which it was originally developed) and an future SPF
|
||||
milter using pymilter. The goal is to provide a common back-end for common
|
||||
features for support SPF integration with Postfix and Sendmail using both
|
||||
the Postfix policy service and the Sendmail milter protocol (also available
|
||||
with Postfix).
|
||||
|
||||
WWW: https://launchpad.net/spf-engine
|
Loading…
Reference in New Issue