summaryrefslogtreecommitdiff
path: root/mail/sendmail
diff options
context:
space:
mode:
authoradrianp <adrianp@pkgsrc.org>2006-06-06 22:03:36 +0000
committeradrianp <adrianp@pkgsrc.org>2006-06-06 22:03:36 +0000
commit347a5c06e7d09983984f795c2a8af79173b2a6f9 (patch)
treeb6ab81c54e154cfb7bd63432172f971644010f3f /mail/sendmail
parent860a0ecc0161abe9743156ea3ac511587e031011 (diff)
downloadpkgsrc-347a5c06e7d09983984f795c2a8af79173b2a6f9.tar.gz
Add sendmail and smmsp startup files for -current users
Make pkglint happy Pass MAINTAINERship to tv@ Bump PKGREVISION
Diffstat (limited to 'mail/sendmail')
-rw-r--r--mail/sendmail/Makefile30
-rw-r--r--mail/sendmail/Makefile.common20
-rw-r--r--mail/sendmail/PLIST4
-rwxr-xr-xmail/sendmail/files/sendmail.sh58
-rwxr-xr-xmail/sendmail/files/smmsp.sh28
5 files changed, 115 insertions, 25 deletions
diff --git a/mail/sendmail/Makefile b/mail/sendmail/Makefile
index 38b65838d7b..1d38c7db2b7 100644
--- a/mail/sendmail/Makefile
+++ b/mail/sendmail/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.87 2006/05/12 22:23:09 adrianp Exp $
+# $NetBSD: Makefile,v 1.88 2006/06/06 22:03:36 adrianp Exp $
.include "../../mail/sendmail/Makefile.common"
PKGNAME= sendmail-${DIST_VERS}
+PKGREVISION= 1
COMMENT= The well known Mail Transport Agent
CONFLICTS+= courier-mta-[0-9]* fastforward>=0.51nb2 postfix-[0-9]*
@@ -12,47 +13,48 @@ PLIST_SRC= ${WRKDIR}/.PLIST_SRC
SMRSH_CMDDIR?= ${PREFIX}/libexec/sm.bin
PLIST_SUBST+= SMRSH_CMDDIR=${SMRSH_CMDDIR:Q}
+RCD_SCRIPTS= sendmail smmsp
SUBST_CLASSES+= paths
SUBST_STAGE.paths= pre-build
SUBST_FILES.paths= ../mailer.conf include/sm/conf.h smrsh/smrsh.8
-SUBST_SED.paths= -e "s|@@PREFIX@@|${PREFIX}|g" \
- -e "s|@@SMRSH_CMDDIR@@|${SMRSH_CMDDIR}|g"
+SUBST_SED.paths= -e "s|@@PREFIX@@|${PREFIX}|g"
+SUBST_SED.paths+= -e "s|@@SMRSH_CMDDIR@@|${SMRSH_CMDDIR}|g"
SUBST_MESSAGE.paths= Fixing paths.
post-patch: make-sendmail-siteconfig
.if !empty(PKG_OPTIONS:Mtcpwrappers)
- @${CAT} ${FILESDIR}/site.config.m4-tcpwrappers >>${SITECONFIG}
+ ${CAT} ${FILESDIR}/site.config.m4-tcpwrappers >>${SITECONFIG}
.endif
.if !empty(PKG_OPTIONS:Mldap)
- @${CAT} ${FILESDIR}/site.config.m4-ldap >>${SITECONFIG}
+ ${CAT} ${FILESDIR}/site.config.m4-ldap >>${SITECONFIG}
.endif
.if !empty(PKG_OPTIONS:Mdb2)
- @${CAT} ${FILESDIR}/site.config.m4-db2 >>${SITECONFIG}
+ ${CAT} ${FILESDIR}/site.config.m4-db2 >>${SITECONFIG}
.endif
.if !empty(PKG_OPTIONS:Mdb4)
- @${CAT} ${FILESDIR}/site.config.m4-db4 >>${SITECONFIG}
+ ${CAT} ${FILESDIR}/site.config.m4-db4 >>${SITECONFIG}
.endif
.if !empty(PKG_OPTIONS:Mtls)
- @${CAT} ${FILESDIR}/site.config.m4-starttls >>${SITECONFIG}
+ ${CAT} ${FILESDIR}/site.config.m4-starttls >>${SITECONFIG}
.endif
.if !empty(PKG_OPTIONS:Msasl)
- @${CAT} ${FILESDIR}/site.config.m4-sasl2 >>${SITECONFIG}
+ ${CAT} ${FILESDIR}/site.config.m4-sasl2 >>${SITECONFIG}
.endif
.if !empty(PKG_OPTIONS:Msendmail-socketmap)
- @${CAT} ${FILESDIR}/site.config.m4-socketmap >>${SITECONFIG}
+ ${CAT} ${FILESDIR}/site.config.m4-socketmap >>${SITECONFIG}
PLIST_SRC+= ${PKGDIR}/PLIST.socketmap
.endif
post-extract:
- @${CP} ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf
+ ${CP} ${FILESDIR}/mailer.conf ${WRKDIR}/mailer.conf
do-build:
- @(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ./Build)
+ (cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ./Build)
post-build:
- @${CP} ${PKGDIR}/MESSAGE ${MESSAGE_SRC}
- @${CP} ${PKGDIR}/PLIST ${WRKDIR}/.PLIST_SRC
+ ${CP} ${PKGDIR}/MESSAGE ${MESSAGE_SRC}
+ ${CP} ${PKGDIR}/PLIST ${WRKDIR}/.PLIST_SRC
pre-install:
${INSTALL_DATA_DIR} ${PREFIX}/libexec/sendmail
diff --git a/mail/sendmail/Makefile.common b/mail/sendmail/Makefile.common
index 137badb17ab..67f3d291c26 100644
--- a/mail/sendmail/Makefile.common
+++ b/mail/sendmail/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.34 2006/05/12 22:23:09 adrianp Exp $
+# $NetBSD: Makefile.common,v 1.35 2006/06/06 22:03:36 adrianp Exp $
#
# Makefile fragment shared with libmilter
#
@@ -10,10 +10,10 @@ MASTER_SITES= ftp://ftp.sendmail.org/pub/sendmail/ \
ftp://ftp.fu-berlin.de/pub/unix/mail/sendmail/ \
ftp://ftp.ayamura.org/pub/sendmail/
-MAINTAINER= adrianp@NetBSD.org
+MAINTAINER= tv@NetBSD.org
HOMEPAGE= http://www.sendmail.org/
-LICENSE= no-profit
+LICENSE= sendmail-license
DISTINFO_FILE?= ${.CURDIR}/../../mail/sendmail/distinfo
FILESDIR?= ${.CURDIR}/../../mail/sendmail/files
@@ -36,22 +36,22 @@ MAKE_ENV+= M4=${TOOLS_M4:Q}
.include "options.mk"
make-sendmail-siteconfig:
- @${CP} ${FILESDIR}/site.config.m4 ${SITECONFIG}
- @${CHMOD} +w ${SITECONFIG}
+ ${CP} ${FILESDIR}/site.config.m4 ${SITECONFIG}
+ ${CHMOD} +w ${SITECONFIG}
.if !empty(PKG_OPTIONS:Minet6)
- @${CAT} ${FILESDIR}/site.config.m4-v6 >>${SITECONFIG}
+ ${CAT} ${FILESDIR}/site.config.m4-v6 >>${SITECONFIG}
.if ${OPSYS} != "SunOS" && ${OPSYS} != "BSDOS" && ${OPSYS} != "DragonFly"
- @${CAT} ${FILESDIR}/site.config.m4-v6-not-solaris >>${SITECONFIG}
+ ${CAT} ${FILESDIR}/site.config.m4-v6-not-solaris >>${SITECONFIG}
.endif
.endif
.if ${OPSYS} == "SunOS"
- @${CAT} ${FILESDIR}/site.config.m4-solaris >>${SITECONFIG}
+ ${CAT} ${FILESDIR}/site.config.m4-solaris >>${SITECONFIG}
.endif
.if ${OPSYS} == "Linux"
- @${CAT} ${FILESDIR}/site.config.m4-linux >>${SITECONFIG}
+ ${CAT} ${FILESDIR}/site.config.m4-linux >>${SITECONFIG}
.endif
- @${CAT} ${FILESDIR}/site.config.m4-milter >>${SITECONFIG}
+ ${CAT} ${FILESDIR}/site.config.m4-milter >>${SITECONFIG}
diff --git a/mail/sendmail/PLIST b/mail/sendmail/PLIST
index ebdda8d80ba..a5f3e912f4b 100644
--- a/mail/sendmail/PLIST
+++ b/mail/sendmail/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.10 2005/10/14 08:36:02 adrianp Exp $
+@comment $NetBSD: PLIST,v 1.11 2006/06/06 22:03:36 adrianp Exp $
bin/hoststat
bin/mailq
bin/newaliases
@@ -27,6 +27,8 @@ share/doc/sendmail/RELEASE_NOTES
share/doc/sendmail/SECURITY
share/doc/sendmail/op.me
share/doc/sendmail/op.ps
+share/examples/rc.d/sendmail
+share/examples/rc.d/smmsp
share/examples/sendmail/mailer.conf
share/misc/helpfile
share/sendmail/README
diff --git a/mail/sendmail/files/sendmail.sh b/mail/sendmail/files/sendmail.sh
new file mode 100755
index 00000000000..68adf3b55fe
--- /dev/null
+++ b/mail/sendmail/files/sendmail.sh
@@ -0,0 +1,58 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: sendmail.sh,v 1.1 2006/06/06 22:03:36 adrianp Exp $
+#
+
+# PROVIDE: mail
+# REQUIRE: LOGIN
+# we make mail start late, so that things like .forward's are not
+# processed until the system is fully operational
+
+
+. /etc/rc.subr
+
+name="sendmail"
+rcvar=$name
+command="/usr/sbin/${name}"
+pidfile="@VARBASE@/run/${name}.pid"
+required_files="/etc/mail/sendmail.cf"
+start_precmd="sendmail_precmd"
+makemap="@PREFIX@/sbin/makemap"
+newaliases="@PREFIX@/bin/newaliases"
+smbin="@PREFIX@/libexec/sendmail/sendmail"
+check_files="aliases access genericstable virtusertable domaintable mailertable"
+sendmail_flags="-Lsm-mta -bd -q30m"
+
+sendmail_precmd()
+{
+ # check modifications on /etc/mail/ databases
+ for f in ${check_files}; do
+ if [ -r "/etc/mail/$f.db" ] && [ -r "/etc/mail/$f" ]; then
+ if [ ! "/etc/mail/$f" -ot "/etc/mail/$f.db" ]; then
+ echo \
+ "${name}: /etc/mail/$f newer than /etc/mail/$f.db, regenerating"
+ if [ "x$f" = "xaliases" ]; then
+ ${newaliases}
+ else
+ ${makemap} hash \
+ /etc/mail/$f < /etc/mail/$f
+ fi
+ fi
+ fi
+ done
+
+ # check existence on /etc/mail/ databases
+ for f in ${check_files}; do
+ if [ ! -r "/etc/mail/$f.db" ] && [ -r "/etc/mail/$f" ]; then
+ echo "${name}: /etc/mail/$f.db not present, generating"
+ if [ "x$f" = "xaliases" ]; then
+ ${newaliases}
+ else
+ ${makemap} hash /etc/mail/$f < /etc/mail/$f
+ fi
+ fi
+ done
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/mail/sendmail/files/smmsp.sh b/mail/sendmail/files/smmsp.sh
new file mode 100755
index 00000000000..d842f31dfc4
--- /dev/null
+++ b/mail/sendmail/files/smmsp.sh
@@ -0,0 +1,28 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: smmsp.sh,v 1.1 2006/06/06 22:03:36 adrianp Exp $
+#
+
+# REQUIRE: mail
+
+# The only function of the smmsp process is to push locally
+# collected mail (which got stuck in the local client queue)
+# to a more fully functional smtp relay. It is not a fully
+# functional smtp daemon.
+#
+# It can, however, be used as a completely unprivileged
+# replacement for hosts that were previously using a "null
+# client" configuration and a smart relay.
+
+. /etc/rc.subr
+
+name="smmsp"
+rcvar=$name
+command="/usr/sbin/sendmail"
+pidfile="@VARBASE@/spool/clientmqueue/sm-client.pid"
+required_files="/etc/mail/submit.cf"
+smbin="@PREFIX@/libexec/sendmail/sendmail"
+smmsp_flags="-Lsm-msp-queue -Ac -q30m"
+
+load_rc_config $name
+run_rc_command "$1"