pkgsrc-Changes archive

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

CVS commit: [pkgsrc-2017Q1] pkgsrc/mail/qmail



Module Name:    pkgsrc
Committed By:   bsiegert
Date:           Mon Apr 17 16:08:22 UTC 2017

Modified Files:
        pkgsrc/mail/qmail [pkgsrc-2017Q1]: Makefile PLIST distinfo options.mk
        pkgsrc/mail/qmail/patches [pkgsrc-2017Q1]: patch-auto__uids.c
            patch-auto__uids.h
Added Files:
        pkgsrc/mail/qmail [pkgsrc-2017Q1]: MESSAGE.srs
        pkgsrc/mail/qmail/files [pkgsrc-2017Q1]: README.srs

Log Message:
Pullup ticket #5254 - requested by schmonz
mail/qmail: build fix

Revisions pulled up:
- mail/qmail/MESSAGE.srs                                        1.1
- mail/qmail/Makefile                                           1.81-1.84
- mail/qmail/PLIST                                              1.17
- mail/qmail/distinfo                                           1.32-1.33
- mail/qmail/files/README.srs                                   1.1-1.2
- mail/qmail/options.mk                                         1.39-1.40
- mail/qmail/patches/patch-auto__uids.c                         1.2
- mail/qmail/patches/patch-auto__uids.h                         1.2

---
   Module Name: pkgsrc
   Committed By:        schmonz
   Date:                Fri Mar 31 13:52:00 UTC 2017

   Modified Files:
        pkgsrc/mail/qmail: Makefile PLIST distinfo options.mk
   Added Files:
        pkgsrc/mail/qmail: MESSAGE.srs
        pkgsrc/mail/qmail/files: README.srs

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

---
   Module Name: pkgsrc
   Committed By:        schmonz
   Date:                Tue Apr  4 07:50:18 UTC 2017

   Modified Files:
        pkgsrc/mail/qmail: Makefile distinfo options.mk
        pkgsrc/mail/qmail/patches: patch-auto__uids.c patch-auto__uids.h

   Log Message:
   Substitute configured qmail users and groups (defaults haven't changed).
   Bump dependency on queue-fix to a version that does likewise.
   Bump PKGREVISION.

---
   Module Name: pkgsrc
   Committed By:        schmonz
   Date:                Tue Apr  4 14:58:06 UTC 2017

   Modified Files:
        pkgsrc/mail/qmail: Makefile
        pkgsrc/mail/qmail/files: README.srs

   Log Message:
   Give absolute path to srsfilter. From Nathan Arthur in private mail.

---
   Module Name: pkgsrc
   Committed By:        schmonz
   Date:                Sat Apr  8 18:22:51 UTC 2017

   Modified Files:
        pkgsrc/mail/qmail: Makefile

   Log Message:
   Remove dependency on sysutils/checkpassword. In the default install it's
   used only for qmail-pop3d, which is likely not being used much anymore.
   Other installs might need a different implementation of checkpassword
   anyhow. And this implementation is not (yet?) in the public domain, so
   it's blocking us from publishing binary packages of qmail.

   Unless (until?) sysutils/checkpassword becomes "public-domain", it
   remains under "djb-nonlicense". If you continue to need it, since you've
   already accepted the nonlicense, simply install it directly.

   I believe this package and all its remaining dependencies are now in
   DEFAULT_ACCEPTABLE_LICENSES. Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.2 pkgsrc/mail/qmail/MESSAGE.srs
cvs rdiff -u -r1.80 -r1.80.2.1 pkgsrc/mail/qmail/Makefile
cvs rdiff -u -r1.16 -r1.16.24.1 pkgsrc/mail/qmail/PLIST
cvs rdiff -u -r1.31 -r1.31.2.1 pkgsrc/mail/qmail/distinfo
cvs rdiff -u -r1.38 -r1.38.2.1 pkgsrc/mail/qmail/options.mk
cvs rdiff -u -r0 -r1.2.2.2 pkgsrc/mail/qmail/files/README.srs
cvs rdiff -u -r1.1 -r1.1.2.1 pkgsrc/mail/qmail/patches/patch-auto__uids.c \
    pkgsrc/mail/qmail/patches/patch-auto__uids.h

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

Modified files:

Index: pkgsrc/mail/qmail/Makefile
diff -u pkgsrc/mail/qmail/Makefile:1.80 pkgsrc/mail/qmail/Makefile:1.80.2.1
--- pkgsrc/mail/qmail/Makefile:1.80     Wed Mar 29 13:26:05 2017
+++ pkgsrc/mail/qmail/Makefile  Mon Apr 17 16:08:22 2017
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.80 2017/03/29 13:26:05 schmonz Exp $
+# $NetBSD: Makefile,v 1.80.2.1 2017/04/17 16:08:22 bsiegert Exp $
 #
 
 DISTNAME=              ${PKGNAME_NOREV}
 PKGNAME=               qmail-1.03
-PKGREVISION=           24
+PKGREVISION=           27
 CATEGORIES=            mail
 MASTER_SITES=          http://qmail.org/
 
@@ -12,9 +12,8 @@ HOMEPAGE=             http://cr.yp.to/qmail.html
 COMMENT=               Secure, reliable, efficient, simple, and fast MTA
 LICENSE=               public-domain
 
-DEPENDS+=              checkpassword-[0-9]*:../../sysutils/checkpassword
 DEPENDS+=              daemontools-[0-9]*:../../sysutils/daemontools
-DEPENDS+=              queue-fix-[0-9]*:../../mail/queue-fix
+DEPENDS+=              queue-fix>=1.4nb1:../../mail/queue-fix
 DEPENDS+=              ucspi-tcp-[0-9]*:../../net/ucspi-tcp
 
 CONFLICTS+=            courier-maildirmake-[0-9]*
@@ -29,6 +28,16 @@ WRKSRC=                      ${WRKDIR}/${DISTNAME}
 USE_TOOLS+=            nroff
 
 DJB_CONFIG_CMDS=       ${ECHO} ${DESTDIR:Q}${QMAILDIR:Q} > conf-destdir;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_ALIAS_USER:Q}     > conf-users;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_DAEMON_USER:Q}   >> conf-users;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_LOG_USER:Q}      >> conf-users;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_ROOT_USER:Q}     >> conf-users;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_PASSWD_USER:Q}   >> conf-users;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_QUEUE_USER:Q}    >> conf-users;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_REMOTE_USER:Q}   >> conf-users;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_SEND_USER:Q}     >> conf-users;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_QMAIL_GROUP:Q}    > conf-groups;
+DJB_CONFIG_CMDS+=      ${ECHO} ${QMAIL_NOFILES_GROUP:Q} >> conf-groups;
 DJB_BUILD_TARGETS=     man
 INSTALL_TARGET=                setup
 DJB_RESTRICTED=                no
@@ -42,6 +51,7 @@ DOCDIR=                       ${PREFIX}/share/doc/qmail
 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}
@@ -65,6 +75,10 @@ INSTALLATION_DIRS+=  ${EGDIR}/users
 .include "../../mk/bsd.prefs.mk"
 
 BUILD_DEFS+=           QMAILDIR QMAIL_QUEUE_DIR QMAIL_QUEUE_EXTRA
+BUILD_DEFS+=           QMAIL_ALIAS_USER QMAIL_DAEMON_USER QMAIL_LOG_USER
+BUILD_DEFS+=           QMAIL_ROOT_USER QMAIL_PASSWD_USER QMAIL_QUEUE_USER
+BUILD_DEFS+=           QMAIL_REMOTE_USER QMAIL_SEND_USER
+BUILD_DEFS+=           QMAIL_QMAIL_GROUP QMAIL_NOFILES_GROUP
 
 .if !empty(QMAIL_QUEUE_DIR:M${QMAILDIR}/*)
 PKG_FAIL_REASON+=      "QMAIL_QUEUE_DIR must not be under ${QMAILDIR}"
@@ -100,40 +114,63 @@ SUBST_FILES.destdir=      Makefile
 SUBST_SED.destdir=     -e 's|\(^load inst.*\.o\) auto_qmail\.o\(.*\)|\1 auto_destdir.o\2|g'
 SUBST_SED.destdir+=    -e 's|\(^       \./load inst.*\) auto_qmail\.o\(.*\)|\1 auto_destdir.o\2|g'
 
+SUBST_CLASSES+=                groups
+SUBST_STAGE.groups=    do-configure
+SUBST_FILES.groups=    auto_uids.c
+SUBST_SED.groups=      -e 's,@QMAIL_QMAIL_GROUP@,${QMAIL_QMAIL_GROUP:Q},g'
+SUBST_SED.groups+=     -e 's,@QMAIL_NOFILES_GROUP@,${QMAIL_NOFILES_GROUP:Q},g'
+
 SUBST_CLASSES+=                paths
 SUBST_STAGE.paths=     do-configure
-SUBST_FILES.paths=     README.pkgsrc
+SUBST_FILES.paths=     README.*
 SUBST_SED.paths=       -e 's,@PKGNAME@,${PKGNAME:Q},g'
 SUBST_SED.paths+=      -e 's,@PKG_INFO@,${PKG_INFO:Q},g'
+SUBST_SED.paths+=      -e 's,@PREFIX@,${PREFIX:Q},g'
 SUBST_SED.paths+=      -e 's,@GREP@,${GREP:Q},g'
 
+SUBST_CLASSES+=                users
+SUBST_STAGE.users=     do-configure
+SUBST_FILES.users=     auto_uids.c
+SUBST_SED.users=       -e 's,@QMAIL_ROOT_USER@,${QMAIL_ROOT_USER:Q},g'
+SUBST_SED.users+=      -e 's,@QMAIL_ALIAS_USER@,${QMAIL_ALIAS_USER:Q},g'
+SUBST_SED.users+=      -e 's,@QMAIL_DAEMON_USER@,${QMAIL_DAEMON_USER:Q},g'
+SUBST_SED.users+=      -e 's,@QMAIL_LOG_USER@,${QMAIL_LOG_USER:Q},g'
+SUBST_SED.users+=      -e 's,@QMAIL_PASSWD_USER@,${QMAIL_PASSWD_USER:Q},g'
+SUBST_SED.users+=      -e 's,@QMAIL_QUEUE_USER@,${QMAIL_QUEUE_USER:Q},g'
+SUBST_SED.users+=      -e 's,@QMAIL_REMOTE_USER@,${QMAIL_REMOTE_USER:Q},g'
+SUBST_SED.users+=      -e 's,@QMAIL_SEND_USER@,${QMAIL_SEND_USER:Q},g'
+
 SUBST_FILES.djbware+=  cdb_seek.c dns.c
 
-PKG_GROUPS=            qmail nofiles
-PKG_USERS+=            alias:nofiles
-PKG_USERS+=            qmaill:nofiles qmaild:nofiles qmailp:nofiles
-PKG_USERS+=            qmailq:qmail qmailr:qmail qmails:qmail
+PKG_GROUPS=            ${QMAIL_QMAIL_GROUP} ${QMAIL_NOFILES_GROUP}
+PKG_USERS+=            ${QMAIL_ALIAS_USER}:${QMAIL_NOFILES_GROUP}
+PKG_USERS+=            ${QMAIL_DAEMON_USER}:${QMAIL_NOFILES_GROUP}
+PKG_USERS+=            ${QMAIL_LOG_USER}:${QMAIL_NOFILES_GROUP}
+PKG_USERS+=            ${QMAIL_PASSWD_USER}:${QMAIL_NOFILES_GROUP}
+PKG_USERS+=            ${QMAIL_QUEUE_USER}:${QMAIL_QMAIL_GROUP}
+PKG_USERS+=            ${QMAIL_REMOTE_USER}:${QMAIL_QMAIL_GROUP}
+PKG_USERS+=            ${QMAIL_SEND_USER}:${QMAIL_QMAIL_GROUP}
 .for user in ${PKG_USERS:C/\:.*//}
 PKG_HOME.${user}=      ${QMAILDIR}
 .endfor
 PKG_HOME.alias=                ${QMAILDIR}/alias
 
-SPECIAL_PERMS+=                ${PREFIX}/bin/qmail-queue qmailq qmail 04711
+SPECIAL_PERMS+=                ${PREFIX}/bin/qmail-queue ${QMAIL_QUEUE_USER} ${QMAIL_QMAIL_GROUP} 04711
 .for f in qmail-inject qmail-pop3d qmail-qmqpc qmail-qmqpd qmail-qmtpd qmail-qread qmail-qstat qmail-showctl qmail-smtpd qmail-tcpok qmail-tcpto
-SPECIAL_PERMS+=                ${PREFIX}/bin/${f} root qmail 0755
+SPECIAL_PERMS+=                ${PREFIX}/bin/${f} ${QMAIL_ROOT_USER} ${QMAIL_QMAIL_GROUP} 0755
 .endfor
 .for f in qmail-clean qmail-getpw qmail-local qmail-popup qmail-pw2u qmail-remote qmail-rspawn qmail-send splogger
-SPECIAL_PERMS+=                ${PREFIX}/bin/${f} root qmail 0711
+SPECIAL_PERMS+=                ${PREFIX}/bin/${f} ${QMAIL_ROOT_USER} ${QMAIL_QMAIL_GROUP} 0711
 .endfor
 .for f in qmail-lspawn qmail-newmrh qmail-newu qmail-start
-SPECIAL_PERMS+=                ${PREFIX}/bin/${f} root qmail 0700
+SPECIAL_PERMS+=                ${PREFIX}/bin/${f} ${QMAIL_ROOT_USER} ${QMAIL_QMAIL_GROUP} 0700
 .endfor
 
 OPSYSVARS+=            DARWINSUFX
 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 +191,7 @@ pre-install:
        ${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

Index: pkgsrc/mail/qmail/PLIST
diff -u pkgsrc/mail/qmail/PLIST:1.16 pkgsrc/mail/qmail/PLIST:1.16.24.1
--- pkgsrc/mail/qmail/PLIST:1.16        Fri May 30 21:35:04 2014
+++ pkgsrc/mail/qmail/PLIST     Mon Apr 17 16:08:22 2017
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.16 2014/05/30 21:35:04 schmonz Exp $
+@comment $NetBSD: PLIST,v 1.16.24.1 2017/04/17 16:08:22 bsiegert Exp $
 bin/bouncesaying
 bin/condredirect
 bin/datemail
@@ -42,6 +42,7 @@ bin/qreceipt
 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.relaybad
 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

Index: pkgsrc/mail/qmail/distinfo
diff -u pkgsrc/mail/qmail/distinfo:1.31 pkgsrc/mail/qmail/distinfo:1.31.2.1
--- pkgsrc/mail/qmail/distinfo:1.31     Thu Mar 23 07:24:48 2017
+++ pkgsrc/mail/qmail/distinfo  Mon Apr 17 16:08:22 2017
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.31 2017/03/23 07:24:48 schmonz Exp $
+$NetBSD: distinfo,v 1.31.2.1 2017/04/17 16:08:22 bsiegert Exp $
 
 SHA1 (qmail-1.03.tar.gz) = 18fb960481291a0503e93a94df3f6094edb7f27a
 RMD160 (qmail-1.03.tar.gz) = b851f273f1d365d38efd949b1efcf35768ffa30f
@@ -48,9 +48,13 @@ SHA1 (qmail-smtpd.patch) = 2f14d7a98686a
 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
+SHA1 (patch-auto__uids.c) = df4e83de90bfe7845d5e12abd4309258e4eb36b1
+SHA1 (patch-auto__uids.h) = f38c649b05e5540e6e1035edca8b9ac980d9af0b
 SHA1 (patch-hier.c) = 7578a0977f168e337748773d63e57504bf7bf075
 SHA1 (patch-pkgsrc__user__destdir__fake__chown.c) = 3897b81327ca5c59503199d08dd6ed5cdc6a531a
 SHA1 (patch-pkgsrc__user__destdir__fake__uids.h) = 139f6cf38c1b928265a16bd3335b8ce6d7563f96

Index: pkgsrc/mail/qmail/options.mk
diff -u pkgsrc/mail/qmail/options.mk:1.38 pkgsrc/mail/qmail/options.mk:1.38.2.1
--- pkgsrc/mail/qmail/options.mk:1.38   Wed Mar 29 13:26:05 2017
+++ pkgsrc/mail/qmail/options.mk        Mon Apr 17 16:08:22 2017
@@ -1,11 +1,12 @@
-# $NetBSD: options.mk,v 1.38 2017/03/29 13:26:05 schmonz Exp $
+# $NetBSD: options.mk,v 1.38.2.1 2017/04/17 16:08:22 bsiegert 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 @@ PATCHFILES+=         ${OUTGOINGIP_PATCH}
 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 ${QMAIL_ROOT_USER} ${QMAIL_QMAIL_GROUP} 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

Index: pkgsrc/mail/qmail/patches/patch-auto__uids.c
diff -u pkgsrc/mail/qmail/patches/patch-auto__uids.c:1.1 pkgsrc/mail/qmail/patches/patch-auto__uids.c:1.1.2.1
--- pkgsrc/mail/qmail/patches/patch-auto__uids.c:1.1    Fri Mar 10 03:13:29 2017
+++ pkgsrc/mail/qmail/patches/patch-auto__uids.c        Mon Apr 17 16:08:22 2017
@@ -1,8 +1,8 @@
-$NetBSD: patch-auto__uids.c,v 1.1 2017/03/10 03:13:29 schmonz Exp $
+$NetBSD: patch-auto__uids.c,v 1.1.2.1 2017/04/17 16:08:22 bsiegert Exp $
 
 Look up user/group IDs at runtime. Based on Paul Fox's getpwnam.patch.
 
---- auto_uids.c.orig   2017-03-10 01:13:38.000000000 +0000
+--- auto_uids.c.orig   2017-04-04 06:28:23.000000000 +0000
 +++ auto_uids.c
 @@ -0,0 +1,52 @@
 +#include <pwd.h>
@@ -43,16 +43,16 @@ Look up user/group IDs at runtime. Based
 +  if (ids[id] >= 0) return ids[id];
 +
 +  switch(id) {
-+  case ID_OWNER:   ids[id] = name2uid("root"); break;
-+  case ID_ALIAS:   ids[id] = name2uid("alias"); break;
-+  case ID_DAEMON:  ids[id] = name2uid("qmaild"); break;
-+  case ID_LOG:     ids[id] = name2uid("qmaill"); break;
-+  case ID_PW:      ids[id] = name2uid("qmailp"); break;
-+  case ID_QUEUE:   ids[id] = name2uid("qmailq"); break;
-+  case ID_REMOTE:  ids[id] = name2uid("qmailr"); break;
-+  case ID_SEND:    ids[id] = name2uid("qmails"); break;
-+  case ID_QMAIL:   ids[id] = name2gid("qmail"); break;
-+  case ID_NOFILES: ids[id] = name2gid("nofiles"); break;
++  case ID_OWNER:   ids[id] = name2uid("@QMAIL_ROOT_USER@"); break;
++  case ID_ALIAS:   ids[id] = name2uid("@QMAIL_ALIAS_USER@"); break;
++  case ID_DAEMON:  ids[id] = name2uid("@QMAIL_DAEMON_USER@"); break;
++  case ID_LOG:     ids[id] = name2uid("@QMAIL_LOG_USER@"); break;
++  case ID_PASSWD:  ids[id] = name2uid("@QMAIL_PASSWD_USER@"); break;
++  case ID_QUEUE:   ids[id] = name2uid("@QMAIL_QUEUE_USER@"); break;
++  case ID_REMOTE:  ids[id] = name2uid("@QMAIL_REMOTE_USER@"); break;
++  case ID_SEND:    ids[id] = name2uid("@QMAIL_SEND_USER@"); break;
++  case ID_QMAIL:   ids[id] = name2gid("@QMAIL_QMAIL_GROUP@"); break;
++  case ID_NOFILES: ids[id] = name2gid("@QMAIL_NOFILES_GROUP@"); break;
 +  default: _exit(113);
 +  }
 +  return ids[id];
Index: pkgsrc/mail/qmail/patches/patch-auto__uids.h
diff -u pkgsrc/mail/qmail/patches/patch-auto__uids.h:1.1 pkgsrc/mail/qmail/patches/patch-auto__uids.h:1.1.2.1
--- pkgsrc/mail/qmail/patches/patch-auto__uids.h:1.1    Fri Mar 10 03:13:29 2017
+++ pkgsrc/mail/qmail/patches/patch-auto__uids.h        Mon Apr 17 16:08:22 2017
@@ -1,4 +1,4 @@
-$NetBSD: patch-auto__uids.h,v 1.1 2017/03/10 03:13:29 schmonz Exp $
+$NetBSD: patch-auto__uids.h,v 1.1.2.1 2017/04/17 16:08:22 bsiegert Exp $
 
 Look up user/group IDs at runtime. Based on Paul Fox's getpwnam.patch.
 
@@ -20,7 +20,7 @@ Look up user/group IDs at runtime. Based
 +#define ID_ALIAS   1
 +#define ID_DAEMON  2
 +#define ID_LOG     3
-+#define ID_PW      4
++#define ID_PASSWD  4
 +#define ID_QUEUE   5
 +#define ID_REMOTE  6
 +#define ID_SEND    7
@@ -33,7 +33,7 @@ Look up user/group IDs at runtime. Based
 +#define auto_uida qm_id(ID_ALIAS)
 +#define auto_uidd qm_id(ID_DAEMON)
 +#define auto_uidl qm_id(ID_LOG)
-+#define auto_uidp qm_id(ID_PW)
++#define auto_uidp qm_id(ID_PASSWD)
 +#define auto_uidq qm_id(ID_QUEUE)
 +#define auto_uidr qm_id(ID_REMOTE)
 +#define auto_uids qm_id(ID_SEND)

Added files:

Index: pkgsrc/mail/qmail/MESSAGE.srs
diff -u /dev/null pkgsrc/mail/qmail/MESSAGE.srs:1.1.2.2
--- /dev/null   Mon Apr 17 16:08:22 2017
+++ pkgsrc/mail/qmail/MESSAGE.srs       Mon Apr 17 16:08:22 2017
@@ -0,0 +1,8 @@
+===========================================================================
+$NetBSD: MESSAGE.srs,v 1.1.2.2 2017/04/17 16:08:22 bsiegert Exp $
+
+The Sender Rewriting Scheme patch requires configuration.
+
+Please read ${DOCDIR}/README.srs.
+
+===========================================================================

Index: pkgsrc/mail/qmail/files/README.srs
diff -u /dev/null pkgsrc/mail/qmail/files/README.srs:1.2.2.2
--- /dev/null   Mon Apr 17 16:08:22 2017
+++ pkgsrc/mail/qmail/files/README.srs  Mon Apr 17 16:08:22 2017
@@ -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 "| @PREFIX@/bin/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>



Home | Main Index | Thread Index | Old Index