pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mail/qmail Add "qmail-srs" option to apply the Sender ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/7abfcbb127c2
branches:  trunk
changeset: 360518:7abfcbb127c2
user:      schmonz <schmonz%pkgsrc.org@localhost>
date:      Fri Mar 31 13:52:00 2017 +0000

description:
Add "qmail-srs" option to apply the Sender Rewriting Scheme patch,
requested by Nathan Arthur. Bump PKGREVISION.

diffstat:

 mail/qmail/MESSAGE.srs      |   8 ++++++
 mail/qmail/Makefile         |   9 +++---
 mail/qmail/PLIST            |   4 ++-
 mail/qmail/distinfo         |   6 +++-
 mail/qmail/files/README.srs |  60 +++++++++++++++++++++++++++++++++++++++++++++
 mail/qmail/options.mk       |  47 +++++++++++++++++++++++++++++++++-
 6 files changed, 126 insertions(+), 8 deletions(-)

diffs (229 lines):

diff -r 6ea21737f641 -r 7abfcbb127c2 mail/qmail/MESSAGE.srs
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/qmail/MESSAGE.srs    Fri Mar 31 13:52:00 2017 +0000
@@ -0,0 +1,8 @@
+===========================================================================
+$NetBSD: MESSAGE.srs,v 1.1 2017/03/31 13:52:00 schmonz Exp $
+
+The Sender Rewriting Scheme patch requires configuration.
+
+Please read ${DOCDIR}/README.srs.
+
+===========================================================================
diff -r 6ea21737f641 -r 7abfcbb127c2 mail/qmail/Makefile
--- a/mail/qmail/Makefile       Fri Mar 31 10:54:57 2017 +0000
+++ b/mail/qmail/Makefile       Fri Mar 31 13:52:00 2017 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.80 2017/03/29 13:26:05 schmonz Exp $
+# $NetBSD: Makefile,v 1.81 2017/03/31 13:52:00 schmonz Exp $
 #
 
 DISTNAME=              ${PKGNAME_NOREV}
 PKGNAME=               qmail-1.03
-PKGREVISION=           24
+PKGREVISION=           25
 CATEGORIES=            mail
 MASTER_SITES=          http://qmail.org/
 
@@ -42,6 +42,7 @@
 EGDIR=                 ${PREFIX}/share/examples/qmail
 SHAREDIR=              ${PREFIX}/share/qmail
 PLIST_SUBST+=          DARWINSUFX=${DARWINSUFX:Q}
+MESSAGE_SRC+=          ${PKGDIR}/MESSAGE
 MESSAGE_SUBST+=                DOCDIR=${DOCDIR:Q} EGDIR=${EGDIR:Q}
 FILES_SUBST+=          DOCDIR=${DOCDIR:Q} EGDIR=${EGDIR:Q}
 FILES_SUBST+=          OPENSSL=${OPENSSL:Q}
@@ -133,7 +134,7 @@
 DARWINSUFX.Darwin=     .doc
 DARWINSUFX.*=          # empty
 
-post-extract: post-extract-viruscan
+post-extract: post-extract-srs post-extract-viruscan
        ${CP} ${FILESDIR}/README.pkgsrc ${WRKSRC}
 .if ${OPSYS} == "Darwin"
 .      for i in INSTALL SENDMAIL
@@ -154,7 +155,7 @@
        ${LN} -s ${DESTDIR}${QMAIL_QUEUE_DIR}   ${DESTDIR}${QMAILDIR}/queue
        ${LN} -s ${DESTDIR}${EGDIR}/users       ${DESTDIR}${QMAILDIR}/users
 
-post-install: post-install-viruscan
+post-install: post-install-srs post-install-viruscan
        ${INSTALL_DATA} ${WRKSRC}/README.pkgsrc ${DESTDIR}${DOCDIR}
 
        ${INSTALL_PROGRAM_DIR} ${DESTDIR}${SHAREDIR}/setup
diff -r 6ea21737f641 -r 7abfcbb127c2 mail/qmail/PLIST
--- a/mail/qmail/PLIST  Fri Mar 31 10:54:57 2017 +0000
+++ b/mail/qmail/PLIST  Fri Mar 31 13:52:00 2017 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.16 2014/05/30 21:35:04 schmonz Exp $
+@comment $NetBSD: PLIST,v 1.17 2017/03/31 13:52:00 schmonz Exp $
 bin/bouncesaying
 bin/condredirect
 bin/datemail
@@ -42,6 +42,7 @@
 bin/qsmhook
 bin/sendmail
 bin/splogger
+${PLIST.srs}bin/srsfilter
 bin/tcp-env
 ${PLIST.tls}bin/update_tmprsadh
 man/man1/bouncesaying.1
@@ -112,6 +113,7 @@
 share/doc/qmail/PIC.relaygood
 share/doc/qmail/PIC.rem2local
 share/doc/qmail/README.pkgsrc
+${PLIST.srs}share/doc/qmail/README.srs
 ${PLIST.qregex}share/doc/qmail/README.qregex
 share/doc/qmail/REMOVE.binmail
 share/doc/qmail/REMOVE.sendmail
diff -r 6ea21737f641 -r 7abfcbb127c2 mail/qmail/distinfo
--- a/mail/qmail/distinfo       Fri Mar 31 10:54:57 2017 +0000
+++ b/mail/qmail/distinfo       Fri Mar 31 13:52:00 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.31 2017/03/23 07:24:48 schmonz Exp $
+$NetBSD: distinfo,v 1.32 2017/03/31 13:52:00 schmonz Exp $
 
 SHA1 (qmail-1.03.tar.gz) = 18fb960481291a0503e93a94df3f6094edb7f27a
 RMD160 (qmail-1.03.tar.gz) = b851f273f1d365d38efd949b1efcf35768ffa30f
@@ -48,6 +48,10 @@
 RMD160 (qmail-smtpd.patch) = a4496ee44f9a4298404c3f75d23dd985f3ff12bb
 SHA512 (qmail-smtpd.patch) = ada4f2ce3972965b02a7acc9a072deeedafd026e19c2c96b8b4059f1f1fab653409f88cd6ee5f1d4a99dd943e018a1cd6296b05d7fd86e83296aa0150227edbe
 Size (qmail-smtpd.patch) = 3716 bytes
+SHA1 (qmail-srs-0.8.patch) = 44d6075fe22d698b21a9045b0cce7f607bc86eee
+RMD160 (qmail-srs-0.8.patch) = cf86dc7874dc116b31bf933f18615c75cfc4c0c4
+SHA512 (qmail-srs-0.8.patch) = a2a6c26a02d1c607f4ed4f73d6c8b57ed6a6c31126f20b073e9cd2258ca43c0da98a67de254df30e07e3887c90239cba0ccf3f45d535f4c66017217da1732f9b
+Size (qmail-srs-0.8.patch) = 25412 bytes
 SHA1 (patch-Makefile) = 7ab7c2893393f42d8587a14a2d0c86c09e60061a
 SHA1 (patch-auto__uids.c) = f900b61e047eb8776e5ff2e0381f2a53d49fafad
 SHA1 (patch-auto__uids.h) = 5041dc91e51fc8413c0bf5e83c3d6b423f71cf86
diff -r 6ea21737f641 -r 7abfcbb127c2 mail/qmail/files/README.srs
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/qmail/files/README.srs       Fri Mar 31 13:52:00 2017 +0000
@@ -0,0 +1,60 @@
+ Configuring SRS
+ ===============
+
+You've applied a Sender Rewriting Scheme patch to your qmail installation.
+It is documented more fully by its author here:
+
+<URL:http://www.mco2.com.br/opensource/qmail/srs/>
+
+
+For qmail to SRS-rewrite your outgoing mail:
+
+# echo "srs.$YOURDOMAIN" > @PKG_SYSCONFDIR@/control/srs_domain
+# echo "$SECRET" > @PKG_SYSCONFDIR@/control/srs_secrets
+
+
+For qmail to accept and SRS-check your incoming mail:
+
+# echo "srs.$YOURDOMAIN" >> @PKG_SYSCONFDIR@/control/rcpthosts
+# echo "srs.$YOURDOMAIN:srs" >> @PKG_SYSCONFDIR@/control/virtualdomains
+# echo "| srsfilter" > @PKG_SYSCONFDIR@/alias/.qmail-srs-default
+
+
+For other MTAs to deliver mail to your SRS subdomain:
+
+- Create a DNS MX record for "srs.$YOURDOMAIN" pointing to your qmail host.
+
+
+Optional configuration parameters:
+
+Maximum permitted age of a rewritten address, in days (libsrs2 defaults to 21):
+# echo 7 > @PKG_SYSCONFDIR@/control/srs_maxage
+
+Length of generated hash in a rewritten address (longer is more secure):
+# echo 4 > @PKG_SYSCONFDIR@/control/srs_hashlength
+
+Minimum length of hash to require when checking an address (can be shorter):
+# echo 4 > @PKG_SYSCONFDIR@/control/srs_hashmin
+
+Separator to appear after SRS[01] in rewritten addresses (-, +, or =):
+# echo = > @PKG_SYSCONFDIR@/control/srs_separator
+
+Skip rcpthosts check and SRS-rewrite all forwarding (1 to enable):
+# echo 0 > @PKG_SYSCONFDIR@/control/srs_alwaysrewrite
+
+
+Environment variables:
+
+With this patch, by default, qmail-inject rewrites the envelope
+sender if and only if EXT and HOST are set.
+
+To always rewrite, even if EXT and HOST are not set, set QMAILINJECT_FORCE_SRS.
+
+To never rewrite, even if EXT and HOST are set, set QMAILINJECT_SKIP_SRS.
+
+
+More about SRS:
+
+- <URL:http://www.openspf.org/SRS>
+- <URL:http://www.libsrs2.org/>
+- <URL:http://wooledge.org/~greg/qmail-srs.html>
diff -r 6ea21737f641 -r 7abfcbb127c2 mail/qmail/options.mk
--- a/mail/qmail/options.mk     Fri Mar 31 10:54:57 2017 +0000
+++ b/mail/qmail/options.mk     Fri Mar 31 13:52:00 2017 +0000
@@ -1,11 +1,12 @@
-# $NetBSD: options.mk,v 1.38 2017/03/29 13:26:05 schmonz Exp $
+# $NetBSD: options.mk,v 1.39 2017/03/31 13:52:00 schmonz Exp $
 
 PKG_OPTIONS_VAR=       PKG_OPTIONS.qmail
 PKG_OPTIONS_OPTIONAL_GROUPS=   rcpt
 PKG_OPTIONS_GROUP.rcpt=        qmail-badrcptto qmail-qregex
 PKG_OPTIONS_GROUP.rcpt+=qmail-rcptcheck qmail-realrcptto
 PKG_SUPPORTED_OPTIONS+=        sasl syncdir tls qmail-bigdns qmail-maildiruniq
-PKG_SUPPORTED_OPTIONS+=        qmail-netqmail qmail-outgoingip qmail-viruscan
+PKG_SUPPORTED_OPTIONS+=        qmail-netqmail qmail-outgoingip
+PKG_SUPPORTED_OPTIONS+=        qmail-srs qmail-viruscan
 PKG_SUGGESTED_OPTIONS+=        qmail-bigdns qmail-netqmail qmail-realrcptto
 
 .include "../../mk/bsd.options.mk"
@@ -42,6 +43,48 @@
 SITES.${OUTGOINGIP_PATCH}=     http://www.qmail.org/
 .endif
 
+PLIST_VARS+=           srs
+.PHONY: post-extract-srs post-install-srs
+.if !empty(PKG_OPTIONS:Mqmail-srs)
+.  include "../../mail/libsrs2/buildlink3.mk"
+SRS_PATCH=             qmail-srs-0.8.patch
+PATCHFILES+=           ${SRS_PATCH}
+SITES.${SRS_PATCH}=    http://www.mco2.com.br/opensource/download/qmail/
+PATCH_DIST_STRIP.${SRS_PATCH}= -p1
+.  if !empty(PKG_OPTIONS:Mqmail-netqmail)
+PATCH_DIST_STRIP.${SRS_PATCH}+=        -l
+SUBST_CLASSES+=                srsnetq1 srsnetq2
+SUBST_STAGE.srsnetq1=  pre-patch
+SUBST_STAGE.srsnetq2=  post-patch
+SUBST_FILES.srsnetq1=  Makefile
+SUBST_FILES.srsnetq2=  Makefile
+SUBST_SED.srsnetq1=    -e 's|^auto_split.o env.a$$|auto_split.o|'
+SUBST_SED.srsnetq2=    -e 's|^auto_split.o$$|auto_split.o env.a|'
+SUBST_SED.srsnetq1+=   -e 's|^ substdio.a error.a str.a fs.a auto_qmail.o auto_split.o env.a$$|        substdio.a error.a str.a fs.a auto_qmail.o auto_split.o|'
+SUBST_SED.srsnetq2+=   -e 's|^ substdio.a error.a str.a fs.a auto_qmail.o auto_split.o \\$$|   substdio.a error.a str.a fs.a auto_qmail.o auto_split.o env.a \\|'
+.  endif
+SUBST_CLASSES+=                srsinclude
+SUBST_STAGE.srsinclude=        do-configure
+SUBST_FILES.srsinclude=        srs.c
+SUBST_SED.srsinclude=  -e 's|/usr/local/include/srs2.h|srs2.h|'
+SUBST_CLASSES+=                srsreadme
+SUBST_STAGE.srsreadme= do-configure
+SUBST_FILES.srsreadme= README.srs
+SUBST_SED.srsreadme=   -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR:Q},g'
+SPECIAL_PERMS+=                ${PREFIX}/bin/srsfilter root qmail 0755
+PLIST.srs=             yes
+MESSAGE_SRC+=          ${PKGDIR}/MESSAGE.srs
+post-extract-srs:
+       ${CP} ${FILESDIR}/README.srs ${WRKSRC}
+post-install-srs:
+       ${INSTALL_DATA} ${WRKSRC}/README.srs ${DESTDIR}${DOCDIR}
+.else
+post-extract-srs:
+       ${DO_NADA}
+post-install-srs:
+       ${DO_NADA}
+.endif
+
 PLIST_VARS+=           qregex
 .if !empty(PKG_OPTIONS:Mqmail-qregex)
 QREGEX_PATCH=          qregex-20060423.patch



Home | Main Index | Thread Index | Old Index