Index: head/mail/nullmailer/Makefile =================================================================== --- head/mail/nullmailer/Makefile (revision 273257) +++ head/mail/nullmailer/Makefile (revision 273258) @@ -1,57 +1,68 @@ # Ports collection makefile for: nullmailer # Date created: Tue Jan 30 2001 # Whom: clive # # $FreeBSD$ # PORTNAME= nullmailer PORTVERSION= 1.05 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= mail MASTER_SITES= http://untroubled.org/nullmailer/ \ http://untroubled.org/nullmailer/archive/ MASTER_SITE_SUBDIR= ${PORTVERSION} MAINTAINER= glarkin@FreeBSD.org COMMENT= MTA for hosts which relay to a fixed set of smart relays LOCALSTATEDIR= /var/spool .if defined(MAINTAINER_MODE) UID_FILES+= ../../UIDs GID_FILES+= ../../GIDs .endif USERS= nullmail GROUPS= nullmail +NULLMAIL_UID= 522 +NULLMAIL_GID= 522 +LICENSE= GPLv2 + GNU_CONFIGURE= yes CONFIGURE_ARGS+= --localstatedir=${LOCALSTATEDIR} USE_SUBMAKE= yes USE_RC_SUBR= ${PORTNAME} SUB_FILES+= pkg-install pkg-deinstall pkg-message PKGINSTALL= ${WRKDIR}/pkg-install PKGMESSAGE= ${WRKDIR}/pkg-message PLIST_SUB+= LOCALSTATEDIR=${LOCALSTATEDIR} SUB_LIST+= LOCALSTATEDIR=${LOCALSTATEDIR} NULLMAIL_USER=${USERS} MAN1= nullmailer-inject.1 sendmail.1 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 Property changes on: head/mail/nullmailer/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.20 \ No newline at end of property +1.21 \ No newline at end of property Index: head/mail/nullmailer/distinfo =================================================================== --- head/mail/nullmailer/distinfo (revision 273257) +++ head/mail/nullmailer/distinfo (revision 273258) @@ -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 Property changes on: head/mail/nullmailer/distinfo ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.8 \ No newline at end of property +1.9 \ No newline at end of property Index: head/mail/nullmailer/files/nullmailer.in =================================================================== --- head/mail/nullmailer/files/nullmailer.in (revision 273257) +++ head/mail/nullmailer/files/nullmailer.in (revision 273258) @@ -1,21 +1,21 @@ #!/bin/sh # $FreeBSD$ # # PROVIDE: nullmailer -# REQUIRE: DAEMON +# REQUIRE: LOGIN # # Add the following line to /etc/rc.conf to enable nullmailer: # # nullmailer_enable="YES" # . /etc/rc.subr name=nullmailer rcvar=`set_rcvar` command=/usr/sbin/daemon procname=%%PREFIX%%/sbin/nullmailer-send command_args=" -cf -u %%NULLMAIL_USER%% /bin/sh -c '$procname | /usr/bin/logger -i -p mail.info -t $name'" load_rc_config $name run_rc_command "$1" Property changes on: head/mail/nullmailer/files/nullmailer.in ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.3 \ No newline at end of property +1.4 \ No newline at end of property Index: head/mail/nullmailer/pkg-plist =================================================================== --- head/mail/nullmailer/pkg-plist (revision 273257) +++ head/mail/nullmailer/pkg-plist (revision 273258) @@ -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 Property changes on: head/mail/nullmailer/pkg-plist ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.7 \ No newline at end of property +1.8 \ No newline at end of property