pkgsrc/mail/courier-mta/files/courieresmtpmsa.sh
jlam 5f60d5c020 First cut at packaging the MTA and mailing list components of
courier-0.53.1 as mail/courier-mta.

The Courier mail transfer agent (MTA) is a modular multiprotocol mail
server that's designed to strike a balance between reasonable performance,
flexibility and features.

This package differs from traditional courier-mta packages in that
the webmail, imap/pop3, and maildrop components are not included
because they are supplied by the mail/sqwebmail, mail/courier-imap,
and mail/maildrop packages, respectively.  When Courier-MTA is installed
together with Courier-IMAP and SqWebMail, they form an integrated
mail/groupware server suite that provides ESMTP, IMAP, POP3, webmail,
and mailing list services within a single, consistent, framework.  A
web-based administration and configuration tool is included for
comprehensive configuration of the entire Courier software suite.

Many thanks to Yarema <yds@CoolRat.org> whose Courier port for FreeBSD
was an invaluable reference.
2006-04-28 18:10:21 +00:00

57 lines
1.2 KiB
Bash

#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: courieresmtpmsa.sh,v 1.1.1.1 2006/04/28 18:10:21 jlam Exp $
#
# Courier ESMTP-MSA (RFC 2476) services daemon
#
# PROVIDE: courieresmtpmsa
# REQUIRE: authdaemond courierd
# KEYWORD: shutdown
. /etc/rc.subr
name="courieresmtpmsa"
rcvar=${name}
command="@PREFIX@/sbin/couriertcpd"
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"
courier_doit()
{
action=$1
case ${action} in
start)
for f in $required_files; do
if [ ! -r "$f" ]; then
@ECHO@ 1>&2 "$0: WARNING: $f is not readable"
return 1
fi
done
. @PKG_SYSCONFDIR@/esmtpd
. @PKG_SYSCONFDIR@/esmtpd-msa
case x$ESMTPDSTART in
x[yY]*)
@ECHO@ "Starting ${name}."
@TEST@ -f @PKG_SYSCONFDIR@/esmtpacceptmailfor.dat ||
@PREFIX@/sbin/makeacceptmailfor
@TEST@ -f @PKG_SYSCONFDIR@/${ACCESSFILE}.dat ||
@PREFIX@/sbin/makesmtpaccess-msa
${ctl_command} $action
;;
esac
;;
stop)
@ECHO@ "Stopping ${name}."
${ctl_command} $action
;;
esac
}
load_rc_config $name
run_rc_command "$1"