diff options
author | joerg <joerg@pkgsrc.org> | 2005-10-29 19:49:40 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2005-10-29 19:49:40 +0000 |
commit | 1073fb5d98a95b3a0d7d8eb17919fb11780c6d9d (patch) | |
tree | b7e848d943a83d93a18f7de5aac3017269c6aa50 /security/smtpd | |
parent | aecff1f03d8d019f4610ba515e47c21d68693abb (diff) | |
download | pkgsrc-1073fb5d98a95b3a0d7d8eb17919fb11780c6d9d.tar.gz |
Kill the post-install script. The example files are installed under
${PREFIX}/share/examples/smtpd, the spool setup moved into a newly added
rc script. This also handles missing configurations files better, since
the old post-install would fail e.g. if no local time was configured.
Bump revision.
Diffstat (limited to 'security/smtpd')
-rw-r--r-- | security/smtpd/MESSAGE | 5 | ||||
-rw-r--r-- | security/smtpd/Makefile | 25 | ||||
-rw-r--r-- | security/smtpd/PLIST | 7 | ||||
-rw-r--r-- | security/smtpd/files/smtpfwdd.sh | 30 |
4 files changed, 49 insertions, 18 deletions
diff --git a/security/smtpd/MESSAGE b/security/smtpd/MESSAGE index 6816aa2e954..e5c33ac2d4a 100644 --- a/security/smtpd/MESSAGE +++ b/security/smtpd/MESSAGE @@ -1,11 +1,12 @@ =========================================================================== -$NetBSD: MESSAGE,v 1.2 2002/09/24 12:30:35 wiz Exp $ +$NetBSD: MESSAGE,v 1.3 2005/10/29 19:49:40 joerg Exp $ The necessary spool and configuration directories were created under /var/spool/smtpd. Please edit /var/spool/smtpd/etc/smtp_check_rules according to your taste. -You will want to start smtpfwdd in rc.local, and add a line like +You will want to start smtpfwdd with the provided rc script, +and add a line like smtp stream tcp nowait root ${PREFIX}/sbin/smtpd smtpd diff --git a/security/smtpd/Makefile b/security/smtpd/Makefile index 899248053c9..66a5156d90e 100644 --- a/security/smtpd/Makefile +++ b/security/smtpd/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.12 2005/06/17 03:50:32 jlam Exp $ +# $NetBSD: Makefile,v 1.13 2005/10/29 19:49:40 joerg Exp $ # DISTNAME= smtpd-2.0 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= mail security MASTER_SITES= ftp://ftp.obtuse.com/pub/smtpd/ @@ -14,8 +14,13 @@ COMMENT= Store and forward SMTP proxy SPOOL= /var/spool/smtpd +USE_PKGINSTALL= yes +RCD_SCRIPTS= smtpfwdd +FILES_SUBST+= SPOOL=${SPOOL:Q} + # taken directly from the Makefile. CFLAGS.NetBSD= -DUSE_FLOCK -DUSE_MKSTEMP +CFLAGS.DragonFly= -DUSE_FLOCK -DUSE_MKSTEMP CFLAGS.SunOS= -DUSE_LOCKF -DNEEDS_FCNTL_H -DNEEDS_STRINGS_H -DBROKEN_SUN_INCLUDES CFLAGS.IRIX= -DGETOPT_EOF -DUSE_FLOCK -DNEEDS_FCNTL_H -DNEEDS_BSTRING_H -DIRIX_BROKEN_INCLUDES CFLAGS.AIX= -DGETOPT_EOF -DUSE_LOCKF -DNEEDS_FCNTL_H -DNEEDS_LOCKF_H -DNEEDS_STRINGS_H -DNEEDS_SELECT_H @@ -34,20 +39,10 @@ do-install: ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/smtpd ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/smtpd ${INSTALL_DATA} ${WRKSRC}/INSTALL ${PREFIX}/share/doc/smtpd - -post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/smtpd .for f in antirelay_check_rules_example antispam_check_rules.example \ - smtpd_check_rules.example - ${INSTALL_DATA} ${WRKSRC}/${f} ${SPOOL}/etc + smtpd_check_rules.example + ${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/share/examples/smtpd .endfor - ${CHOWN} -R uucp ${SPOOL} - ${CHGRP} -R mail ${SPOOL} - ${CHMOD} -R g=,o= ${SPOOL} - ${CP} /etc/resolv.conf ${SPOOL}/etc -.if ${OPSYS} == "SunOS" - ${CP} /etc/TIMEZONE ${SPOOL}/etc -.else - ${CP} /etc/localtime ${SPOOL}/etc -.endif .include "../../mk/bsd.pkg.mk" diff --git a/security/smtpd/PLIST b/security/smtpd/PLIST index 5ea10045202..4826dfb7194 100644 --- a/security/smtpd/PLIST +++ b/security/smtpd/PLIST @@ -1,5 +1,10 @@ -@comment $NetBSD: PLIST,v 1.1 2001/11/01 01:17:48 zuntum Exp $ +@comment $NetBSD: PLIST,v 1.2 2005/10/29 19:49:40 joerg Exp $ sbin/smtpd sbin/smtpfwdd share/doc/smtpd/INSTALL share/doc/smtpd/README +share/examples/smtpd/antirelay_check_rules_example +share/examples/smtpd/antispam_check_rules.example +share/examples/smtpd/smtpd_check_rules.example +share/examples/rc.d/smtpfwdd +@dirrm share/examples/smtpd diff --git a/security/smtpd/files/smtpfwdd.sh b/security/smtpd/files/smtpfwdd.sh new file mode 100644 index 00000000000..625d0e043ce --- /dev/null +++ b/security/smtpd/files/smtpfwdd.sh @@ -0,0 +1,30 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: smtpfwdd.sh,v 1.1 2005/10/29 19:49:40 joerg Exp $ +# +# PROVIDE: smtpfwdd +# REQUIRE: DAEMON + +. /etc/rc.subr + +name=smtpfwdd +rcvar=$name +start_precmd=smtpd_precmd +command="@PREFIX@/sbin/smtpfwdd" + +SPOOL="@SPOOL@" + +smtpd_precmd() +{ + (umask 077 && mkdir -p ${SPOOL}/etc) + + for f in TIMEZONE localtime resolv.conf; do + if [ -f /etc/$f ]; then + cmp -s /etc/$f ${SPOOL}/etc/$f || + cp -p /etc/$f ${SPOOL}/etc/$f + fi + done +} + +load_rc_config $name +run_rc_command "$1" |