pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Add not quite ready postsrsd-2.0.11



Module Name:	pkgsrc-wip
Committed By:	Martin Husemann <martin%NetBSD.org@localhost>
Pushed By:	martin
Date:		Mon Mar 16 19:27:15 2026 +0100
Changeset:	220bdcaf9e6c5b48138d178e673fd62999238a14

Added Files:
	postsrsd/DESCR
	postsrsd/MESSAGE
	postsrsd/Makefile
	postsrsd/PLIST
	postsrsd/distinfo
	postsrsd/files/postsrsd.sh

Log Message:
Add not quite ready postsrsd-2.0.11

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=220bdcaf9e6c5b48138d178e673fd62999238a14

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 postsrsd/DESCR             |  3 +++
 postsrsd/MESSAGE           | 25 +++++++++++++++++++++++++
 postsrsd/Makefile          | 37 +++++++++++++++++++++++++++++++++++++
 postsrsd/PLIST             |  7 +++++++
 postsrsd/distinfo          |  5 +++++
 postsrsd/files/postsrsd.sh | 44 ++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 121 insertions(+)

diffs:
diff --git a/postsrsd/DESCR b/postsrsd/DESCR
new file mode 100644
index 0000000000..4934de46c7
--- /dev/null
+++ b/postsrsd/DESCR
@@ -0,0 +1,3 @@
+PostSRSd provides the Sender Rewriting Scheme (SRS) via TCP-based
+lookup tables for Postfix. SRS is needed if your mail server acts
+as forwarder.
diff --git a/postsrsd/MESSAGE b/postsrsd/MESSAGE
new file mode 100644
index 0000000000..763df79357
--- /dev/null
+++ b/postsrsd/MESSAGE
@@ -0,0 +1,25 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2021/07/10 08:41:56 spz Exp $
+
+You must store at least one secret key in ${PKG_SYSCONFDIR}/postsrsd.secret.
+Be careful that no one can guess your secret, because anyone who knows it
+can use your mail server as open relay.
+Each line of ${PKG_SYSCONFDIR}/postsrsd.secret is used as secret.
+The first secret is used for signing and verification, the others for
+verification only.
+
+Create a config file in ${PKG_SYSCONFDIR}/postsrsd.conf.
+
+PostSRSd exposes its functionality via two TCP lookup tables.
+Add or amend the following variables in your main.cf:
+
+    sender_canonical_maps = tcp:localhost:10001
+    sender_canonical_classes = envelope_sender
+    recipient_canonical_maps = tcp:localhost:10002
+    recipient_canonical_classes= envelope_recipient,header_recipient
+
+This will transparently rewrite incoming and outgoing envelope addresses,
+and additionally undo SRS rewrites in the To: header of bounce notifications
+and vacation autoreplies.
+
+===========================================================================
diff --git a/postsrsd/Makefile b/postsrsd/Makefile
new file mode 100644
index 0000000000..1f6ed4c61b
--- /dev/null
+++ b/postsrsd/Makefile
@@ -0,0 +1,37 @@
+# $NetBSD: Makefile,v 1.5 2025/08/20 11:35:05 wiz Exp $
+
+DISTNAME=	postsrsd-2.0.11
+#PKGREVISION=	0
+CATEGORIES=	mail
+MASTER_SITES=	${MASTER_SITE_GITHUB:=roehling/}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/roehling/postsrsd
+COMMENT=	Postfix Sender Rewriting Scheme daemon
+LICENSE=	gnu-gpl-v2
+
+RCD_SCRIPTS=	postsrsd
+
+POSTSRSD_USER?=		postsrsd
+POSTSRSD_GROUP?=	postsrsd
+PKG_USERS=		${POSTSRSD_USER}:${POSTSRSD_GROUP}
+PKG_GROUPS=		${POSTSRSD_GROUP}
+USER_GROUP=		${POSTSRSD_USER} ${POSTSRSD_GROUP}
+
+PKG_GECOS.${POSTSRSD_USER}?=	postSRSd
+
+TOOL_DEPENDS+=	help2man-[0-9]*:../../converters/help2man
+
+CMAKE_CONFIGURE_ARGS+=	-DCMAKE_POLICY_VERSION_MINIMUM=3.11 \
+	-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=ALWAYS \
+	-DCMAKE_INSTALL_DATAROOTDIR=${PKGMANDIR} \
+	-DWITH_SQLITE=yes
+
+# this would need a pkg for https://github.com/jons/libmilter
+# CMAKE_CONFIGURE_ARGS+=	-DWITH_MILTER=yes
+
+.include "../../devel/cmake/build.mk"
+.include "../../devel/confuse/buildlink3.mk"
+.include "../../devel/check/buildlink3.mk"
+.include "../../databases/sqlite3/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/postsrsd/PLIST b/postsrsd/PLIST
new file mode 100644
index 0000000000..0f20377fe8
--- /dev/null
+++ b/postsrsd/PLIST
@@ -0,0 +1,7 @@
+@comment $NetBSD: PLIST,v 1.3 2021/07/10 08:41:56 spz Exp $
+man/man8/postsrsd.8
+sbin/postsrsd
+share/doc/postsrsd/README.md
+share/doc/postsrsd/README_UPGRADE.md
+share/doc/postsrsd/main.cf.ex
+share/postsrsd/postsrsd-systemd-launcher
diff --git a/postsrsd/distinfo b/postsrsd/distinfo
new file mode 100644
index 0000000000..b1339e8a09
--- /dev/null
+++ b/postsrsd/distinfo
@@ -0,0 +1,5 @@
+$NetBSD: distinfo,v 1.4 2021/10/26 10:54:22 nia Exp $
+
+BLAKE2s (postsrsd-2.0.11.tar.gz) = 6f9d60a53a03b60674af00bf267f47c691f026835d60c177dbb9b2a352a2744d
+SHA512 (postsrsd-2.0.11.tar.gz) = d85be04decfcf38ac2aaa3435f804106faf37bd51914184f91ff2f130ff39ce4e1b73e9d0748dc57c940bdbc917dddcd25fc8777fcba65e864a1c6f0066c3995
+Size (postsrsd-2.0.11.tar.gz) = 64995 bytes
diff --git a/postsrsd/files/postsrsd.sh b/postsrsd/files/postsrsd.sh
new file mode 100755
index 0000000000..75bd28ab6c
--- /dev/null
+++ b/postsrsd/files/postsrsd.sh
@@ -0,0 +1,44 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# PostSRSd provides the Sender Rewriting Scheme (SRS) for Postfix
+#
+
+# PROVIDE: postsrsd
+# BEFORE: mail
+# REQUIRE: DAEMON LOGIN
+
+. /etc/rc.subr
+
+name="postsrsd"
+
+# user-settable rc.conf variables
+: ${postsrsd_secret:="@PKG_SYSCONFDIR@/${name}.secret"}
+: ${postsrsd_chrootdir:="@VARBASE@/chroot/postsrsd"}
+
+rcvar=${name}
+required_files="${postsrsd_secret}"
+pidfile="@VARBASE@/run/${name}.pid"
+command="@PREFIX@/sbin/${name}"
+start_precmd="postsrsd_precmd"
+
+postsrsd_precmd()
+{
+	rc_flags="-p${pidfile} -s${postsrsd_secret} -D $rc_flags"
+	if [ -z "$postsrsd_chrootdir" ]; then
+		return 0;
+	fi
+
+	# If running in a chroot cage, ensure that the appropriate files
+	# exist inside the cage, as well as helper symlinks into the cage 
+	# from outside.
+	if [ ! -d "${postsrsd_chrootdir}" ]; then
+		mkdir -p "${postsrsd_chrootdir}"
+	fi
+
+	#	Change run_rc_commands()'s internal copy of $ntpd_flags
+	#
+	rc_flags="-upostsrsd -c${postsrsd_chrootdir} $rc_flags"
+}
+
+load_rc_config $name
+run_rc_command "$1"


Home | Main Index | Thread Index | Old Index