pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mail/sendmail Add sendmail and smmsp startup files for...
details: https://anonhg.NetBSD.org/pkgsrc/rev/3dda7d56db7a
branches: trunk
changeset: 514025:3dda7d56db7a
user: adrianp <adrianp%pkgsrc.org@localhost>
date: Tue Jun 06 22:03:36 2006 +0000
description:
Add sendmail and smmsp startup files for -current users
Make pkglint happy
Pass MAINTAINERship to tv@
Bump PKGREVISION
diffstat:
mail/sendmail/Makefile | 30 +++++++++++---------
mail/sendmail/Makefile.common | 20 +++++++-------
mail/sendmail/PLIST | 4 ++-
mail/sendmail/files/sendmail.sh | 58 +++++++++++++++++++++++++++++++++++++++++
mail/sendmail/files/smmsp.sh | 28 +++++++++++++++++++
5 files changed, 115 insertions(+), 25 deletions(-)
diffs (240 lines):
diff -r 50d6706f2acd -r 3dda7d56db7a mail/sendmail/Makefile
--- a/mail/sendmail/Makefile Tue Jun 06 22:01:25 2006 +0000
+++ b/mail/sendmail/Makefile Tue Jun 06 22:03:36 2006 +0000
@@ -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 @@
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 -r 50d6706f2acd -r 3dda7d56db7a mail/sendmail/Makefile.common
--- a/mail/sendmail/Makefile.common Tue Jun 06 22:01:25 2006 +0000
+++ b/mail/sendmail/Makefile.common Tue Jun 06 22:03:36 2006 +0000
@@ -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 @@
ftp://ftp.fu-berlin.de/pub/unix/mail/sendmail/ \
ftp://ftp.ayamura.org/pub/sendmail/
-MAINTAINER= adrianp%NetBSD.org@localhost
+MAINTAINER= tv%NetBSD.org@localhost
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 @@
.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 -r 50d6706f2acd -r 3dda7d56db7a mail/sendmail/PLIST
--- a/mail/sendmail/PLIST Tue Jun 06 22:01:25 2006 +0000
+++ b/mail/sendmail/PLIST Tue Jun 06 22:03:36 2006 +0000
@@ -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/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 -r 50d6706f2acd -r 3dda7d56db7a mail/sendmail/files/sendmail.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/sendmail/files/sendmail.sh Tue Jun 06 22:03:36 2006 +0000
@@ -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 -r 50d6706f2acd -r 3dda7d56db7a mail/sendmail/files/smmsp.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/sendmail/files/smmsp.sh Tue Jun 06 22:03:36 2006 +0000
@@ -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"
Home |
Main Index |
Thread Index |
Old Index