diff options
author | clive <clive@FreeBSD.org> | 2002-11-24 19:06:42 +0000 |
---|---|---|
committer | clive <clive@FreeBSD.org> | 2002-11-24 19:06:42 +0000 |
commit | b7f1c879d1ed2b53d70551dd6e6ed409af7ef792 (patch) | |
tree | 91c927e4fec461a6f740b95f7ceeef7a452c6db0 /mail/nullmailer | |
parent | f89b13f1c0ebc1bac3c5a061b1cfb9f7c5e7fdfe (diff) | |
download | FreeBSD-ports-b7f1c879d1ed2b53d70551dd6e6ed409af7ef792.zip FreeBSD-ports-b7f1c879d1ed2b53d70551dd6e6ed409af7ef792.tar.gz |
Take nullmailer's sendmail and mailq out from ${LOCALBASE}/(bin|sbin).
The reason is strong. A quote from submitter:
In current state choose of native or nullmailer's
sendmail/mailq depends on order of paths in $PATH
instead of sysadmins choose. (/etc/mail/mail.conf in general case)
PR: ports/45152
Submitted by: "."@babolo.ru
Diffstat (limited to 'mail/nullmailer')
-rw-r--r-- | mail/nullmailer/Makefile | 10 | ||||
-rw-r--r-- | mail/nullmailer/files/nullmail.sh | 10 | ||||
-rw-r--r-- | mail/nullmailer/files/patch-Makefile.in | 22 | ||||
-rw-r--r-- | mail/nullmailer/files/patch-src-Makefile.in | 66 | ||||
-rw-r--r-- | mail/nullmailer/pkg-install | 2 | ||||
-rw-r--r-- | mail/nullmailer/pkg-message | 7 | ||||
-rw-r--r-- | mail/nullmailer/pkg-plist | 33 |
7 files changed, 124 insertions, 26 deletions
diff --git a/mail/nullmailer/Makefile b/mail/nullmailer/Makefile index e165d12..b6ac563 100644 --- a/mail/nullmailer/Makefile +++ b/mail/nullmailer/Makefile @@ -8,7 +8,7 @@ PORTNAME= nullmailer # PORTVERSION= 1.00RC5 PORTVERSION= 1.00r5 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= mail MASTER_SITES= http://untroubled.org/nullmailer/ # MASTER_SITE_SUBDIR= ${PORTVERSION} @@ -17,8 +17,6 @@ DISTNAME= ${PORTNAME}-1.00RC5 MAINTAINER= clive@FreeBSD.org -FORBIDDEN= "A long standing bug is noted as a vulnerability on bugtraq" - HAS_CONFIGURE= yes CXXFLAGS+= -lstdc++ @@ -31,11 +29,15 @@ PKGMESSAGE= ${WRKDIR}/pkg-message .if defined(BATCH) PLIST_SUB= LOCALSTATEDIR="${PREFIX}" PLIST_SUB+= LOCALSTATEDIR_RM="@dirrm " +PLIST_SUB+= SPOOL="" NMH_PREFIX= ${PREFIX} +SPOOL= spool/ .else PLIST_SUB= LOCALSTATEDIR="" PLIST_SUB+= LOCALSTATEDIR_RM="@comment " -CONFIGURE_ARGS+= '--localstatedir=/var/' +PLIST_SUB+= SPOOL="spool/" +CONFIGURE_ARGS+= --localstatedir=/var/spool +#CONFIGURE_ARGS+= --localstatedir=/var/spool --bindir='$${libexecdir}'/${PORTNAME} --sbindir='$${libexecdir}'/${PORTNAME} .endif # Pass BATCH to pkg-install for Evil Things(tm) diff --git a/mail/nullmailer/files/nullmail.sh b/mail/nullmailer/files/nullmail.sh index ec00993..adf6705 100644 --- a/mail/nullmailer/files/nullmail.sh +++ b/mail/nullmailer/files/nullmail.sh @@ -22,19 +22,21 @@ TAG=${NULLMAILUSER} case "$1" in start) + echo -n ' nullmailer' if [ ! -r ${PIDFILE} ] ; then - [ -x ${PREFIX}/sbin/nullmailer-send ] && su -l ${NULLMAILUSER} -c "${PREFIX}/sbin/nullmailer-send | ${LOGGER} -p ${PRIORITY} -t ${TAG} 2>&1 &" && echo -n ' nullmailer' + [ -x ${PREFIX}/sbin/nullmailer-send ] && su -l ${NULLMAILUSER} -c "${PREFIX}/sbin/nullmailer-send | ${LOGGER} -p ${PRIORITY} -t ${TAG} 2>&1 &" JUNK=`${PS} -ax` PID=`${PS} -ax | ${GREP} -e nullmailer-send$ | ${AWK} '{print $1}'` echo $PID > ${PIDFILE} else - echo 'nullmailer already running' + echo ' already running' fi ;; stop) + echo -n ' nullmailer' if [ -r ${PIDFILE} ] ; then -# ${KILL} -15 `${CAT} ${PIDFILE}` > /dev/null && echo -n ' nullmailer' - ${KILLALL} -15 nullmailer-send > /dev/null && echo -n ' nullmailer' +# ${KILL} -15 `${CAT} ${PIDFILE}` > /dev/null + ${KILLALL} -15 nullmailer-send > /dev/null ${RM} -f ${PIDFILE} fi ;; diff --git a/mail/nullmailer/files/patch-Makefile.in b/mail/nullmailer/files/patch-Makefile.in new file mode 100644 index 0000000..42719c4 --- /dev/null +++ b/mail/nullmailer/files/patch-Makefile.in @@ -0,0 +1,22 @@ +--- Makefile.in Sat Dec 30 07:22:51 2000 ++++ Makefile.in Sat Nov 9 10:16:13 2002 +@@ -66,6 +66,8 @@ + STRIP = @STRIP@ + VERSION = @VERSION@ + ++libexecdir = @libexecdir@/nullmailer ++ + localstatedir = @localstatedir@/nullmailer + sysconfdir = @sysconfdir@/nullmailer + +@@ -368,8 +370,8 @@ + chown nullmail $(DESTDIR)$(localstatedir)/* + chown nullmail $(DESTDIR)$(sbindir)/nullmailer-queue + chmod u+s $(DESTDIR)$(sbindir)/nullmailer-queue +- chown nullmail $(DESTDIR)$(bindir)/mailq +- chmod u+s $(DESTDIR)$(bindir)/mailq ++ chown nullmail $(DESTDIR)$(libexecdir)/mailq ++ chmod u+s $(DESTDIR)$(libexecdir)/mailq + + dist-hook: + sed -e s/@VERSION\@/@VERSION@/ \ diff --git a/mail/nullmailer/files/patch-src-Makefile.in b/mail/nullmailer/files/patch-src-Makefile.in new file mode 100644 index 0000000..15f670c --- /dev/null +++ b/mail/nullmailer/files/patch-src-Makefile.in @@ -0,0 +1,66 @@ +--- src/Makefile.in Sat Dec 30 07:22:57 2000 ++++ src/Makefile.in Sat Nov 9 09:34:23 2002 +@@ -68,9 +68,11 @@ + STRIP = @STRIP@ + VERSION = @VERSION@ + +-bin_PROGRAMS = mailq nullmailer-inject ++libexecdir = @libexecdir@/nullmailer + +-sbin_PROGRAMS = nullmailer-queue nullmailer-send sendmail ++bin_PROGRAMS = nullmailer-inject ++libexec_PROGRAMS = mailq sendmail ++sbin_PROGRAMS = nullmailer-queue nullmailer-send + + + #noinst_PROGRAMS = address +@@ -95,7 +97,7 @@ + mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs + CONFIG_HEADER = ../config.h + CONFIG_CLEAN_FILES = +-PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS) ++PROGRAMS = $(bin_PROGRAMS) $(sbin_PROGRAMS) $(libexec_PROGRAMS) + + + DEFS = @DEFS@ -I. -I$(srcdir) -I.. +@@ -192,6 +194,31 @@ + rm -f $(DESTDIR)$(sbindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + done + ++mostlyclean-libexecPROGRAMS: ++ ++clean-libexecPROGRAMS: ++ -test -z "$(libexec_PROGRAMS)" || rm -f $(libexec_PROGRAMS) ++ ++distclean-libexecPROGRAMS: ++ ++maintainer-clean-libexecPROGRAMS: ++ ++install-libexecPROGRAMS: $(libexec_PROGRAMS) ++ @$(NORMAL_INSTALL) ++ $(mkinstalldirs) $(DESTDIR)$(libexecdir) ++ @list='$(libexec_PROGRAMS)'; for p in $$list; do \ ++ if test -f $$p; then \ ++ echo " $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libexecdir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ ++ $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(libexecdir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ ++ else :; fi; \ ++ done ++ ++uninstall-libexecPROGRAMS: ++ @$(NORMAL_UNINSTALL) ++ list='$(libexec_PROGRAMS)'; for p in $$list; do \ ++ rm -f $(DESTDIR)$(libexecdir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ ++ done ++ + .c.o: + $(COMPILE) -c $< + +@@ -308,7 +335,7 @@ + check: check-am + installcheck-am: + installcheck: installcheck-am +-install-exec-am: install-binPROGRAMS install-sbinPROGRAMS ++install-exec-am: install-binPROGRAMS install-sbinPROGRAMS install-libexecPROGRAMS + install-exec: install-exec-am + + install-data-am: diff --git a/mail/nullmailer/pkg-install b/mail/nullmailer/pkg-install index 91fca36..b2e9382 100644 --- a/mail/nullmailer/pkg-install +++ b/mail/nullmailer/pkg-install @@ -51,7 +51,7 @@ if [ x"$2" = xPRE-INSTALL ]; then else echo "You need a user \"${user}\"." if ([ -n "$BATCH" ] || yesno "Would you like me to create it" y); then - /usr/sbin/pw useradd ${user} -u 522 -g ${group} -h - -d ${NMH_PREFIX}/var/nullmailer \ + /usr/sbin/pw useradd ${user} -u 522 -g ${group} -h - -d ${NMH_PREFIX}/var/${SPOOL}nullmailer \ -s /bin/sh -c "Nullmailer Mail System" || exit echo "Done." else diff --git a/mail/nullmailer/pkg-message b/mail/nullmailer/pkg-message index 0840803..2753ea85 100644 --- a/mail/nullmailer/pkg-message +++ b/mail/nullmailer/pkg-message @@ -4,6 +4,13 @@ Please take %%PREFIX%%/etc/nullmailer/remotes.sample as an example and edit your own %%PREFIX%%/etc/nullmailer/remotes +It's possible refefine mailq and sendmail in your /etc/mail/mailer.conf: + +sendmail %%PREFIX%%/libexec/nullmailer/sendmail +send-mail %%PREFIX%%/libexec/nullmailer/sendmail +mailq %%PREFIX%%/libexec/nullmailer/mailq + +WARNING! It will couse problem in case delivering to local recipients. Also man nullmailer-send(8) for more details ================================================================== diff --git a/mail/nullmailer/pkg-plist b/mail/nullmailer/pkg-plist index 793f380..5d049d6 100644 --- a/mail/nullmailer/pkg-plist +++ b/mail/nullmailer/pkg-plist @@ -1,29 +1,28 @@ libexec/nullmailer/smtp libexec/nullmailer/qmqp -bin/mailq +libexec/nullmailer/mailq +libexec/nullmailer/sendmail bin/nullmailer-inject sbin/nullmailer-queue sbin/nullmailer-send -sbin/sendmail etc/nullmailer/remotes.sample etc/rc.d/nullmail.sh -@exec mkdir -p %%LOCALSTATEDIR%%/var/nullmailer/queue -@exec chmod 700 %%LOCALSTATEDIR%%/var/nullmailer/queue -@exec mkdir -p %%LOCALSTATEDIR%%/var/nullmailer/tmp -@exec chmod 700 %%LOCALSTATEDIR%%/var/nullmailer/tmp -@exec rm -f %%LOCALSTATEDIR%%/var/nullmailer/trigger -@exec mkfifo %%LOCALSTATEDIR%%/var/nullmailer/trigger -@exec chmod 600 %%LOCALSTATEDIR%%/var/nullmailer/trigger -@exec chown -R nullmail %%LOCALSTATEDIR%%/var/nullmailer/* +@exec mkdir -p %%LOCALSTATEDIR%%/var/%%SPOOL%%nullmailer/queue +@exec chmod 700 %%LOCALSTATEDIR%%/var/%%SPOOL%%nullmailer/queue +@exec mkdir -p %%LOCALSTATEDIR%%/var/%%SPOOL%%nullmailer/tmp +@exec chmod 700 %%LOCALSTATEDIR%%/var/%%SPOOL%%nullmailer/tmp +@exec rm -f %%LOCALSTATEDIR%%/var/%%SPOOL%%nullmailer/trigger +@exec mkfifo %%LOCALSTATEDIR%%/var/%%SPOOL%%nullmailer/trigger +@exec chmod 600 %%LOCALSTATEDIR%%/var/%%SPOOL%%nullmailer/trigger +@exec chown -R nullmail %%LOCALSTATEDIR%%/var/%%SPOOL%%nullmailer/* @exec chown nullmail %D/sbin/nullmailer-queue @exec chmod u+s %D/sbin/nullmailer-queue -@exec chown nullmail %D/bin/mailq -@exec chmod u+s %D/bin/mailq -%%LOCALSTATEDIR_RM%%var/nullmailer/queue -%%LOCALSTATEDIR_RM%%var/nullmailer/tmp -@unexec rm -f %%LOCALSTATEDIR%%/var/nullmailer/trigger +@exec chown nullmail %D/libexec/nullmailer/mailq +@exec chmod u+s %D/libexec/nullmailer/mailq +%%LOCALSTATEDIR_RM%%var/%%SPOOL%%nullmailer/queue +%%LOCALSTATEDIR_RM%%var/%%SPOOL%%nullmailer/tmp +@unexec rm -f %%LOCALSTATEDIR%%/var/%%SPOOL%%nullmailer/trigger @dirrm etc/nullmailer @dirrm libexec/nullmailer -%%LOCALSTATEDIR_RM%%var/nullmailer -%%LOCALSTATEDIR_RM%%var +%%LOCALSTATEDIR_RM%%var/%%SPOOL%%nullmailer @unexec if [ -n "$BATCH" ]; then echo "Warning: In batch mode, I will do 'rmuser -y nullmail'"; rmuser -y nullmail; fi |