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 20:10:21 +02:00
|
|
|
#!@RCD_SCRIPTS_SHELL@
|
|
|
|
#
|
2006-06-17 21:26:48 +02:00
|
|
|
# $NetBSD: courieresmtps.sh,v 1.2 2006/06/17 19:26:48 jlam Exp $
|
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 20:10:21 +02:00
|
|
|
#
|
|
|
|
# Courier ESMTP/SSL services daemon
|
|
|
|
#
|
|
|
|
# PROVIDE: courieresmtps
|
|
|
|
# REQUIRE: authdaemond courierd
|
|
|
|
# KEYWORD: shutdown
|
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="courieresmtps"
|
|
|
|
rcvar=${name}
|
|
|
|
command="@PREFIX@/sbin/couriertcpd"
|
|
|
|
ctl_command="@PREFIX@/sbin/esmtpd-ssl"
|
|
|
|
pidfile="@VARBASE@/run/esmtpd-ssl.pid"
|
|
|
|
required_files="@PKG_SYSCONFDIR@/esmtpd @PKG_SYSCONFDIR@/esmtpd-ssl"
|
|
|
|
|
2006-06-17 21:26:48 +02:00
|
|
|
start_cmd="courieresmtps_doit start"
|
|
|
|
stop_cmd="courieresmtps_doit stop"
|
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 20:10:21 +02:00
|
|
|
|
2006-06-17 21:26:48 +02:00
|
|
|
courieresmtps_doit()
|
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 20:10:21 +02:00
|
|
|
{
|
|
|
|
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-ssl
|
|
|
|
|
|
|
|
f="$TLS_CERTFILE"
|
|
|
|
if [ -z "$f" ]; then
|
|
|
|
@ECHO@ 1>&2 "$0: WARNING: TLS_CERTFILE is empty"
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
if [ ! -f "$f" ] &&
|
|
|
|
[ "$f" = "@PKG_SYSCONFDIR@/esmtpd.pem ]; then
|
|
|
|
@ECHO@ "Generating ESMTP SSL certificate in $f."
|
|
|
|
@PREFIX@/sbin/mkesmtpdcert >/dev/null 2>&1
|
|
|
|
fi
|
|
|
|
if [ ! -r "$f" ]; then
|
|
|
|
@ECHO@ 1>&2 "$0: WARNING: $f is not readable"
|
|
|
|
return 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
case x$ESMTPDSSLSTART in
|
|
|
|
x[yY]*)
|
|
|
|
@ECHO@ "Starting ${name}."
|
|
|
|
@TEST@ -f @PKG_SYSCONFDIR@/esmtpacceptmailfor.dat ||
|
|
|
|
@PREFIX@/sbin/makeacceptmailfor
|
|
|
|
@TEST@ -f @PKG_SYSCONFDIR@/${ACCESSFILE}.dat ||
|
|
|
|
@PREFIX@/sbin/makesmtpaccess
|
|
|
|
${ctl_command} $action
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
@ECHO@ "Stopping ${name}."
|
|
|
|
${ctl_command} $action
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|