summaryrefslogtreecommitdiffstats
path: root/mail/courier/files
diff options
context:
space:
mode:
authorsergei <sergei@FreeBSD.org>2004-01-15 15:12:32 +0000
committersergei <sergei@FreeBSD.org>2004-01-15 15:12:32 +0000
commitfd8065e3ac68598644fc6ac18a9f58dd7b4605bb (patch)
tree997606c9d39485a30de9ed22c3c09914ecd47948 /mail/courier/files
parent5757940070152dc2eb407ca784a9ffe369866369 (diff)
downloadFreeBSD-ports-fd8065e3ac68598644fc6ac18a9f58dd7b4605bb.zip
FreeBSD-ports-fd8065e3ac68598644fc6ac18a9f58dd7b4605bb.tar.gz
- Update to 0.44.2
- Fix LDAP support build problems - CONFLICTS has been expanded - WITH_GHOSTSCRIPT_AFPL support has been changed to honor GSPORT - WITH_TRANSPORT+=uucp changed since uucp is no longer part of the base system and NOUUCP is no longer a /etc/make.conf tunable for buildworld - WITH_EXPECT not being set now adds --disable-changepass which causes the suid authdaemon.passwd to not be installed. - devel/fam dependency is now non-optional since the port will use the library if it finds it regardless of one's intention to use it or not. For instance if libfam is installed and one doe not want it used by courier but chosses the WITH_LDAP support than libfam will get sucked in as well. Then the user deletes fam and courier breaks because the user had no idea courier depended on it. So until courier gets a configure --without-fam tunable this should be a mandatory dependency. - and last but not least etc/rc.d/courier.sh startup script has been rewritten to work with rc.subr which allows one to move it to /etc/rc.d/courier and have it just work. :) PR: 61112 Submitted by: Yarema <yds@CoolRat.org>
Diffstat (limited to 'mail/courier/files')
-rw-r--r--mail/courier/files/courier.sh154
-rw-r--r--mail/courier/files/patch-configure12
-rw-r--r--mail/courier/files/patch-courier::configure15
-rw-r--r--mail/courier/files/patch-courier::configure.in21
4 files changed, 130 insertions, 72 deletions
diff --git a/mail/courier/files/courier.sh b/mail/courier/files/courier.sh
index fe9339f..e185bae 100644
--- a/mail/courier/files/courier.sh
+++ b/mail/courier/files/courier.sh
@@ -1,29 +1,50 @@
#!/bin/sh
-# $FreeBSD: /tmp/pcvs/ports/mail/courier/files/Attic/courier.sh,v 1.2 2002-01-30 03:56:09 pat Exp $
#
-# This is the ${PREFIX}/etc/rc.d file for Courier SMTP, IMAP and POP3 servers
+# $FreeBSD: /tmp/pcvs/ports/mail/courier/files/Attic/courier.sh,v 1.3 2004-01-15 15:12:32 sergei Exp $
#
# Adapted for FreeBSD from courier.sysvinit
#
# NOTE: The 'restart' here does a "hard" stop, and a start. Be gentle, use
# "courierd restart" for a kindler, gentler, restart.
#
+# PROVIDE: mail
+# REQUIRE: LOGIN
+# BEFORE: securelevel
+# KEYWORD: FreeBSD shutdown
+#
+# NOTE for FreeBSD 5.0+:
+# If you want this script to start with the base rc scripts
+# move courier.sh to /etc/rc.d/courier
-if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
- echo "$0: Cannot determine the PREFIX" >&2
- exit 1
-fi
-
-prefix="${PREFIX}"
+prefix="%%PREFIX%%"
exec_prefix="${prefix}"
sysconfdir="${prefix}/etc/courier"
sbindir="${exec_prefix}/sbin"
+bindir="${exec_prefix}/bin"
libexecdir="${prefix}/libexec"
datadir="${prefix}/share/courier"
-arg=${1:-start}
-case $arg in
-start) # First time after install create aliases.dat and makesmtpaccess.dat
+# Define these courier_* variables in one of these files:
+# /etc/rc.conf
+# /etc/rc.conf.local
+# /etc/rc.conf.d/courier
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+courier_enable=${courier_enable:-"NO"} # Run Courier-MTA (YES/NO).
+
+. %%RC_SUBR%%
+
+name="courier"
+rcvar=`set_rcvar`
+
+start_cmd="${name}_start"
+stop_cmd="${name}_stop"
+extra_commands="restart"
+
+courier_start()
+{ # First time after install create aliases.dat and makesmtpaccess.dat
+ echo -n "Starting"
if [ ! -f ${sysconfdir}/aliases.dat \
-a -x ${sbindir}/makealiases ]; then
@@ -65,29 +86,39 @@ start) # First time after install create aliases.dat and makesmtpaccess.dat
fi
if [ -x ${sbindir}/courierfilter ]; then
- ${sbindir}/courierfilter start && echo -n " courierfilter"
+ echo -n " courierfilter"
+ ${sbindir}/courierfilter start
fi
if [ -x ${libexecdir}/authlib/authdaemond ]; then
- ${libexecdir}/authlib/authdaemond start && echo -n " authdaemond"
+ echo -n " authdaemond"
+ ${libexecdir}/authlib/authdaemond start
fi
if [ -x ${sbindir}/courierldapaliasd ]; then
- ${sbindir}/courierldapaliasd start && echo -n " courierldapaliasd"
+ echo -n " courierldapaliasd"
+ ${sbindir}/courierldapaliasd start
fi
case "`cat ${sysconfdir}/calendarmode 2>/dev/null`" in
net)
if [ -x ${libexecdir}/courier/pcpd ]; then
- ${libexecdir}/courier/pcpd start && echo -n " pcpd"
+ echo -n " pcpd"
+ ${libexecdir}/courier/pcpd start
fi
;;
*)
;;
esac
+ if [ -x ${libexecdir}/courier/sqwebmaild ]; then
+ echo -n " webmail"
+ ${libexecdir}/courier/sqwebmaild start
+ fi
+
if [ -x ${sbindir}/courier ]; then
- ${sbindir}/courier start && echo -n " courierd"
+ echo -n " courierd"
+ ${sbindir}/courier start
fi
if [ "$esmtpdcert" = 1 ]; then
@@ -106,7 +137,8 @@ start) # First time after install create aliases.dat and makesmtpaccess.dat
case $ESMTPDSTART in
[Yy]*)
if [ -x ${sbindir}/esmtpd ]; then
- ${sbindir}/esmtpd start && echo -n " esmtpd"
+ echo -n " esmtpd"
+ ${sbindir}/esmtpd start
fi
;;
esac
@@ -118,7 +150,8 @@ start) # First time after install create aliases.dat and makesmtpaccess.dat
case $ESMTPDSTART in
[Yy]*)
if [ -x ${sbindir}/esmtpd-msa ]; then
- ${sbindir}/esmtpd-msa start && echo -n " esmtpd-msa"
+ echo -n " esmtpd-msa"
+ ${sbindir}/esmtpd-msa start
fi
;;
esac
@@ -131,7 +164,8 @@ start) # First time after install create aliases.dat and makesmtpaccess.dat
[Yy]*)
if [ -x $COURIERTLS \
-a -x ${sbindir}/esmtpd-ssl ]; then
- ${sbindir}/esmtpd-ssl start && echo -n " esmtpd-ssl"
+ echo -n " esmtpd-ssl"
+ ${sbindir}/esmtpd-ssl start
fi
;;
esac
@@ -143,7 +177,8 @@ start) # First time after install create aliases.dat and makesmtpaccess.dat
case $IMAPDSTART in
[Yy]*)
if [ -x ${sbindir}/imapd ]; then
- ${sbindir}/imapd start && echo -n " imapd"
+ echo -n " imapd"
+ ${sbindir}/imapd start
fi
;;
esac
@@ -161,7 +196,8 @@ start) # First time after install create aliases.dat and makesmtpaccess.dat
${sbindir}/mkimapdcert >/dev/null 2>&1
fi
if [ -x ${sbindir}/imapd-ssl ]; then
- ${sbindir}/imapd-ssl start && echo -n " imapd-ssl"
+ echo -n " imapd-ssl"
+ ${sbindir}/imapd-ssl start
fi
fi
;;
@@ -174,7 +210,8 @@ start) # First time after install create aliases.dat and makesmtpaccess.dat
case $POP3DSTART in
[Yy]*)
if [ -x ${sbindir}/pop3d ]; then
- ${sbindir}/pop3d start && echo -n " pop3d"
+ echo -n " pop3d"
+ ${sbindir}/pop3d start
fi
;;
esac
@@ -187,76 +224,91 @@ start) # First time after install create aliases.dat and makesmtpaccess.dat
[Yy]*) # If we do not have a certificate, make one up.
if [ -x $COURIERTLS ]; then
if [ ! -f ${sysconfdir}/pop3d.pem \
- -a -x ${sbindir}/mkpop3dcert ]; then
+ -a -x ${sbindir}/mkpop3dcert ]; then
echo -n " generating-POP3-SSL-certificate..."
${sbindir}/mkpop3dcert >/dev/null 2>&1
fi
if [ -x ${sbindir}/pop3d-ssl ]; then
- ${sbindir}/pop3d-ssl start && echo -n " pop3d-ssl"
+ echo -n " pop3d-ssl"
+ ${sbindir}/pop3d-ssl start
fi
fi
;;
esac
fi
- ;;
-stop) # kill courier services in the reverse order of starting them
+ echo "."
+}
+
+courier_stop()
+{ # kill courier services in the reverse order of starting them
+ echo -n "Stopping"
+
if [ -x ${sbindir}/pop3d-ssl ]; then
- ${sbindir}/pop3d-ssl stop && echo -n " pop3d-ssl"
+ echo -n " pop3d-ssl"
+ ${sbindir}/pop3d-ssl stop
fi
if [ -x ${sbindir}/pop3d ]; then
- ${sbindir}/pop3d stop && echo -n " pop3d"
+ echo -n " pop3d"
+ ${sbindir}/pop3d stop
fi
if [ -x ${sbindir}/imapd-ssl ]; then
- ${sbindir}/imapd-ssl stop && echo -n " imapd-ssl"
+ echo -n " imapd-ssl"
+ ${sbindir}/imapd-ssl stop
fi
if [ -x ${sbindir}/imapd ]; then
- ${sbindir}/imapd stop && echo -n " imapd"
+ echo -n " imapd"
+ ${sbindir}/imapd stop
fi
if [ -x ${sbindir}/esmtpd-ssl ]; then
- ${sbindir}/esmtpd-ssl stop && echo -n " esmtpd-ssl"
+ echo -n " esmtpd-ssl"
+ ${sbindir}/esmtpd-ssl stop
fi
if [ -x ${sbindir}/esmtpd-msa ]; then
- ${sbindir}/esmtpd-msa stop && echo -n " esmtpd-msa"
+ echo -n " esmtpd-msa"
+ ${sbindir}/esmtpd-msa stop
fi
if [ -x ${sbindir}/esmtpd ]; then
- ${sbindir}/esmtpd stop && echo -n " esmtpd"
+ echo -n " esmtpd"
+ ${sbindir}/esmtpd stop
fi
if [ -x ${sbindir}/courier ]; then
- ${sbindir}/courier stop && echo -n " courierd"
+ echo -n " courierd"
+ ${sbindir}/courier stop
+ fi
+
+ if [ -x ${libexecdir}/courier/sqwebmaild ]; then
+ echo -n " webmail"
+ ${libexecdir}/courier/sqwebmaild stop
fi
if [ -x ${libexecdir}/courier/pcpd ]; then
- ${libexecdir}/courier/pcpd stop && echo -n " pcpd"
+ echo -n " pcpd"
+ ${libexecdir}/courier/pcpd stop
fi
if [ -x ${sbindir}/courierldapaliasd ]; then
- ${sbindir}/courierldapaliasd stop && echo -n " courierldapaliasd"
+ echo -n " courierldapaliasd"
+ ${sbindir}/courierldapaliasd stop
fi
if [ -x ${libexecdir}/authlib/authdaemond ]; then
- ${libexecdir}/authlib/authdaemond stop && echo -n " authdaemond"
+ echo -n " authdaemond"
+ ${libexecdir}/authlib/authdaemond stop
fi
if [ -x ${sbindir}/courierfilter ]; then
- ${sbindir}/courierfilter stop && echo " courierfilter"
+ echo -n " courierfilter"
+ ${sbindir}/courierfilter stop
fi
- ;;
-restart)
- $0 stop
- $0 start
- ;;
-*)
- echo ""
- echo "Usage: `basename $0` { start | stop | restart }"
- echo ""
- exit 64
- ;;
-esac
-exit 0
+ echo "."
+}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/mail/courier/files/patch-configure b/mail/courier/files/patch-configure
new file mode 100644
index 0000000..3259d6b
--- /dev/null
+++ b/mail/courier/files/patch-configure
@@ -0,0 +1,12 @@
+--- configure.orig Fri Nov 28 20:37:46 2003
++++ configure Wed Jan 7 03:17:25 2004
+@@ -18967,9 +18967,6 @@
+ echo "$as_me: WARNING: === the INSTALL file you should have known this. So" >&2;}
+ { echo "$as_me:$LINENO: WARNING: === you better read INSTALL again" >&5
+ echo "$as_me: WARNING: === you better read INSTALL again" >&2;}
+- { { echo "$as_me:$LINENO: error: aborted." >&5
+-echo "$as_me: error: aborted." >&2;}
+- { (exit 1); exit 1; }; }
+ fi
+ fi
+
diff --git a/mail/courier/files/patch-courier::configure b/mail/courier/files/patch-courier::configure
new file mode 100644
index 0000000..c6d3287
--- /dev/null
+++ b/mail/courier/files/patch-courier::configure
@@ -0,0 +1,15 @@
+--- courier/configure.orig Sat Nov 15 15:13:43 2003
++++ courier/configure Wed Jan 7 03:22:36 2004
+@@ -21208,9 +21208,9 @@
+
+ if test "$testmode" = "0"
+ then
+- INSTALL_PROGRAM='${INSTALL} -m 700'
+- INSTALL_SCRIPT='${INSTALL} -m 700'
+- INSTALL_DATA='${INSTALL} -m 600'
++ INSTALL_PROGRAM='${BSD_INSTALL_PROGRAM}'
++ INSTALL_SCRIPT='${BSD_INSTALL_SCRIPT}'
++ INSTALL_DATA='${BSD_INSTALL_DATA}'
+ fi
+
+ ac_ext=cc
diff --git a/mail/courier/files/patch-courier::configure.in b/mail/courier/files/patch-courier::configure.in
deleted file mode 100644
index abd0dc0..0000000
--- a/mail/courier/files/patch-courier::configure.in
+++ /dev/null
@@ -1,21 +0,0 @@
---- courier/configure.in.orig Sun Mar 16 17:35:34 2003
-+++ courier/configure.in Sat Aug 9 16:36:22 2003
-@@ -465,12 +465,12 @@
-
- # Automake stupidity
-
--if test "$testmode" = "0"
--then
-- INSTALL_PROGRAM='${INSTALL} -m 700'
-- INSTALL_SCRIPT='${INSTALL} -m 700'
-- INSTALL_DATA='${INSTALL} -m 600'
--fi
-+#if test "$testmode" = "0"
-+#then
-+# INSTALL_PROGRAM='${INSTALL} -m 700'
-+# INSTALL_SCRIPT='${INSTALL} -m 700'
-+# INSTALL_DATA='${INSTALL} -m 600'
-+#fi
-
- AC_LANG_CPLUSPLUS
- AC_CACHE_CHECK([if the C++ compiler needs -fhandle-exceptions],
OpenPOWER on IntegriCloud