Sat Oct 28 04:51:06 2017 UTC ()
Update to 2.1. From the changelog:

- Added support for TLS anonymous authentication.
  Thanks Uffe Jakobsen.
- Fixed sendmail wrapper handling of empty sender on command line.
  Thanks Sebastian Wiedenroth.
- Fixed handling of quoted strings in the "remotes" file.
  Thanks Mihai Moldovan.
- Fixed nullmailer-inject handling of leading "From " lines.
- Some build fixes.
- Fixed bogus temporary gethostbyname error message when the protocol
  source address was incorrect.
- Fixed potential race condition in tests.
  Thanks Felix Lechner.
- Fixed handling of time values on 32-bit big-endian systems.
  Thanks Felix Lechner.
- Added support to nullmailer-send to move permanently failing messages
  out of the queue, and to generate bounce messages.
- Added support for IPv6.
- Added program to generate bounce/delay messages.
- Added an "allmailfrom" control file to nullmailer-queue, causing all
  messages to share a hard-coded envelope sender.
- Added logging the message sender/recipient in nullmailer-send.
- Improved handling of system errors when reading config files.
- Secured handling of password options for protocol modules.
- Support standard shell quoting for options in the "remotes" file.
- Added protocol option to set a separate TLS client private key file.
- Added protocol option to bind the source address on connections.
- Fixed nullmailer-inject to report errors to stderr.
- Fixed gnutls cast to pointer from integer of different size warning.
- Fixed nullmailer-inject and -queue to handle the null (empty) sender
  address. Needed for RFC 3798 (Message Disposition Notification).
- Moved spool directory to /var/spool/nullmailer like other MTAs.


(schmonz)
diff -r1.40 -r1.41 pkgsrc/mail/nullmailer/Makefile
diff -r1.12 -r1.13 pkgsrc/mail/nullmailer/PLIST
diff -r1.18 -r1.19 pkgsrc/mail/nullmailer/distinfo
diff -r1.1 -r1.2 pkgsrc/mail/nullmailer/options.mk
diff -r1.1 -r0 pkgsrc/mail/nullmailer/files/nullmailer-daemon
diff -r1.4 -r1.5 pkgsrc/mail/nullmailer/files/nullmailer.sh
diff -r0 -r1.1 pkgsrc/mail/nullmailer/patches/patch-Makefile.in
diff -r0 -r1.1 pkgsrc/mail/nullmailer/patches/patch-doc_nullmailer-queue.8
diff -r0 -r1.1 pkgsrc/mail/nullmailer/patches/patch-doc_nullmailer-send.8
diff -r0 -r1.1 pkgsrc/mail/nullmailer/patches/patch-src_sendmail.cc
diff -r0 -r1.1 pkgsrc/mail/nullmailer/patches/patch-test_Makefile.am
diff -r0 -r1.1 pkgsrc/mail/nullmailer/patches/patch-test_Makefile.in
diff -r0 -r1.1 pkgsrc/mail/nullmailer/patches/patch-test_functions.in
diff -r1.6 -r0 pkgsrc/mail/nullmailer/patches/patch-aa
diff -r1.6 -r0 pkgsrc/mail/nullmailer/patches/patch-ac
diff -r1.8 -r0 pkgsrc/mail/nullmailer/patches/patch-ab
diff -r1.1 -r1.2 pkgsrc/mail/nullmailer/patches/patch-lib_selfpipe.cc
diff -r1.1 -r0 pkgsrc/mail/nullmailer/patches/patch-src_inject.cc

cvs diff -r1.40 -r1.41 pkgsrc/mail/nullmailer/Makefile (expand / switch to unified diff)

--- pkgsrc/mail/nullmailer/Makefile 2016/12/12 23:54:12 1.40
+++ pkgsrc/mail/nullmailer/Makefile 2017/10/28 04:51:06 1.41
@@ -1,77 +1,73 @@ @@ -1,77 +1,73 @@
1# $NetBSD: Makefile,v 1.40 2016/12/12 23:54:12 wiedi Exp $ 1# $NetBSD: Makefile,v 1.41 2017/10/28 04:51:06 schmonz Exp $
2 2
3DISTNAME= nullmailer-1.13 3DISTNAME= nullmailer-2.1
4PKGREVISION= 4 
5CATEGORIES= mail 4CATEGORIES= mail
6MASTER_SITES= ${HOMEPAGE:Q} 5MASTER_SITES= ${HOMEPAGE:Q}
7DIST_SUBDIR= ${PKGNAME_NOREV} 
8 6
9MAINTAINER= schmonz@NetBSD.org 7MAINTAINER= schmonz@NetBSD.org
10HOMEPAGE= http://untroubled.org/nullmailer/ 8HOMEPAGE= http://untroubled.org/nullmailer/
11COMMENT= Simple relay-only mail transport agent 9COMMENT= Simple relay-only mail transport agent
12 
13LICENSE= gnu-gpl-v2 10LICENSE= gnu-gpl-v2
14 11
15PKG_DESTDIR_SUPPORT= destdir 12DEPENDS+= daemontools-[0-9]*:../../sysutils/daemontools
16 13
17USE_LANGUAGES= c c++ 14USE_LANGUAGES= c c++
 15USE_TOOLS+= gmake
18GNU_CONFIGURE= yes 16GNU_CONFIGURE= yes
19CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} 17CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
20CONFIGURE_ARGS+= --localstatedir=${VARBASE}/spool 18CONFIGURE_ARGS+= --localstatedir=${VARBASE}
21CONFIGURE_ARGS+= --bindir=${PREFIX}/libexec/nullmailer 19CONFIGURE_ARGS+= --bindir=${PREFIX}/libexec/nullmailer
22CONFIGURE_ARGS+= --sbindir=${PREFIX}/libexec/nullmailer 20CONFIGURE_ARGS+= --sbindir=${PREFIX}/libexec/nullmailer
23 21
 22TEST_TARGET= check
 23USE_TOOLS+= bash
 24
24.include "../../mk/bsd.prefs.mk" 25.include "../../mk/bsd.prefs.mk"
25 26
26NULLMAILER_GROUP?= nullmail 
27NULLMAILER_USER?= nullmail 
28PKG_GROUPS= ${NULLMAILER_GROUP} 27PKG_GROUPS= ${NULLMAILER_GROUP}
29PKG_USERS= ${NULLMAILER_USER}:${NULLMAILER_GROUP} 28PKG_USERS= ${NULLMAILER_USER}:${NULLMAILER_GROUP}
30PKG_GROUPS_VARS= NULLMAILER_GROUP 29PKG_GROUPS_VARS= NULLMAILER_GROUP
31PKG_USERS_VARS= NULLMAILER_USER 30PKG_USERS_VARS= NULLMAILER_USER
32 31
33MAKE_ENV+= NULLMAILER_GROUP=${NULLMAILER_GROUP} 32MAKE_ENV+= NULLMAILER_GROUP=${NULLMAILER_GROUP}
34MAKE_ENV+= NULLMAILER_USER=${NULLMAILER_USER} 33MAKE_ENV+= NULLMAILER_USER=${NULLMAILER_USER}
35 34
36FILES_SUBST+= VARBASE=${VARBASE} \ 35FILES_SUBST+= VARBASE=${VARBASE} \
 36 PKGNAME=${PKGNAME} \
37 NULLMAILER_GROUP=${NULLMAILER_GROUP} \ 37 NULLMAILER_GROUP=${NULLMAILER_GROUP} \
38 NULLMAILER_USER=${NULLMAILER_USER} 38 NULLMAILER_USER=${NULLMAILER_USER}
39 39
40RCD_SCRIPTS= nullmailer 40RCD_SCRIPTS= nullmailer
41 41
42MAKE_DIRS+= ${PKG_SYSCONFDIR}/nullmailer 42MAKE_DIRS+= ${PKG_SYSCONFDIR}/nullmailer
43.for i in nullmailer nullmailer/queue nullmailer/tmp 43.for i in nullmailer nullmailer/queue nullmailer/tmp
44OWN_DIRS_PERMS+= ${VARBASE}/spool/${i} ${NULLMAILER_USER} \ 44OWN_DIRS_PERMS+= ${VARBASE}/spool/${i} ${NULLMAILER_USER} \
45 ${NULLMAILER_GROUP} 700 45 ${NULLMAILER_GROUP} 700
46.endfor 46.endfor
47SPECIAL_PERMS+= libexec/nullmailer/mailq \ 47SPECIAL_PERMS+= libexec/nullmailer/mailq \
48 ${NULLMAILER_USER} ${NULLMAILER_GROUP} 4555 48 ${NULLMAILER_USER} ${NULLMAILER_GROUP} 4555
49SPECIAL_PERMS+= libexec/nullmailer/nullmailer-queue \ 49SPECIAL_PERMS+= libexec/nullmailer/nullmailer-queue \
50 ${NULLMAILER_USER} ${NULLMAILER_GROUP} 4555 50 ${NULLMAILER_USER} ${NULLMAILER_GROUP} 4555
51 51
52SUBST_CLASSES+= paths 52SUBST_CLASSES+= paths
53SUBST_FILES.paths= ${WRKDIR}/mailer.conf ${WRKDIR}/nullmailer-daemon 53SUBST_FILES.paths= ${WRKDIR}/mailer.conf
54SUBST_FILES.paths+= doc/nullmailer-send.8 doc/nullmailer-queue.8 54SUBST_FILES.paths+= doc/nullmailer-send.8 doc/nullmailer-queue.8
55SUBST_SED.paths+= -e 's,@PREFIX@,${PREFIX},g' 55SUBST_FILES.paths+= test/functions.in
56SUBST_SED.paths+= -e 's,@VARBASE@,${VARBASE},g' 56SUBST_VARS.paths= PREFIX VARBASE PKG_SYSCONFDIR
57SUBST_SED.paths+= -e 's,@PKG_SYSCONFDIR@,${PKG_SYSCONFDIR},g' 
58SUBST_STAGE.paths= post-configure 57SUBST_STAGE.paths= post-configure
59 58
60INSTALLATION_DIRS= share/doc/${PKGBASE} share/examples/${PKGBASE} 59INSTALLATION_DIRS= share/doc/${PKGBASE} share/examples/${PKGBASE}
61BUILD_DEFS+= VARBASE 60BUILD_DEFS+= VARBASE
62 61
63.include "options.mk" 62.include "options.mk"
64 63
65post-extract: 64post-extract:
66 ${CP} ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf 65 ${CP} ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf
67 ${CP} ${FILESDIR}/nullmailer-daemon ${WRKDIR}/nullmailer-daemon 
68 66
69post-install: 67post-install:
70 cd ${WRKSRC} && ${INSTALL_DATA} AUTHORS BUGS COPYING ChangeLog \ 68 cd ${WRKSRC} && ${INSTALL_DATA} AUTHORS BUGS COPYING ChangeLog \
71 HOWTO NEWS README TODO ${DESTDIR}${PREFIX}/share/doc/nullmailer 69 HOWTO NEWS README TODO ${DESTDIR}${PREFIX}/share/doc/nullmailer
72 ${INSTALL_DATA} ${WRKDIR}/mailer.conf \ 70 ${INSTALL_DATA} ${WRKDIR}/mailer.conf \
73 ${DESTDIR}${PREFIX}/share/examples/nullmailer/ 71 ${DESTDIR}${PREFIX}/share/examples/nullmailer/
74 ${INSTALL_SCRIPT} ${WRKDIR}/nullmailer-daemon \ 
75 ${DESTDIR}${PREFIX}/libexec/nullmailer/ 
76 72
77.include "../../mk/bsd.pkg.mk" 73.include "../../mk/bsd.pkg.mk"

cvs diff -r1.12 -r1.13 pkgsrc/mail/nullmailer/PLIST (expand / switch to unified diff)

--- pkgsrc/mail/nullmailer/PLIST 2014/03/11 14:05:04 1.12
+++ pkgsrc/mail/nullmailer/PLIST 2017/10/28 04:51:06 1.13
@@ -1,23 +1,24 @@ @@ -1,23 +1,24 @@
1@comment $NetBSD: PLIST,v 1.12 2014/03/11 14:05:04 jperkin Exp $ 1@comment $NetBSD: PLIST,v 1.13 2017/10/28 04:51:06 schmonz Exp $
2libexec/nullmailer/mailq 2libexec/nullmailer/mailq
3libexec/nullmailer/nullmailer-daemon 3libexec/nullmailer/nullmailer-dsn
4libexec/nullmailer/nullmailer-inject 4libexec/nullmailer/nullmailer-inject
5libexec/nullmailer/nullmailer-queue 5libexec/nullmailer/nullmailer-queue
6libexec/nullmailer/nullmailer-send 6libexec/nullmailer/nullmailer-send
7libexec/nullmailer/nullmailer-smtpd 7libexec/nullmailer/nullmailer-smtpd
8libexec/nullmailer/qmqp 8libexec/nullmailer/qmqp
9libexec/nullmailer/sendmail 9libexec/nullmailer/sendmail
10libexec/nullmailer/smtp 10libexec/nullmailer/smtp
 11man/man1/nullmailer-dsn.1
11man/man1/nullmailer-inject.1 12man/man1/nullmailer-inject.1
12man/man1/sendmail.1 13man/man1/sendmail.1
13man/man7/nullmailer.7 14man/man7/nullmailer.7
14man/man8/nullmailer-queue.8 15man/man8/nullmailer-queue.8
15man/man8/nullmailer-send.8 16man/man8/nullmailer-send.8
16share/doc/nullmailer/AUTHORS 17share/doc/nullmailer/AUTHORS
17share/doc/nullmailer/BUGS 18share/doc/nullmailer/BUGS
18share/doc/nullmailer/COPYING 19share/doc/nullmailer/COPYING
19share/doc/nullmailer/ChangeLog 20share/doc/nullmailer/ChangeLog
20share/doc/nullmailer/HOWTO 21share/doc/nullmailer/HOWTO
21share/doc/nullmailer/NEWS 22share/doc/nullmailer/NEWS
22share/doc/nullmailer/README 23share/doc/nullmailer/README
23share/doc/nullmailer/TODO 24share/doc/nullmailer/TODO

cvs diff -r1.18 -r1.19 pkgsrc/mail/nullmailer/distinfo (expand / switch to unified diff)

--- pkgsrc/mail/nullmailer/distinfo 2017/02/17 17:08:32 1.18
+++ pkgsrc/mail/nullmailer/distinfo 2017/10/28 04:51:06 1.19
@@ -1,12 +1,15 @@ @@ -1,12 +1,15 @@
1$NetBSD: distinfo,v 1.18 2017/02/17 17:08:32 joerg Exp $ 1$NetBSD: distinfo,v 1.19 2017/10/28 04:51:06 schmonz Exp $
2 2
3SHA1 (nullmailer-1.13/nullmailer-1.13.tar.gz) = e1178fff0395abee2bb6e77c3ddb8a0a7efcc791 3SHA1 (nullmailer-2.1.tar.gz) = 79322908cb242a80f72f8e2888ac870f2f311bcf
4RMD160 (nullmailer-1.13/nullmailer-1.13.tar.gz) = d9f4663351122826299b04a46ffbb2bf51f41687 4RMD160 (nullmailer-2.1.tar.gz) = 834f7d5c8ee387c5d7b15663f0aa00c7f04f795f
5SHA512 (nullmailer-1.13/nullmailer-1.13.tar.gz) = 96dcb3ddecde77a73e5ca1afa5167d35f965d04999f02cc2ef60b54ea7eb7a006e5cf5678fc34a54d4be4f9fd71bd0f784a8671aca40c70dbc307666c548e1d7 5SHA512 (nullmailer-2.1.tar.gz) = 5219e251f6648258247913fcb7036075a482b0800a98cde0d731aa4a6b514baae4d8a340b6757b8d532c4b8343b718642c0f519292e3660f8c04671ac274944b
6Size (nullmailer-1.13/nullmailer-1.13.tar.gz) = 205431 bytes 6Size (nullmailer-2.1.tar.gz) = 255269 bytes
7SHA1 (patch-aa) = 6e8fb0269fcca08fd450b08b865f67ab3bfa1675 7SHA1 (patch-Makefile.in) = 56ce789f85f4feccce623c540dfb41d84e655c1a
8SHA1 (patch-ab) = cb6ed64a5cdf413837710a6f27ea22d1e37fd1b9 8SHA1 (patch-doc_nullmailer-queue.8) = 6d2651b4ebc2500504ce4f5620842ffc6bf0c2f6
9SHA1 (patch-ac) = c542bbf35dfc2148dd133837799b7f4634b66489 9SHA1 (patch-doc_nullmailer-send.8) = 1ab434a1a3293c11db87781217a1694798ba6f23
10SHA1 (patch-lib_fdbuf_fdobuf.h) = 716854a1421ef2021f5383f3e63bd19ece900a23 10SHA1 (patch-lib_fdbuf_fdobuf.h) = 716854a1421ef2021f5383f3e63bd19ece900a23
11SHA1 (patch-lib_selfpipe.cc) = e20596f785a8b6f6621f47408f4a594fc2758ee2 11SHA1 (patch-lib_selfpipe.cc) = a5d7e24bfbf3fa823cbd4e696a1c6488586e3512
12SHA1 (patch-src_inject.cc) = eaffa250d87bb9501e6ccac81c73c1efafb1ad54 12SHA1 (patch-src_sendmail.cc) = 442e2324e082cd6d36057ec1d13ebe5a74a66b77
 13SHA1 (patch-test_Makefile.am) = 744771972ca47f154fbc4d8a59dc0fc9b3c616f8
 14SHA1 (patch-test_Makefile.in) = 5250f65a0758a9442aa6aec076b67af18ea2444c
 15SHA1 (patch-test_functions.in) = 5c8d10eb57fd1fda2bd904b85a0895104525a7a4

cvs diff -r1.1 -r1.2 pkgsrc/mail/nullmailer/options.mk (expand / switch to unified diff)

--- pkgsrc/mail/nullmailer/options.mk 2015/03/11 15:18:51 1.1
+++ pkgsrc/mail/nullmailer/options.mk 2017/10/28 04:51:06 1.2
@@ -1,13 +1,14 @@ @@ -1,13 +1,14 @@
1# $NetBSD: options.mk,v 1.1 2015/03/11 15:18:51 wiedi Exp $ 1# $NetBSD: options.mk,v 1.2 2017/10/28 04:51:06 schmonz Exp $
2 2
3PKG_OPTIONS_VAR= PKG_OPTIONS.nullmailer 3PKG_OPTIONS_VAR= PKG_OPTIONS.nullmailer
4PKG_SUPPORTED_OPTIONS= gnutls 4PKG_SUPPORTED_OPTIONS= gnutls
5PKG_SUGGESTED_OPTIONS= gnutls 5PKG_SUGGESTED_OPTIONS= gnutls
6 6
7.include "../../mk/bsd.options.mk" 7.include "../../mk/bsd.options.mk"
8 8
9.if !empty(PKG_OPTIONS:Mgnutls) 9.if !empty(PKG_OPTIONS:Mgnutls)
10. include "../../security/gnutls/buildlink3.mk" 10. include "../../security/gnutls/buildlink3.mk"
11CONFIGURE_ARGS+= --enable-tls 11CONFIGURE_ARGS+= --enable-tls
 12.else
 13CONFIGURE_ARGS+= --disable-tls
12.endif # option gnutls 14.endif # option gnutls
13 

File Deleted: pkgsrc/mail/nullmailer/files/Attic/nullmailer-daemon

cvs diff -r1.4 -r1.5 pkgsrc/mail/nullmailer/files/nullmailer.sh (expand / switch to unified diff)

--- pkgsrc/mail/nullmailer/files/nullmailer.sh 2009/10/14 21:13:41 1.4
+++ pkgsrc/mail/nullmailer/files/nullmailer.sh 2017/10/28 04:51:06 1.5
@@ -1,28 +1,44 @@ @@ -1,28 +1,44 @@
1#!@RCD_SCRIPTS_SHELL@ 1#!@RCD_SCRIPTS_SHELL@
2# 2#
3# $NetBSD: nullmailer.sh,v 1.4 2009/10/14 21:13:41 plunky Exp $ 3# $NetBSD: nullmailer.sh,v 1.5 2017/10/28 04:51:06 schmonz Exp $
4# 4#
 5# @PKGNAME@ script to control nullmailer (simple relay-only MTA).
 6#
 7
5# PROVIDE: mail 8# PROVIDE: mail
6# REQUIRE: LOGIN 9
 10name="nullmailer"
 11
 12# User-settable rc.conf variables and their default values:
 13: ${nullmailer_postenv:=""}
 14: ${nullmailer_logcmd:="logger -t nb${name} -p mail.info"}
7 15
8if [ -f /etc/rc.subr ]; then 16if [ -f /etc/rc.subr ]; then
9 . /etc/rc.subr 17 . /etc/rc.subr
10fi 18fi
11 19
12name="nullmailer" 
13rcvar=${name} 20rcvar=${name}
14required_files="@PKG_SYSCONFDIR@/nullmailer/remotes" 21required_files="@PKG_SYSCONFDIR@/nullmailer/remotes"
15required_dirs="@VARBASE@/spool/nullmailer/queue @VARBASE@/spool/nullmailer/tmp" 22required_dirs="@VARBASE@/spool/nullmailer/queue @VARBASE@/spool/nullmailer/tmp"
16command="@PREFIX@/libexec/nullmailer/nullmailer-daemon" 23command="@PREFIX@/libexec/nullmailer/nullmailer-send"
17procname="@PREFIX@/libexec/nullmailer/nullmailer-send" 24start_precmd="nullmailer_prestart"
18 25
19nullmailer_user="@NULLMAILER_USER@" 26nullmailer_prestart()
20nullmailer_group="@NULLMAILER_GROUP@" 27{
 28 command="@PREFIX@/bin/pgrphack @SETENV@ - ${nullmailer_postenv}
 29@PREFIX@/bin/setuidgid @NULLMAILER_USER@ @PREFIX@/libexec/nullmailer/nullmailer-send
 302>&1 |
 31@PREFIX@/bin/pgrphack @PREFIX@/bin/setuidgid @NULLMAILER_USER@ ${nullmailer_logcmd}"
 32 command_args="&"
 33 rc_flags=""
 34}
21 35
22if [ -f /etc/rc.subr ]; then 36if [ -f /etc/rc.subr ]; then
23 load_rc_config $name 37 load_rc_config $name
24 run_rc_command "$1" 38 run_rc_command "$1"
25else 39else
26 @ECHO_N@ " ${name}" 40 @ECHO_N@ " ${name}"
27 ${command} ${nullmailer_flags} ${command_args} 41 nullmailer_prestart
 42 eval ${command} ${nullmailer_flags} ${command_args}
 43 nullmailer_poststart
28fi 44fi

File Added: pkgsrc/mail/nullmailer/patches/patch-Makefile.in
$NetBSD: patch-Makefile.in,v 1.1 2017/10/28 04:51:06 schmonz Exp $

Override hard-coded user and group.

--- Makefile.in.orig	2017-10-24 00:12:35.000000000 +0000
+++ Makefile.in
@@ -790,10 +790,10 @@ install-data-local:
 	chmod 600 $(DESTDIR)$(localstatedir)/trigger
 
 install-root:
-	chown nullmail $(DESTDIR)$(localstatedir)/*
-	chown nullmail $(DESTDIR)$(sbindir)/nullmailer-queue
+	chown ${NULLMAILER_USER}:${NULLMAILER_GROUP} $(DESTDIR)$(localstatedir)/*
+	chown ${NULLMAILER_USER}:${NULLMAILER_GROUP} $(DESTDIR)$(sbindir)/nullmailer-queue
 	chmod u+s $(DESTDIR)$(sbindir)/nullmailer-queue
-	chown nullmail $(DESTDIR)$(bindir)/mailq
+	chown ${NULLMAILER_USER}:${NULLMAILER_GROUP} $(DESTDIR)$(bindir)/mailq
 	chmod u+s $(DESTDIR)$(bindir)/mailq
 
 dist-hook:

File Added: pkgsrc/mail/nullmailer/patches/patch-doc_nullmailer-queue.8
$NetBSD: patch-doc_nullmailer-queue.8,v 1.1 2017/10/28 04:51:06 schmonz Exp $

Override hard-coded paths.

--- doc/nullmailer-queue.8.orig	2017-10-24 00:12:30.000000000 +0000
+++ doc/nullmailer-queue.8
@@ -35,13 +35,13 @@ If this file is not empty, its contents 
 sender on all messages.
 .SH OTHER FILES
 .TP
-.B /var/spool/nullmailer/queue
+.B @VARBASE@/spool/nullmailer/queue
 The directory into which the completed messages are moved.
 .TP
-.B /var/spool/nullmailer/tmp
+.B @VARBASE@/spool/nullmailer/tmp
 The directory in which messages are formed temporarily.
 .TP
-.B /var/spool/nullmailer/trigger
+.B @VARBASE@/spool/nullmailer/trigger
 A pipe used to trigger
 .BR nullmailer-send
 to immediately start sending the message from the queue.

File Added: pkgsrc/mail/nullmailer/patches/patch-doc_nullmailer-send.8
$NetBSD: patch-doc_nullmailer-send.8,v 1.1 2017/10/28 04:51:06 schmonz Exp $

Override hard-coded paths.

--- doc/nullmailer-send.8.orig	2017-10-24 00:12:30.000000000 +0000
+++ doc/nullmailer-send.8
@@ -182,19 +182,19 @@ However, the data are integrity protecte
 This option must be used with the insecure option - to acknowledge that you know what you are doing.
 .SH FILES
 .TP
-.B /var/spool/nullmailer/failed
+.B @VARBASE@/spool/nullmailer/failed
 The failed message queue.
 .TP
-.B /var/spool/nullmailer/queue
+.B @VARBASE@/spool/nullmailer/queue
 The outgoing message queue.
 .TP
-.B /var/spool/nullmailer/trigger
+.B @VARBASE@/spool/nullmailer/trigger
 A trigger file to cause immediate delivery.
 .TP
-.B /usr/local/etc/nullmailer
+.B @PKG_SYSCONFDIR@/nullmailer
 The configuration directory.
 .TP
-.B /usr/local/libexec/nullmailer
+.B @PREFIX@/libexec/nullmailer
 The protocol program directory.
 .SH SEE ALSO
 nullmailer-dsn(1),

File Added: pkgsrc/mail/nullmailer/patches/Attic/patch-src_sendmail.cc
$NetBSD: patch-src_sendmail.cc,v 1.1 2017/10/28 04:51:06 schmonz Exp $

Avoid "variable-sized object may not be initialized".

--- src/sendmail.cc.orig	2017-10-25 23:36:35.000000000 +0000
+++ src/sendmail.cc
@@ -111,9 +111,10 @@ int do_exec(const char* program, const c
 
 int cli_main(int argc, char* argv[])
 {
-  const char* extra_args[argc + 5] = {0};
+  const char* extra_args[argc + 5];
   int extra_argc = 1;
 
+  extra_args[0] = 0;
   switch (o_mode) {
   case mode_smtp:
     return do_exec("nullmailer-smtpd", extra_args);

File Added: pkgsrc/mail/nullmailer/patches/patch-test_Makefile.am
$NetBSD: patch-test_Makefile.am,v 1.1 2017/10/28 04:51:06 schmonz Exp $

Use bash explicitly, and avoid GNUism in find(1).

--- test/Makefile.am.orig	2017-10-24 00:12:30.000000000 +0000
+++ test/Makefile.am
@@ -31,5 +31,5 @@ dist-hook:
 check: all
 	./address-test
 	./argparse-test
-	sh $(srcdir)/clitest.sh
-	$(srcdir)/runtests `find $(abs_srcdir)/tests -type f -not -name '.*'`
+	bash $(srcdir)/clitest.sh
+	$(srcdir)/runtests `find $(abs_srcdir)/tests -type f \! -name '.*'`

File Added: pkgsrc/mail/nullmailer/patches/patch-test_Makefile.in
$NetBSD: patch-test_Makefile.in,v 1.1 2017/10/28 04:51:06 schmonz Exp $

Use bash explicitly, and avoid GNUism in find(1).

--- test/Makefile.in.orig	2017-10-24 00:12:35.000000000 +0000
+++ test/Makefile.in
@@ -612,8 +612,8 @@ dist-hook:
 check: all
 	./address-test
 	./argparse-test
-	sh $(srcdir)/clitest.sh
-	$(srcdir)/runtests `find $(abs_srcdir)/tests -type f -not -name '.*'`
+	bash $(srcdir)/clitest.sh
+	$(srcdir)/runtests `find $(abs_srcdir)/tests -type f \! -name '.*'`
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.

File Added: pkgsrc/mail/nullmailer/patches/patch-test_functions.in
$NetBSD: patch-test_functions.in,v 1.1 2017/10/28 04:51:06 schmonz Exp $

Find and use mkfifo(8) and svc(8) for tests.

--- test/functions.in.orig	2017-10-24 02:56:07.000000000 +0000
+++ test/functions.in
@@ -10,7 +10,8 @@ mkdir -p \
     $tmpdir/protocols \
     $QUEUEDIR/{failed,queue,tmp} \
     $SYSCONFDIR
-mknod $QUEUEDIR/trigger p
+export PATH=/sbin:$PATH
+mkfifo $QUEUEDIR/trigger
 ln -s $builddir/src $tmpdir/sbin
 ln -s $builddir/src $tmpdir/bin
 ln -s $builddir/protocols/* $tmpdir/protocols/
@@ -128,7 +129,7 @@ splitblank() {
   done
 }
 
-export PATH=/bin:/usr/bin:/usr/local/bin
+export PATH=/bin:/usr/bin:/usr/local/bin:@PREFIX@/bin
 rm -f $SYSCONFDIR/*
 echo f.q.d.n >$SYSCONFDIR/me
 echo q.d.n >$SYSCONFDIR/defaultdomain

File Deleted: pkgsrc/mail/nullmailer/patches/Attic/patch-aa

File Deleted: pkgsrc/mail/nullmailer/patches/Attic/patch-ac

File Deleted: pkgsrc/mail/nullmailer/patches/Attic/patch-ab

cvs diff -r1.1 -r1.2 pkgsrc/mail/nullmailer/patches/patch-lib_selfpipe.cc (expand / switch to unified diff)

--- pkgsrc/mail/nullmailer/patches/patch-lib_selfpipe.cc 2017/02/17 17:08:32 1.1
+++ pkgsrc/mail/nullmailer/patches/patch-lib_selfpipe.cc 2017/10/28 04:51:06 1.2
@@ -1,12 +1,14 @@ @@ -1,12 +1,14 @@
1$NetBSD: patch-lib_selfpipe.cc,v 1.1 2017/02/17 17:08:32 joerg Exp $ 1$NetBSD: patch-lib_selfpipe.cc,v 1.2 2017/10/28 04:51:06 schmonz Exp $
 2
 3Add missing include.
2 4
3--- lib/selfpipe.cc.orig 2017-02-17 10:54:28.240596810 +0000 5--- lib/selfpipe.cc.orig 2017-02-17 10:54:28.240596810 +0000
4+++ lib/selfpipe.cc 6+++ lib/selfpipe.cc
5@@ -20,6 +20,7 @@ 7@@ -20,6 +20,7 @@
6 // <nullmailer-subscribe@lists.untroubled.org>. 8 // <nullmailer-subscribe@lists.untroubled.org>.
7  9
8 #include <sys/types.h> 10 #include <sys/types.h>
9+#include <sys/time.h> 11+#include <sys/time.h>
10 #include <errno.h> 12 #include <errno.h>
11 #include <fcntl.h> 13 #include <fcntl.h>
12 #include <signal.h> 14 #include <signal.h>

File Deleted: pkgsrc/mail/nullmailer/patches/Attic/patch-src_inject.cc