Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Aug 2023 13:41:46 GMT
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 6939cc63bea4 - main - mail/py-dkimpy-milter: New port
Message-ID:  <202308051341.375Dfk2d054870@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by matthew:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6939cc63bea44781023a7605083afd1278eeccb0

commit 6939cc63bea44781023a7605083afd1278eeccb0
Author:     Matthew Seaman <matthew@FreeBSD.org>
AuthorDate: 2023-07-27 19:41:53 +0000
Commit:     Matthew Seaman <matthew@FreeBSD.org>
CommitDate: 2023-08-05 13:41:37 +0000

    mail/py-dkimpy-milter: New port
    
    This is a DKIM signing and verification milter. It has been tested
    with both Postfix and Sendmail.
    
    Of note: this supports RFC8463 ED25519-SHA256 DKIM signatures
---
 GIDs                                         |  2 +-
 UIDs                                         |  2 +-
 mail/Makefile                                |  1 +
 mail/py-dkimpy-milter/Makefile               | 43 +++++++++++++++++++++++++
 mail/py-dkimpy-milter/distinfo               |  3 ++
 mail/py-dkimpy-milter/files/dkimpy-milter.in | 47 ++++++++++++++++++++++++++++
 mail/py-dkimpy-milter/files/patch-setup.py   | 15 +++++++++
 mail/py-dkimpy-milter/pkg-descr              |  2 ++
 8 files changed, 113 insertions(+), 2 deletions(-)

diff --git a/GIDs b/GIDs
index 1bc518eb5105..26cfd95b88d7 100644
--- a/GIDs
+++ b/GIDs
@@ -264,7 +264,7 @@ teleirc:*:320:
 caldera:*:321:
 tlsc:*:322:
 soju:*:323:
-# free: 324
+dkimpy-milter:*:324:
 dkfilter:*:325:
 smfs:*:326:
 _reticulum:*:327:
diff --git a/UIDs b/UIDs
index 6a8d9f320972..61f105288259 100644
--- a/UIDs
+++ b/UIDs
@@ -269,7 +269,7 @@ teleirc:*:320:320::0:0:Telegram and IRC bridge:/nonexistent:/usr/sbin/nologin
 caldera:*:321:321::0:0:Caldera Mitre user:/nonexistent:/usr/sbin/nologin
 tlsc:*:322:322::0:0:TLS connect daemon:/nonexistent:/usr/sbin/nologin
 soju:*:323:323::0:0:soju:/nonexistent:/usr/sbin/nologin
-# free: 324
+dkimpy-milter:*:324:324::0:0:Dkimpy Milter:/nonexistent:/usr/sbin/nologin
 dkfilter:*:325:325::0:0:DK Filter Owner:/nonexistent:/usr/sbin/nologin
 smfs:*:326:326::0:0:SMFSAV Owner:/nonexistent:/usr/sbin/nologin
 _reticulum:*:327:327::0:0:Reticulum Daemon:/nonexistent:/usr/sbin/nologin
diff --git a/mail/Makefile b/mail/Makefile
index 65f3f4bef08b..5ff2034cd6d6 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -500,6 +500,7 @@
     SUBDIR += py-django-mailbox
     SUBDIR += py-django-mailman3
     SUBDIR += py-dkimpy
+    SUBDIR += py-dkimpy-milter
     SUBDIR += py-email-reply-parser
     SUBDIR += py-email-validator
     SUBDIR += py-flanker
diff --git a/mail/py-dkimpy-milter/Makefile b/mail/py-dkimpy-milter/Makefile
new file mode 100644
index 000000000000..52f232855743
--- /dev/null
+++ b/mail/py-dkimpy-milter/Makefile
@@ -0,0 +1,43 @@
+PORTNAME=	dkimpy-milter
+PORTVERSION=	1.2.3
+CATEGORIES=	mail python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	matthew@FreeBSD.org
+COMMENT=	DKIM signing and verification milter
+WWW=		https://launchpad.net/dkimpy-milter
+
+LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+BUILD_DEPENDS=	${PY_SETUPTOOLS}
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}dkimpy>=1.1.0:mail/py-dkimpy@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}milter>=1.0.5:mail/py-milter@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}authres>=1.1.0:mail/py-authres@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pynacl>=0:security/py-pynacl@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}dnspython>=1.16.0:dns/py-dnspython@${PY_FLAVOR}
+
+USES=		python:3.9+	# Some dependencies don't support 3.8
+USE_PYTHON=	autoplist concurrent distutils
+USE_RC_SUBR=	dkimpy-milter
+SUB_LIST+=	PYTHON_CMD=${PYTHON_CMD}
+
+USERS=		dkimpy-milter
+GROUPS=		dkimpy-milter
+
+PYDISTUTILS_CONFIGUREARGS=	expand --rundir=/var/run
+
+NO_ARCH=	yes
+
+PLIST_FILES=	'@dir(${USERS},${GROUPS},755) /var/run/dkimpy-milter' \
+		'@sample etc/dkimpy-milter/dkimpy-milter.conf.sample'
+
+post-install:
+	@${MKDIR} ${STAGEDIR}/var/run/dkimpy-milter \
+	      ${STAGEDIR}${PREFIX}/etc/dkimpy-milter
+	${INSTALL_DATA} ${WRKSRC}/etc/dkimpy-milter.conf \
+	      ${STAGEDIR}${PREFIX}/etc/dkimpy-milter/dkimpy-milter.conf.sample
+
+.include <bsd.port.mk>
diff --git a/mail/py-dkimpy-milter/distinfo b/mail/py-dkimpy-milter/distinfo
new file mode 100644
index 000000000000..e2b7b7751f50
--- /dev/null
+++ b/mail/py-dkimpy-milter/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1690031008
+SHA256 (dkimpy-milter-1.2.3.tar.gz) = cea53d17a7e9e48940c2e8ae549ecfc270876538f1dc82b870dc420a6a0f66ec
+SIZE (dkimpy-milter-1.2.3.tar.gz) = 54972
diff --git a/mail/py-dkimpy-milter/files/dkimpy-milter.in b/mail/py-dkimpy-milter/files/dkimpy-milter.in
new file mode 100644
index 000000000000..e5965e314d85
--- /dev/null
+++ b/mail/py-dkimpy-milter/files/dkimpy-milter.in
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+# PROVIDE: dkimpy_milter
+# REQUIRE: DAEMON
+# BEFORE: mail
+# KEYWORKD: shutdown
+
+# Define these dkimpy_milter_* variables in one of these files:
+#       /etc/rc.conf
+#       /etc/rc.conf.local
+#       /etc/rc.conf.d/dkimpy_milter
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+
+. /etc/rc.subr
+
+name="dkimpy_milter"
+desc="DKIM Milter Daemon"
+rcvar="dkimpy_milter_enable"
+
+load_rc_config $name
+
+: ${dkimpy_milter_enable:="NO"}
+: ${dkimpy_milter_socket:="local:/var/run/dkimpy-milter/dkimpy-milter.sock"}
+: ${dkimpy_milter_pidfile:="/var/run/dkimpy-milter/dkimpy-milter.pid"}
+: ${dkimpy_milter_conffile:="%%PREFIX%%/etc/dkimpy-milter/dkimpy-milter.conf"}
+
+command=/usr/sbin/daemon
+command_interpreter=%%PYTHON_CMD%%
+procname=%%PREFIX%%/bin/dkimpy-milter
+command_args="-c -f ${procname} ${dkimpy_milter_conffile}"
+
+start_precmd=dkimpy_milter_precmd
+stop_postcmd=dkimpy_milter_postcmd
+
+dkimpy_milter_precmd()
+{
+    /bin/rm -f "${dkimpy_milter_pidfile}"
+}
+
+dkimpy_milter_postcmd()
+{
+    /bin/rm -f "${dkimpy_milter_pidfile}"
+}
+
+run_rc_command "$1"
diff --git a/mail/py-dkimpy-milter/files/patch-setup.py b/mail/py-dkimpy-milter/files/patch-setup.py
new file mode 100644
index 000000000000..66ce531e87d5
--- /dev/null
+++ b/mail/py-dkimpy-milter/files/patch-setup.py
@@ -0,0 +1,15 @@
+--- setup.py.orig	2023-02-27 01:07:17 UTC
++++ setup.py
+@@ -118,11 +118,7 @@ setup(
+     include_package_data=True,
+     data_files=[(os.path.join('share', 'man', 'man5'),
+         ['man/dkimpy-milter.conf.5']), (os.path.join('share', 'man', 'man8'),
+-        ['man/dkimpy-milter.8']), (os.path.join('etc', 'dkimpy-milter'),
+-        ['etc/dkimpy-milter.conf']), (os.path.join('lib', 'systemd', 'system'),
+-        ['system/dkimpy-milter.service']),(os.path.join('etc', 'init.d'),
+-        ['system/dkimpy-milter']), (os.path.join('etc', 'init.d'),
+-        ['system/dkimpy-milter.openrc'])],
++        ['man/dkimpy-milter.8'])],
+     zip_safe = False,
+     cmdclass={
+         'expand': FileMacroExpand,
diff --git a/mail/py-dkimpy-milter/pkg-descr b/mail/py-dkimpy-milter/pkg-descr
new file mode 100644
index 000000000000..71748589609d
--- /dev/null
+++ b/mail/py-dkimpy-milter/pkg-descr
@@ -0,0 +1,2 @@
+This is a DKIM signing and verification milter. It has been tested
+with both Postfix and Sendmail.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202308051341.375Dfk2d054870>