diff options
author | jlam <jlam@pkgsrc.org> | 2006-06-17 19:26:48 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2006-06-17 19:26:48 +0000 |
commit | fd154a9588892882fe0184aa09baa105cb14311d (patch) | |
tree | 5b2f0e62c02ac14ea0077ba709a2d6fa88ba3fb4 | |
parent | d7cf2498e15b604595ee72b1fe4899299deaefe9 (diff) | |
download | pkgsrc-fd154a9588892882fe0184aa09baa105cb14311d.tar.gz |
Modify the Courier services rc.d scripts so that:
(1) they are more likely to do the right thing if the user sets
rc_fast_and_loose; and
(2) they pre-create any necessary directories prior to start the
respective services.
Also, fix the path to the courierwebadmin binary in SPECIAL_PERMS for the
courier-mta package.
Bump the PKGREVISION.
-rw-r--r-- | mail/courier-imap/Makefile | 4 | ||||
-rwxr-xr-x | mail/courier-imap/files/courierimap.sh | 8 | ||||
-rwxr-xr-x | mail/courier-imap/files/courierimaps.sh | 8 | ||||
-rwxr-xr-x | mail/courier-imap/files/courierpop.sh | 8 | ||||
-rwxr-xr-x | mail/courier-imap/files/courierpops.sh | 8 | ||||
-rw-r--r-- | mail/courier-mta/Makefile | 4 | ||||
-rw-r--r-- | mail/courier-mta/files/courierd.sh | 47 | ||||
-rw-r--r-- | mail/courier-mta/files/courieresmtp.sh | 8 | ||||
-rw-r--r-- | mail/courier-mta/files/courieresmtpmsa.sh | 8 | ||||
-rw-r--r-- | mail/courier-mta/files/courieresmtps.sh | 8 | ||||
-rw-r--r-- | mail/courier-mta/files/courierfilter.sh | 30 | ||||
-rw-r--r-- | mail/courier-mta/files/courierldapaliasd.sh | 26 | ||||
-rw-r--r-- | mail/courier-mta/pkginstall.mk | 5 | ||||
-rw-r--r-- | mail/sqwebmail/Makefile | 6 | ||||
-rw-r--r-- | mail/sqwebmail/files/sqwebmail.sh | 32 |
15 files changed, 156 insertions, 54 deletions
diff --git a/mail/courier-imap/Makefile b/mail/courier-imap/Makefile index 8e9187b8508..a1a7c43a70c 100644 --- a/mail/courier-imap/Makefile +++ b/mail/courier-imap/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.56 2006/06/14 17:01:08 jlam Exp $ +# $NetBSD: Makefile,v 1.57 2006/06/17 19:26:48 jlam Exp $ DISTNAME= courier-imap-4.1.1 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= mail MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=courier/} EXTRACT_SUFX= .tar.bz2 diff --git a/mail/courier-imap/files/courierimap.sh b/mail/courier-imap/files/courierimap.sh index a88958bdd8d..2c1403ac380 100755 --- a/mail/courier-imap/files/courierimap.sh +++ b/mail/courier-imap/files/courierimap.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: courierimap.sh,v 1.12 2006/04/28 18:15:20 jlam Exp $ +# $NetBSD: courierimap.sh,v 1.13 2006/06/17 19:26:48 jlam Exp $ # # Courier IMAP services daemon # @@ -17,10 +17,10 @@ ctl_command="@PREFIX@/sbin/imapd" pidfile="@VARBASE@/run/imapd.pid" required_files="@PKG_SYSCONFDIR@/imapd @PKG_SYSCONFDIR@/imapd-ssl" -start_cmd="courier_doit start" -stop_cmd="courier_doit stop" +start_cmd="courierimap_doit start" +stop_cmd="courierimap_doit stop" -courier_doit() +courierimap_doit() { action=$1 case $action in diff --git a/mail/courier-imap/files/courierimaps.sh b/mail/courier-imap/files/courierimaps.sh index df208941abf..96ac9141757 100755 --- a/mail/courier-imap/files/courierimaps.sh +++ b/mail/courier-imap/files/courierimaps.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: courierimaps.sh,v 1.14 2006/06/09 16:35:04 reed Exp $ +# $NetBSD: courierimaps.sh,v 1.15 2006/06/17 19:26:48 jlam Exp $ # # Courier IMAP/SSL services daemon # @@ -17,10 +17,10 @@ ctl_command="@PREFIX@/sbin/imapd-ssl" pidfile="@VARBASE@/run/imapd-ssl.pid" required_files="@PKG_SYSCONFDIR@/imapd @PKG_SYSCONFDIR@/imapd-ssl" -start_cmd="courier_doit start" -stop_cmd="courier_doit stop" +start_cmd="courierimaps_doit start" +stop_cmd="courierimaps_doit stop" -courier_doit() +courierimaps_doit() { action=$1 case $action in diff --git a/mail/courier-imap/files/courierpop.sh b/mail/courier-imap/files/courierpop.sh index ec35f107012..500a2b09401 100755 --- a/mail/courier-imap/files/courierpop.sh +++ b/mail/courier-imap/files/courierpop.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: courierpop.sh,v 1.12 2006/04/28 18:15:20 jlam Exp $ +# $NetBSD: courierpop.sh,v 1.13 2006/06/17 19:26:48 jlam Exp $ # # Courier POP3 services daemon # @@ -17,10 +17,10 @@ ctl_command="@PREFIX@/sbin/pop3d" pidfile="@VARBASE@/run/pop3d.pid" required_files="@PKG_SYSCONFDIR@/pop3d @PKG_SYSCONFDIR@/pop3d-ssl" -start_cmd="courier_doit start" -stop_cmd="courier_doit stop" +start_cmd="courierpop_doit start" +stop_cmd="courierpop_doit stop" -courier_doit() +courierpop_doit() { action=$1 case $action in diff --git a/mail/courier-imap/files/courierpops.sh b/mail/courier-imap/files/courierpops.sh index 2cf742d3748..28d8426e3fa 100755 --- a/mail/courier-imap/files/courierpops.sh +++ b/mail/courier-imap/files/courierpops.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: courierpops.sh,v 1.14 2006/06/09 16:35:04 reed Exp $ +# $NetBSD: courierpops.sh,v 1.15 2006/06/17 19:26:48 jlam Exp $ # # Courier POP3/SSL services daemon # @@ -17,10 +17,10 @@ ctl_command="@PREFIX@/sbin/pop3d-ssl" pidfile="@VARBASE@/run/pop3d-ssl.pid" required_files="@PKG_SYSCONFDIR@/pop3d @PKG_SYSCONFDIR@/pop3d-ssl" -start_cmd="courier_doit start" -stop_cmd="courier_doit stop" +start_cmd="courierpops_doit start" +stop_cmd="courierpops_doit stop" -courier_doit() +courierpops_doit() { action=$1 case $action in diff --git a/mail/courier-mta/Makefile b/mail/courier-mta/Makefile index 698be4eeb98..147fd4f6f77 100644 --- a/mail/courier-mta/Makefile +++ b/mail/courier-mta/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.5 2006/06/14 17:01:08 jlam Exp $ +# $NetBSD: Makefile,v 1.6 2006/06/17 19:26:48 jlam Exp $ DISTNAME= courier-${COURIER_VERSION} -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= mail MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=courier/} EXTRACT_SUFX= .tar.bz2 diff --git a/mail/courier-mta/files/courierd.sh b/mail/courier-mta/files/courierd.sh index a2f8ad42f66..d42a7ef2bb1 100644 --- a/mail/courier-mta/files/courierd.sh +++ b/mail/courier-mta/files/courierd.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: courierd.sh,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +# $NetBSD: courierd.sh,v 1.2 2006/06/17 19:26:48 jlam Exp $ # # Courier core processes # @@ -15,11 +15,48 @@ rcvar=${name} command="@PREFIX@/sbin/${name}" ctl_command="@PREFIX@/sbin/courier" -restart_cmd="courier_doit restart" -start_cmd="courier_doit start" -stop_cmd="courier_doit stop" +restart_cmd="courierd_doit restart" +start_precmd="courierd_prestart" +start_cmd="courierd_doit start" +stop_cmd="courierd_doit stop" -courier_doit() +mkdir_perms() { + dir="$1"; owner="$2"; group="$3"; mode="$4" + @TEST@ -d $dir || @MKDIR@ $dir + @CHOWN@ $user $dir + @CHGRP@ $group $dir + @CHMOD@ $mode $dir +} + +courierd_prestart() { + # Courier mail submission directories + mkdir_perms @COURIER_STATEDIR@/msgq \ + @COURIER_USER@ @COURIER_GROUP@ 0750 + mkdir_perms @COURIER_STATEDIR@/msgs \ + @COURIER_USER@ @COURIER_GROUP@ 0750 + mkdir_perms @COURIER_STATEDIR@/tmp\ + @COURIER_USER@ @COURIER_GROUP@ 0770 + mkdir_perms @COURIER_STATEDIR@/track \ + @COURIER_USER@ @COURIER_GROUP@ 0755 + + # Courier webadmin directories + mkdir_perms @COURIER_STATEDIR@/webadmin \ + @COURIER_USER@ @COURIER_GROUP@ 0700 + mkdir_perms @COURIER_STATEDIR@/webadmin/added \ + @COURIER_USER@ @COURIER_GROUP@ 0700 + mkdir_perms @COURIER_STATEDIR@/webadmin/removed \ + @COURIER_USER@ @COURIER_GROUP@ 0700 + + # Courier delivery configuration directories + mkdir_perms @PKG_SYSCONFDIR@/aliasdir \ + @COURIER_USER@ @COURIER_GROUP@ 0755 + mkdir_perms @PKG_SYSCONFDIR@/aliases \ + @COURIER_USER@ @COURIER_GROUP@ 0750 + mkdir_perms @PKG_SYSCONFDIR@/smtpaccess \ + @COURIER_USER@ @COURIER_GROUP@ 0755 +} + +courierd_doit() { action=$1 diff --git a/mail/courier-mta/files/courieresmtp.sh b/mail/courier-mta/files/courieresmtp.sh index cb7203433e9..c1480540249 100644 --- a/mail/courier-mta/files/courieresmtp.sh +++ b/mail/courier-mta/files/courieresmtp.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: courieresmtp.sh,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +# $NetBSD: courieresmtp.sh,v 1.2 2006/06/17 19:26:48 jlam Exp $ # # Courier ESMTP services daemon # @@ -17,10 +17,10 @@ ctl_command="@PREFIX@/sbin/esmtpd" pidfile="@VARBASE@/run/esmtp.pid" required_files="@PKG_SYSCONFDIR@/esmtpd @PKG_SYSCONFDIR@/esmtpd-ssl" -start_cmd="courier_doit start" -stop_cmd="courier_doit stop" +start_cmd="courieresmtp_doit start" +stop_cmd="courieresmtp_doit stop" -courier_doit() +courieresmtp_doit() { action=$1 case $action in diff --git a/mail/courier-mta/files/courieresmtpmsa.sh b/mail/courier-mta/files/courieresmtpmsa.sh index 66e391a2076..4f59dae201e 100644 --- a/mail/courier-mta/files/courieresmtpmsa.sh +++ b/mail/courier-mta/files/courieresmtpmsa.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: courieresmtpmsa.sh,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +# $NetBSD: courieresmtpmsa.sh,v 1.2 2006/06/17 19:26:48 jlam Exp $ # # Courier ESMTP-MSA (RFC 2476) services daemon # @@ -17,10 +17,10 @@ ctl_command="@PREFIX@/sbin/esmtpd-msa" pidfile="@VARBASE@/run/esmtpd-msa.pid" required_files="@PKG_SYSCONFDIR@/esmtpd @PKG_SYSCONFDIR@/esmtpd-msa" -start_cmd="courier_doit start" -stop_cmd="courier_doit stop" +start_cmd="courieresmtpmsa_doit start" +stop_cmd="courieresmtpmsa_doit stop" -courier_doit() +courieresmtpmsa_doit() { action=$1 case ${action} in diff --git a/mail/courier-mta/files/courieresmtps.sh b/mail/courier-mta/files/courieresmtps.sh index 46536085f7d..d3d20e8f3f6 100644 --- a/mail/courier-mta/files/courieresmtps.sh +++ b/mail/courier-mta/files/courieresmtps.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: courieresmtps.sh,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +# $NetBSD: courieresmtps.sh,v 1.2 2006/06/17 19:26:48 jlam Exp $ # # Courier ESMTP/SSL services daemon # @@ -17,10 +17,10 @@ ctl_command="@PREFIX@/sbin/esmtpd-ssl" pidfile="@VARBASE@/run/esmtpd-ssl.pid" required_files="@PKG_SYSCONFDIR@/esmtpd @PKG_SYSCONFDIR@/esmtpd-ssl" -start_cmd="courier_doit start" -stop_cmd="courier_doit stop" +start_cmd="courieresmtps_doit start" +stop_cmd="courieresmtps_doit stop" -courier_doit() +courieresmtps_doit() { action=$1 case $action in diff --git a/mail/courier-mta/files/courierfilter.sh b/mail/courier-mta/files/courierfilter.sh index 03e29abf5ab..eae743e6114 100644 --- a/mail/courier-mta/files/courierfilter.sh +++ b/mail/courier-mta/files/courierfilter.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: courierfilter.sh,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +# $NetBSD: courierfilter.sh,v 1.2 2006/06/17 19:26:48 jlam Exp $ # # Courier mail filter daemon # @@ -15,12 +15,32 @@ rcvar=${name} command="@PREFIX@/sbin/${name}" pidfile="@VARBASE@/run/${name}.pid" -restart_cmd="courier_doit restart" +restart_cmd="courierfilter_doit restart" start_precmd="courierfilter_prestart" -start_cmd="courier_doit start" -stop_cmd="courier_doit stop" +start_cmd="courierfilter_doit start" +stop_cmd="courierfilter_doit stop" -courier_doit() +mkdir_perms() { + dir="$1"; owner="$2"; group="$3"; mode="$4" + @TEST@ -d $dir || @MKDIR@ $dir + @CHOWN@ $user $dir + @CHGRP@ $group $dir + @CHMOD@ $mode $dir +} + +courierfilter_prestart() { + # Courier filter directories + mkdir_perms @COURIER_STATEDIR@/allfilters \ + @COURIER_USER@ @COURIER_GROUP@ 0750 + mkdir_perms @COURIER_STATEDIR@/filters \ + @COURIER_USER@ @COURIER_GROUP@ 0750 + mkdir_perms @PKG_SYSCONFDIR@/filters \ + @COURIER_USER@ @COURIER_GROUP@ 0750 + mkdir_perms @PKG_SYSCONFDIR@/filters/active \ + @COURIER_USER@ @COURIER_GROUP@ 0750 +} + +courierfilter_doit() { action=$1 diff --git a/mail/courier-mta/files/courierldapaliasd.sh b/mail/courier-mta/files/courierldapaliasd.sh index eb92eba6e81..3fd72494d25 100644 --- a/mail/courier-mta/files/courierldapaliasd.sh +++ b/mail/courier-mta/files/courierldapaliasd.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: courierldapaliasd.sh,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +# $NetBSD: courierldapaliasd.sh,v 1.2 2006/06/17 19:26:48 jlam Exp $ # # Courier LDAP mail aliasing daemon # @@ -16,11 +16,27 @@ command="@PREFIX@/sbin/${name}" pidfile="@COURIER_STATEDIR@/tmp/ldapaliasd.pid" required_files="@PKG_SYSCONFDIR@/ldapaliasrc" -restart_cmd="courier_doit restart" -start_cmd="courier_doit start" -stop_cmd="courier_doit stop" +restart_cmd="courierldapaliasd_doit restart" +start_precmd="courierldapaliasd_prestart" +start_cmd="courierldapaliasd_doit start" +stop_cmd="courierldapaliasd_doit stop" -courier_doit() +mkdir_perms() { + dir="$1"; owner="$2"; group="$3"; mode="$4" + @TEST@ -d $dir || @MKDIR@ $dir + @CHOWN@ $user $dir + @CHGRP@ $group $dir + @CHMOD@ $mode $dir +} + +courierldapaliasd_prestart() +{ + @MKDIR@ @COURIER_STATEDIR@ + mkdir_perms @COURIER_STATEDIR@/tmp \ + @COURIER_USER@ @COURIER_GROUP@ 0770 +} + +courierldapaliasd_doit() { action=$1 diff --git a/mail/courier-mta/pkginstall.mk b/mail/courier-mta/pkginstall.mk index dfc13ea9d15..e2766f06570 100644 --- a/mail/courier-mta/pkginstall.mk +++ b/mail/courier-mta/pkginstall.mk @@ -1,4 +1,4 @@ -# $NetBSD: pkginstall.mk,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $ +# $NetBSD: pkginstall.mk,v 1.2 2006/06/17 19:26:48 jlam Exp $ # Convenience definition used below for a file or directory owned by the # courier user and group. @@ -42,7 +42,8 @@ OWN_DIRS_PERMS+= ${COURIER_STATEDIR}/webadmin/removed \ SPECIAL_PERMS+= bin/cancelmsg ${COURIER_OWNED} 6555 SPECIAL_PERMS+= bin/mailq ${COURIER_OWNED} 2555 SPECIAL_PERMS+= bin/sendmail ${SETUID_ROOT_PERMS} -SPECIAL_PERMS+= libexec/cgi-bin/courierwebadmin ${SETUID_ROOT_PERMS} +SPECIAL_PERMS+= libexec/courier/cgi-bin/courierwebadmin \ + ${SETUID_ROOT_PERMS} SPECIAL_PERMS+= libexec/courier/submitmkdir ${COURIER_OWNED} 4550 ### diff --git a/mail/sqwebmail/Makefile b/mail/sqwebmail/Makefile index 95c51fd94e8..00b8092213b 100644 --- a/mail/sqwebmail/Makefile +++ b/mail/sqwebmail/Makefile @@ -1,6 +1,7 @@ -# $NetBSD: Makefile,v 1.49 2006/06/09 22:12:01 jlam Exp $ +# $NetBSD: Makefile,v 1.50 2006/06/17 19:26:48 jlam Exp $ DISTNAME= sqwebmail-5.1.2 +PKGREVISION= 1 CATEGORIES= mail www MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=courier/} EXTRACT_SUFX= .tar.bz2 @@ -32,6 +33,9 @@ SQWEBMAIL_IMAGEDIR= ${PREFIX}/share/courier/sqwebmail/images SQWEBMAIL_IMAGEURL?= /sqwebmail BUILD_DEFS+= SQWEBMAIL_IMAGEURL FILES_SUBST+= SQWEBMAIL_STATEDIR=${SQWEBMAIL_STATEDIR:Q} +FILES_SUBST+= SQWEBMAIL_CACHEDIR=${SQWEBMAIL_CACHEDIR:Q} +FILES_SUBST+= SQWEBMAIL_CALENDARDIR=${SQWEBMAIL_CALENDARDIR:Q} +FILES_SUBST+= ROOT_USER=${ROOT_USER:Q} MESSAGE_SUBST+= IMAGEDIR=${SQWEBMAIL_IMAGEDIR} MESSAGE_SUBST+= IMAGEURL=${SQWEBMAIL_IMAGEURL} diff --git a/mail/sqwebmail/files/sqwebmail.sh b/mail/sqwebmail/files/sqwebmail.sh index 8ef467fb874..7a3fd04069d 100644 --- a/mail/sqwebmail/files/sqwebmail.sh +++ b/mail/sqwebmail/files/sqwebmail.sh @@ -1,6 +1,6 @@ #!@RCD_SCRIPTS_SHELL@ # -# $NetBSD: sqwebmail.sh,v 1.4 2006/04/28 18:16:25 jlam Exp $ +# $NetBSD: sqwebmail.sh,v 1.5 2006/06/17 19:26:48 jlam Exp $ # # Courier SqWebMail services daemon # @@ -17,10 +17,34 @@ ctl_command="@PREFIX@/sbin/sqwebmaild" pidfile="@VARBASE@/run/sqwebmaild.pid" required_files="@PKG_SYSCONFDIR@/calendarmode @PKG_SYSCONFDIR@/sqwebmaild" -start_cmd="courier_doit start" -stop_cmd="courier_doit stop" +start_precmd="sqwebmail_prestart" +start_cmd="sqwebmail_doit start" +stop_cmd="sqwebmail_doit stop" -courier_doit() +mkdir_perms() { + dir="$1"; owner="$2"; group="$3"; mode="$4" + @TEST@ -d $dir || @MKDIR@ $dir + @CHOWN@ $user $dir + @CHGRP@ group $dir + @CHMOD@ $mode $dir +} + +sqwebmail_prestart() +{ + # Courier webmail and calendar (pcp) directories + @MKDIR@ @SQWEBMAIL_STATEDIR@ + @MKDIR@ @SQWEBMAIL_CACHEDIR@ + mkdir_perms @SQWEBMAIL_CALENDARDIR@ \ + @ROOT_USER@ @COURIER_GROUP@ 0755 + mkdir_perms @SQWEBMAIL_CALENDARDIR@/public \ + @ROOT_USER@ @COURIER_GROUP@ 0755 + mkdir_perms @SQWEBMAIL_CALENDARDIR@/private \ + @ROOT_USER@ @COURIER_GROUP@ 0750 + mkdir_perms @SQWEBMAIL_CALENDARDIR@/localcache \ + @ROOT_USER@ @COURIER_GROUP@ 0750 +} + +sqwebmail_doit() { action=$1 case $action in |