Index: Makefile =================================================================== RCS file: /home/pcvs/ports/mail/nullmailer/Makefile,v retrieving revision 1.20 diff -u -r1.20 Makefile --- Makefile 15 Apr 2010 15:35:05 -0000 1.20 +++ Makefile 25 Apr 2011 15:03:49 -0000 @@ -7,7 +7,7 @@ PORTNAME= nullmailer PORTVERSION= 1.05 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= mail MASTER_SITES= http://untroubled.org/nullmailer/ \ @@ -25,6 +25,10 @@ .endif USERS= nullmail GROUPS= nullmail +NULLMAIL_UID= 522 +NULLMAIL_GID= 522 + +LICENSE= GPLv2 GNU_CONFIGURE= yes CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} @@ -43,15 +47,22 @@ MAN7= nullmailer.7 MAN8= nullmailer-queue.8 nullmailer-send.8 -# Pass BATCH to pkg-install for Evil Things(tm) -# Pass LOCALSTATEDIR to pkg-install for creating home directory correctly -pre-install: - @BATCH="${BATCH}" LOCALSTATEDIR="${LOCALSTATEDIR}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - post-install: @cd ${WRKSRC} && make install-root @${INSTALL_DATA} -c ${FILESDIR}/remotes.sample ${PREFIX}/etc/nullmailer/ - @BATCH="${BATCH}" NMH_PREFIX="${NMH_PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + +# Append commands that reference the nullmailer user to the plist, because +# we need to ensure that the account has been created by bsd.port.mk by +# the time these are executed. + @${ECHO_CMD} '@exec ${PW} usermod ${USERS} -d ${LOCALSTATEDIR}/nullmailer' >> ${TMPPLIST} + @${ECHO_CMD} '@exec ${CHOWN} ${USERS}:${USERS} ${LOCALSTATEDIR}/nullmailer/queue' >> ${TMPPLIST} + @${ECHO_CMD} '@exec ${CHOWN} ${USERS}:${USERS} ${LOCALSTATEDIR}/nullmailer/tmp' >> ${TMPPLIST} + @${ECHO_CMD} '@exec ${CHOWN} ${USERS}:${USERS} ${LOCALSTATEDIR}/nullmailer/trigger' >> ${TMPPLIST} + @${ECHO_CMD} '@exec ${CHOWN} ${USERS} ${PREFIX}/sbin/nullmailer-queue' >> ${TMPPLIST} + @${ECHO_CMD} '@exec ${CHOWN} ${USERS} ${PREFIX}/libexec/nullmailer/mailq' >> ${TMPPLIST} + @${ECHO_CMD} '@exec ${CHOWN} -R ${USERS} ${LOCALSTATEDIR}/nullmailer' >> ${TMPPLIST} + + @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL @${CAT} ${PKGMESSAGE} .include Index: distinfo =================================================================== RCS file: /home/pcvs/ports/mail/nullmailer/distinfo,v retrieving revision 1.8 diff -u -r1.8 distinfo --- distinfo 29 Oct 2009 00:19:23 -0000 1.8 +++ distinfo 25 Apr 2011 15:03:49 -0000 @@ -1,3 +1,2 @@ -MD5 (nullmailer-1.05.tar.gz) = 35124cc05f893efba1310e2ec7c876ff SHA256 (nullmailer-1.05.tar.gz) = 90356ed2bd95eef09ed04713fdef1f81c1ab95e02eee333a96a8e3eb230cac2f SIZE (nullmailer-1.05.tar.gz) = 176800 Index: pkg-plist =================================================================== RCS file: /home/pcvs/ports/mail/nullmailer/pkg-plist,v retrieving revision 1.7 diff -u -r1.7 pkg-plist --- pkg-plist 15 Jul 2009 05:33:14 -0000 1.7 +++ pkg-plist 25 Apr 2011 15:03:49 -0000 @@ -1,28 +1,25 @@ libexec/nullmailer/smtp libexec/nullmailer/qmqp libexec/nullmailer/mailq +@exec chmod u+s %D/libexec/nullmailer/mailq libexec/nullmailer/sendmail bin/nullmailer-inject sbin/nullmailer-queue +@exec chmod u+s %D/sbin/nullmailer-queue sbin/nullmailer-send -etc/nullmailer/me.sample +@ignore etc/nullmailer/me.sample etc/nullmailer/remotes.sample +@dirrm libexec/nullmailer +@dirrmtry etc/nullmailer +@cwd / @exec mkdir -p %%LOCALSTATEDIR%%/nullmailer/queue @exec chmod 700 %%LOCALSTATEDIR%%/nullmailer/queue +@dirrmtry %%LOCALSTATEDIR%%/nullmailer/queue @exec mkdir -p %%LOCALSTATEDIR%%/nullmailer/tmp @exec chmod 700 %%LOCALSTATEDIR%%/nullmailer/tmp -@exec rm -f %%LOCALSTATEDIR%%/nullmailer/trigger +@dirrmtry %%LOCALSTATEDIR%%/nullmailer/tmp @exec mkfifo %%LOCALSTATEDIR%%/nullmailer/trigger @exec chmod 600 %%LOCALSTATEDIR%%/nullmailer/trigger -@exec chown -R nullmail %%LOCALSTATEDIR%%/nullmailer/* -@exec chown nullmail %D/sbin/nullmailer-queue -@exec chmod u+s %D/sbin/nullmailer-queue -@exec chown nullmail %D/libexec/nullmailer/mailq -@exec chmod u+s %D/libexec/nullmailer/mailq -@unexec if [ -d %%LOCALSTATEDIR%%/nullmailer/queue ]; then rmdir %%LOCALSTATEDIR%%/nullmailer/queue; fi; -@unexec if [ -d %%LOCALSTATEDIR%%/nullmailer/tmp ]; then rmdir %%LOCALSTATEDIR%%/nullmailer/tmp; fi; -@unexec if [ -p %%LOCALSTATEDIR%%/nullmailer/trigger ]; then rm -f %%LOCALSTATEDIR%%/nullmailer/trigger; fi; -@dirrm libexec/nullmailer -@unexec t=`/bin/ls %D/etc/nullmailer`; if [ -z "$t" ]; then echo "Configuration directory is empty, remove it."; rmdir %D/etc/nullmailer; fi; -@unexec if [ -d %%LOCALSTATEDIR%%/nullmailer ]; then rmdir %%LOCALSTATEDIR%%/nullmailer; fi -@unexec if [ -n "$BATCH" ]; then echo "Warning: In batch mode, I will do 'rmuser -y nullmail'"; rmuser -y nullmail; fi; +@unexec rm -f %%LOCALSTATEDIR%%/nullmailer/trigger +@ignore %%LOCALSTATEDIR%%/nullmailer/trigger +@dirrmtry %%LOCALSTATEDIR%%/nullmailer Index: files/nullmailer.in =================================================================== RCS file: /home/pcvs/ports/mail/nullmailer/files/nullmailer.in,v retrieving revision 1.3 diff -u -r1.3 nullmailer.in --- files/nullmailer.in 15 Apr 2010 15:35:05 -0000 1.3 +++ files/nullmailer.in 25 Apr 2011 15:03:49 -0000 @@ -2,7 +2,7 @@ # $FreeBSD: ports/mail/nullmailer/files/nullmailer.in,v 1.3 2010/04/15 15:35:05 glarkin Exp $ # # PROVIDE: nullmailer -# REQUIRE: DAEMON +# REQUIRE: LOGIN # # Add the following line to /etc/rc.conf to enable nullmailer: #