aboutsummaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorYasuhiro Kimura <yasu@FreeBSD.org>2023-01-11 11:05:46 +0000
committerYasuhiro Kimura <yasu@FreeBSD.org>2023-02-27 01:45:15 +0000
commitf32e5a0b505a1a398b34fc86578c827d4a66a531 (patch)
tree3bcd4b3257a25d38193af0aabd03d55278bdead2 /mail
parent4ae489c62e3caf2451e9166385dd7e8ca72e1365 (diff)
downloadports-f32e5a0b505a1a398b34fc86578c827d4a66a531.tar.gz
ports-f32e5a0b505a1a398b34fc86578c827d4a66a531.zip
mail/py-spf-engine: Update to 3.0.3
* Since 3.0.0 spf-engine uses flit-core as build backend. So switch to use 'USE_PYTHON=pep517'. * Add entry to UPDATING as default configuration file path of pyspf-milter has changed. ChangeLog: https://git.launchpad.net/spf-engine/tree/CHANGES?h=3.0.3
Diffstat (limited to 'mail')
-rw-r--r--mail/py-spf-engine/Makefile31
-rw-r--r--mail/py-spf-engine/distinfo6
-rw-r--r--mail/py-spf-engine/files/patch-data_etc_pyspf-milter_pyspf-milter.conf14
-rw-r--r--mail/py-spf-engine/files/patch-data_share_doc_python-policyd-spf_README.per__user__whitelisting67
-rw-r--r--mail/py-spf-engine/files/patch-data_share_man_man1_policyd-spf.1 (renamed from mail/py-spf-engine/files/patch-policyd-spf.1)28
-rw-r--r--mail/py-spf-engine/files/patch-data_share_man_man5_policyd-spf.conf.5 (renamed from mail/py-spf-engine/files/patch-policyd-spf.conf.5)17
-rw-r--r--mail/py-spf-engine/files/patch-data_share_man_man5_policyd-spf.peruser.5 (renamed from mail/py-spf-engine/files/patch-policyd-spf.peruser.5)8
-rw-r--r--mail/py-spf-engine/files/patch-setup.py16
-rw-r--r--mail/py-spf-engine/files/patch-spf__engine_milter__spf.py4
-rw-r--r--mail/py-spf-engine/files/patch-spf__engine_policydspfsupp.py20
-rw-r--r--mail/py-spf-engine/files/pyspf-milter.in4
11 files changed, 134 insertions, 81 deletions
diff --git a/mail/py-spf-engine/Makefile b/mail/py-spf-engine/Makefile
index 89d49ee396e5..200f0fdf2893 100644
--- a/mail/py-spf-engine/Makefile
+++ b/mail/py-spf-engine/Makefile
@@ -1,6 +1,5 @@
PORTNAME= spf-engine
-DISTVERSION= 2.9.3
-PORTREVISION= 1
+DISTVERSION= 3.0.3
CATEGORIES= mail python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -12,14 +11,14 @@ WWW= https://launchpad.net/spf-engine
LICENSE= APACHE20 GPLv2+
LICENSE_COMB= multi
LICENSE_FILE_APACHE20= ${WRKSRC}/COPYING
-LICENSE_FILE_GPLv2+ = ${WRKSRC}/GPL-2
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}flit-core>=3.8<4:devel/py-flit-core@${PY_FLAVOR}
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_PYTHON= autoplist pep517
USE_RC_SUBR= pyspf-milter
SHEBANG_FILES= spf_engine/milter_spf.py spf_engine/policyd_spf.py
@@ -32,23 +31,33 @@ USERS= pyspf-milter
GROUPS= pyspf-milter
PLIST_FILES= '@dir(${USERS},${GROUPS},755) /var/run/pyspf-milter' \
+ '@sample etc/pyspf-milter/pyspf-milter.conf.sample' \
'@sample etc/python-policyd-spf/policyd-spf.conf.sample'
-PORTDOCS= CHANGES README README.per_user_whitelisting \
- policyd-spf.conf.commented
+PORTDOCS= CHANGES README.per_user_whitelisting README.txt
OPTIONS_DEFINE= DOCS
post-patch:
- @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" \
- ${WRKSRC}/spf_engine/milter_spf.py ${WRKSRC}/spf_engine/policyd_spf.py \
- ${WRKSRC}/policyd-spf.1 ${WRKSRC}/policyd-spf.conf.5 \
- ${WRKSRC}/policyd-spf.peruser.5
+ @${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|g" \
+ ${WRKSRC}/data/share/doc/python-policyd-spf/README.per_user_whitelisting \
+ ${WRKSRC}/data/share/man/man1/policyd-spf.1 \
+ ${WRKSRC}/data/share/man/man5/policyd-spf.conf.5 \
+ ${WRKSRC}/data/share/man/man5/policyd-spf.peruser.5 \
+ ${WRKSRC}/spf_engine/milter_spf.py ${WRKSRC}/spf_engine/policyd_spf.py
@${FIND} ${WRKSRC} \( -name '*.bak' -or -name '*.orig' \) -delete
+ @${MV} ${WRKSRC}/data/etc/pyspf-milter/pyspf-milter.conf \
+ ${WRKSRC}/data/etc/python-policyd-spf/policyd-spf.conf \
+ ${WRKSRC}/data/share/doc/python-policyd-spf/README.per_user_whitelisting \
+ ${WRKSRC}
+ @${RM} -r ${WRKSRC}/data/etc/init.d ${WRKSRC}/data/etc/pyspf-milter \
+ ${WRKSRC}/data/lib ${WRKSRC}/data/share/doc
post-install:
@${MKDIR} ${STAGEDIR}/var/run/pyspf-milter \
- ${STAGEDIR}${PREFIX}/etc/python-policyd-spf
+ ${STAGEDIR}${PREFIX}/etc/pyspf-milter
+ ${INSTALL_DATA} ${WRKSRC}/pyspf-milter.conf \
+ ${STAGEDIR}${PREFIX}/etc/pyspf-milter/pyspf-milter.conf.sample
${INSTALL_DATA} ${WRKSRC}/policyd-spf.conf \
${STAGEDIR}${PREFIX}/etc/python-policyd-spf/policyd-spf.conf.sample
diff --git a/mail/py-spf-engine/distinfo b/mail/py-spf-engine/distinfo
index 00b04979b973..d68cbc3c5ca6 100644
--- a/mail/py-spf-engine/distinfo
+++ b/mail/py-spf-engine/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1644313848
-SHA256 (spf-engine-2.9.3.tar.gz) = c3435bf8bfceb3728f02910da329710956820f816f826be97d5bf00a4b762031
-SIZE (spf-engine-2.9.3.tar.gz) = 52974
+TIMESTAMP = 1676891712
+SHA256 (spf-engine-3.0.3.tar.gz) = 164c416eff2b730b0ee4557638c83273c929bd8854571c8cfe2910ee8015b697
+SIZE (spf-engine-3.0.3.tar.gz) = 61350
diff --git a/mail/py-spf-engine/files/patch-data_etc_pyspf-milter_pyspf-milter.conf b/mail/py-spf-engine/files/patch-data_etc_pyspf-milter_pyspf-milter.conf
new file mode 100644
index 000000000000..f392fd100829
--- /dev/null
+++ b/mail/py-spf-engine/files/patch-data_etc_pyspf-milter_pyspf-milter.conf
@@ -0,0 +1,14 @@
+--- data/etc/pyspf-milter/pyspf-milter.conf.orig 2022-12-08 13:45:03 UTC
++++ data/etc/pyspf-milter/pyspf-milter.conf
+@@ -12,9 +12,9 @@ TempError_Defer = False
+ skip_addresses = 127.0.0.0/8,::ffff:127.0.0.0/104,::1
+
+ # Milter specific options
+-#Socket = local:/run/pyspf-milter/pyspf-milter.sock
++#Socket = local:/var/run/pyspf-milter/pyspf-milter.sock
+ Socket = inet:8893@localhost
+-PidFile = /run/pyspf-milter/pyspf-milter.pid
++PidFile = /var/run/pyspf-milter/pyspf-milter.pid
+ UserID = pyspf-milter
+ InternalHosts = 127.0.0.1
+ #MacroListVerify =
diff --git a/mail/py-spf-engine/files/patch-data_share_doc_python-policyd-spf_README.per__user__whitelisting b/mail/py-spf-engine/files/patch-data_share_doc_python-policyd-spf_README.per__user__whitelisting
new file mode 100644
index 000000000000..8f4a8b232283
--- /dev/null
+++ b/mail/py-spf-engine/files/patch-data_share_doc_python-policyd-spf_README.per__user__whitelisting
@@ -0,0 +1,67 @@
+--- data/share/doc/python-policyd-spf/README.per_user_whitelisting.orig 2022-11-26 19:39:57 UTC
++++ data/share/doc/python-policyd-spf/README.per_user_whitelisting
+@@ -11,7 +11,7 @@ The Postfix RESTRICTION_CLASS_README opens with the fo
+ illustrating the use of different restrictions for different
+ recipients.
+
+- /etc/postfix/main.cf:
++ %%PREFIX%%/etc/postfix/main.cf:
+ smtpd_restriction_classes = restrictive, permissive
+ # With Postfix < 2.3 specify reject_unknown_client.
+ restrictive = reject_unknown_sender_domain
+@@ -21,9 +21,9 @@ recipients.
+ smtpd_recipient_restrictions
+ permit_mynetworks
+ reject_unauth_destination
+- check_recipient_access hash:/etc/postfix/recipient_access
++ check_recipient_access hash:%%PREFIX%%/etc/postfix/recipient_access
+
+- /etc/postfix/recipient_access:
++ %%PREFIX%%/etc/postfix/recipient_access:
+ joe@my.domain permissive
+ jane@my.domain restrictive
+
+@@ -31,21 +31,21 @@ The example below illustrates using this policy-spf da
+ Postfix "check_policy_service" access restriction to apply the
+ "permissive" restriction only to messages getting SPF Pass.
+
+- /etc/python-policyd-spf/policyd-spf.conf:
++ %%PREFIX%%/etc/python-policyd-spf/policyd-spf.conf:
+ HELO_pass_restriction = spf_fin, passed_spf
+ Mail_From_pass_restriction = spf_fin, passed_spf
+
+- /etc/python-policyd-spf/policyd-spf-fin.conf:
++ %%PREFIX%%/etc/python-policyd-spf/policyd-spf-fin.conf:
+ HELO_reject = False
+ Mail_From_reject = False
+
+- /etc/postfix/master.cf:
++ %%PREFIX%%/etc/postfix/master.cf:
+ policyd-spf unix - n n - 0 spawn
+ user=nobody argv=/usr/bin/policyd-spf
+ policyd-spf-fin unix - n n - 0 spawn
+- user=nobody argv=/usr/bin/policyd-spf /etc/python-policyd-spf/policyd-spf-fin.conf
++ user=nobody argv=%%PREFIX%%/bin/policyd-spf %%PREFIX%%/etc/python-policyd-spf/policyd-spf-fin.conf
+
+- /etc/postfix/main.cf:
++ %%PREFIX%%/etc/postfix/main.cf:
+ spf_fin = check_policy_service unix:private/policyd-spf-fin
+
+ smtpd_restriction_classes = restrictive, permissive, spf_fin, passed_spf
+@@ -56,7 +56,7 @@ Postfix "check_policy_service" access restriction to a
+ permissive = permit
+
+ passed_spf
+- check_recipient_access hash:/etc/postfix/recipient_access
++ check_recipient_access hash:%%PREFIX%%/etc/postfix/recipient_access
+ restrictive
+
+ smtpd_recipient_restrictions permit_mynetworks
+@@ -67,6 +67,6 @@ Postfix "check_policy_service" access restriction to a
+ policyd-spf_time_limit = 3600
+ policyd-spf-fin_time_limit = 3600
+
+- /etc/postfix/recipient_access:
++ %%PREFIX%%/etc/postfix/recipient_access:
+ joe@my.domain permissive
+ jane@my.domain restrictive
diff --git a/mail/py-spf-engine/files/patch-policyd-spf.1 b/mail/py-spf-engine/files/patch-data_share_man_man1_policyd-spf.1
index 1ab3cd78a9a3..83a738d1d8d8 100644
--- a/mail/py-spf-engine/files/patch-policyd-spf.1
+++ b/mail/py-spf-engine/files/patch-data_share_man_man1_policyd-spf.1
@@ -1,21 +1,21 @@
---- policyd-spf.1.orig 2020-04-18 06:04:36 UTC
-+++ policyd-spf.1
+--- data/share/man/man1/policyd-spf.1.orig 2022-11-30 16:39:53 UTC
++++ data/share/man/man1/policyd-spf.1
@@ -144,12 +144,12 @@ $ policyd-spf (Start using installed config file)
$ policyd-spf \-h (Display usage message)
-$ policyd-spf /etc/policyd-spf/policyd-spf.conf (Config file name to use)
-+$ policyd-spf %%PREFIX%%/etc/python-policyd-spf/policyd-spf.conf (Config file name to use)
++$ policyd-spf %%PREFIX%%/etc/policyd-spf/policyd-spf.conf (Config file name to use)
Configuration options are described in the sample configuration file provided
with the package (policyd-spf.conf.commented) and in policyd-spf.conf(5). The
- provided setup.py installs an uncommented configuration file in
--/etc/policyd-spf/.
-+%%PREFIX%%/etc/python-policyd-spf/.
+ the configuration file provided with the package can generally be found in
+-/usr/local/etc/policyd-spf/, but installation location varies depending on
++%%PREFIX%%/etc/policyd-spf/, but installation location varies depending on
+ installtion method.
Additionally, whitelisting certain IP addresses or IP addresses used by listed
- domains from SPF checks is supported. Skipping SPF checks for local submission
-@@ -186,7 +186,7 @@ script is smoothed over time
+@@ -187,7 +187,7 @@ script is smoothed over time
The default policy_time_limit is 1000 seconds. This may be too short for some
SMTP transactions to complete. As recommended in SMTPD_POLICY_README, this
should be extended to 3600 seconds. To do so, set "policy_time_limit = 3600"
@@ -24,7 +24,7 @@
Messages that get a Fail SPF result will be rejected. Messages that get a
Permerror are, by default, treated as if they had no SPF record. Messages
-@@ -244,10 +244,10 @@ followed by a empty line:
+@@ -245,10 +245,10 @@ followed by a empty line:
.SH "POSTFIX INTEGRATION"
@@ -32,14 +32,14 @@
+ 1. Add the following to %%PREFIX%%/etc/postfix/master.cf:
policyd-spf unix - n n - 0 spawn
-- user=nobody argv=/usr/bin/policyd-spf
-+ user=nobody argv=%%PREFIX%%/bin/policyd-spf
+- user=policyd-spf argv=/usr/bin/policyd-spf
++ user=policyd-spf argv=%%PREFIX%%/bin/policyd-spf
NOTE: Check the path to both the installed Python 3 interpreter and
policyd-spf. These vary from system to system. To use non-default
-@@ -257,7 +257,7 @@ followed by a empty line:
- that instead. Python and Python 3 versions prior to 3.3 are not
- supported.
+@@ -256,7 +256,7 @@ followed by a empty line:
+ policyd-spf.conf(5) for details). Python and Python 3 versions
+ prior to 3.3 are not supported.
- 2. Configure the Postfix policy service in /etc/postfix/main.cf:
+ 2. Configure the Postfix policy service in %%PREFIX%%/etc/postfix/main.cf:
diff --git a/mail/py-spf-engine/files/patch-policyd-spf.conf.5 b/mail/py-spf-engine/files/patch-data_share_man_man5_policyd-spf.conf.5
index 6808c160c5ca..e6af27cd093c 100644
--- a/mail/py-spf-engine/files/patch-policyd-spf.conf.5
+++ b/mail/py-spf-engine/files/patch-data_share_man_man5_policyd-spf.conf.5
@@ -1,24 +1,15 @@
---- policyd-spf.conf.5.orig 2020-04-18 06:04:36 UTC
-+++ policyd-spf.conf.5
+--- data/share/man/man5/policyd-spf.conf.5.orig 2022-12-16 22:56:41 UTC
++++ data/share/man/man5/policyd-spf.conf.5
@@ -137,7 +137,7 @@ policyd-spf python configuration parameters
.SH "USAGE"
Usage:
- policyd-spf [/etc/policyd-spf/policyd-spf.conf]
-+ policyd-spf [%%PREFIX%%/etc/python-policyd-spf/policyd-spf.conf]
++ policyd-spf [%%PREFIX%%/etc/policyd-spf/policyd-spf.conf]
.SH "OTHER DOCUMENTATION"
This documentation assumes you have read Postfix's README_FILES/
-@@ -162,7 +162,7 @@ file.
-
- Configuration options are described here and in the configuration file
- provided with the package. The provided setup.py installs this configuration
--file in /etc/policyd-spf/.
-+file in %%PREFIX%%/etc/python-policyd-spf/.
-
- Additionally, whitelisting certain IP addresses from SPF checks is supported.
- This man page and the sample configuration file show the format to use.
-@@ -684,12 +684,12 @@ visible to milters such as DMARC milter.
+@@ -688,12 +688,12 @@ visible to milters such as DMARC milter.
To use this feature requires additional postfix configuration to execute the
second, mock, instance of the policy server:
diff --git a/mail/py-spf-engine/files/patch-policyd-spf.peruser.5 b/mail/py-spf-engine/files/patch-data_share_man_man5_policyd-spf.peruser.5
index 753aee30c928..daa971c991e7 100644
--- a/mail/py-spf-engine/files/patch-policyd-spf.peruser.5
+++ b/mail/py-spf-engine/files/patch-data_share_man_man5_policyd-spf.peruser.5
@@ -1,11 +1,11 @@
---- policyd-spf.peruser.5.orig 2022-09-05 16:01:49 UTC
-+++ policyd-spf.peruser.5
+--- data/share/man/man5/policyd-spf.peruser.5.orig 2022-11-26 19:39:57 UTC
++++ data/share/man/man5/policyd-spf.peruser.5
@@ -137,7 +137,7 @@ policyd-spf python per-user configuration
.SH "USAGE"
Usage:
- policyd-spf [/etc/policyd-spf/policyd-spf.conf]
-+ policyd-spf [%%PREFIX%%/etc/python-policyd-spf/policyd-spf.conf]
++ policyd-spf [%%PREFIX%%/etc/policyd-spf/policyd-spf.conf]
.SH "OTHER DOCUMENTATION"
This documentation assumes you have read Postfix's README_FILES/
@@ -14,7 +14,7 @@
configuration file:
-"Per_User = text,/etc/pypolicyd-spf/userconf"
-+"Per_User = text,%%PREFIX%%/etc/python-pypolicyd-spf/userconf"
++"Per_User = text,%%PREFIX%%/etc/pypolicyd-spf/userconf"
Lines beginning with "#" are treated as comments and ignored. The location of
the file is determined by the system administrator. No default file is
diff --git a/mail/py-spf-engine/files/patch-setup.py b/mail/py-spf-engine/files/patch-setup.py
deleted file mode 100644
index 1dbd9b028133..000000000000
--- a/mail/py-spf-engine/files/patch-setup.py
+++ /dev/null
@@ -1,16 +0,0 @@
---- 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)',
diff --git a/mail/py-spf-engine/files/patch-spf__engine_milter__spf.py b/mail/py-spf-engine/files/patch-spf__engine_milter__spf.py
index 6c384d78aa85..27d525241b95 100644
--- a/mail/py-spf-engine/files/patch-spf__engine_milter__spf.py
+++ b/mail/py-spf-engine/files/patch-spf__engine_milter__spf.py
@@ -1,6 +1,6 @@
---- spf_engine/milter_spf.py.orig 2022-09-05 15:47:42 UTC
+--- spf_engine/milter_spf.py.orig 2023-01-11 14:35:12 UTC
+++ spf_engine/milter_spf.py
-@@ -207,7 +207,7 @@ class spfMilter(Milter.Base):
+@@ -211,7 +211,7 @@ class spfMilter(Milter.Base):
def main():
# Ugh, but there's no easy way around this.
global milterconfig
diff --git a/mail/py-spf-engine/files/patch-spf__engine_policydspfsupp.py b/mail/py-spf-engine/files/patch-spf__engine_policydspfsupp.py
index 39968058e44d..dbcd7f6de36e 100644
--- a/mail/py-spf-engine/files/patch-spf__engine_policydspfsupp.py
+++ b/mail/py-spf-engine/files/patch-spf__engine_policydspfsupp.py
@@ -1,8 +1,8 @@
---- spf_engine/policydspfsupp.py.orig 2020-04-18 06:04:36 UTC
+--- spf_engine/policydspfsupp.py.orig 2022-12-17 04:55:15 UTC
+++ spf_engine/policydspfsupp.py
-@@ -47,8 +47,8 @@ defaultConfigData = {
- 'No_Mail' : False,
+@@ -49,8 +49,8 @@ defaultConfigData = {
'Mock' : False,
+ 'Queue_ID' : True,
# For milter front end
- 'Socket': 'local:/run/pyspf-milter/pyspf-milter.sock',
- 'PidFile': '/run/pyspf-milter/pyspf-milter.pid',
@@ -10,16 +10,4 @@
+ 'PidFile': '/var/run/pyspf-milter/pyspf-milter.pid',
'UserID': 'pyspf-milter',
'UMask': 7,
- 'InternalHosts': '127.0.0.1',
-@@ -153,9 +153,9 @@ def _readConfigFile(path, configData = None, configGlo
- 'Socket': str,
- 'PidFile': str,
- 'UserID': str,
-- 'UMask': 'int',
-+ 'UMask': int,
- 'InternalHosts': str,
-- 'IntHosts': 'bool',
-+ 'IntHosts': bool,
- 'MacroListVerify': str,
- }
-
+ 'InternalHosts': ['127.0.0.1'],
diff --git a/mail/py-spf-engine/files/pyspf-milter.in b/mail/py-spf-engine/files/pyspf-milter.in
index a21e5a5c4da8..837788fdb13a 100644
--- a/mail/py-spf-engine/files/pyspf-milter.in
+++ b/mail/py-spf-engine/files/pyspf-milter.in
@@ -10,7 +10,7 @@
# 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
+# Default: %%PREFIX%%/pyspf-milter/pyspf-milter.conf
. /etc/rc.subr
@@ -20,7 +20,7 @@ rcvar=pyspf_milter_enable
load_rc_config $name
: ${pyspf_milter_enable:=NO}
-: ${pyspf_milter_conffile:=%%PREFIX%%/etc/python-policyd-spf/policyd-spf.conf}
+: ${pyspf_milter_conffile:=%%PREFIX%%/etc/pyspf-milter/pyspf-milter.conf}
command=/usr/sbin/daemon
command_interpreter=%%PYTHON_CMD%%