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@
|
|
|
|
#
|
2008-02-19 19:45:23 +01:00
|
|
|
# $NetBSD: courierd.sh,v 1.5 2008/02/19 18:45:24 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 core processes
|
|
|
|
#
|
|
|
|
# PROVIDE: courierd
|
2007-08-10 19:57:03 +02:00
|
|
|
# REQUIRE: authdaemond courierfilter @COURIERLDAPALIASD@
|
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
|
|
|
# KEYWORD: shutdown
|
|
|
|
|
|
|
|
. /etc/rc.subr
|
|
|
|
|
|
|
|
name="courierd"
|
|
|
|
rcvar=${name}
|
|
|
|
command="@PREFIX@/sbin/${name}"
|
|
|
|
ctl_command="@PREFIX@/sbin/courier"
|
|
|
|
|
2007-08-10 19:57:03 +02:00
|
|
|
restart_cmd="${name}_doit restart"
|
|
|
|
start_precmd="${name}_prestart"
|
|
|
|
start_cmd="${name}_doit start"
|
|
|
|
stop_cmd="${name}_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
|
|
|
|
2007-08-10 19:57:03 +02:00
|
|
|
mkdir_perms()
|
|
|
|
{
|
2006-06-17 21:38:43 +02:00
|
|
|
dir="$1"; user="$2"; group="$3"; mode="$4"
|
2006-06-17 21:26:48 +02:00
|
|
|
@TEST@ -d $dir || @MKDIR@ $dir
|
|
|
|
@CHOWN@ $user $dir
|
|
|
|
@CHGRP@ $group $dir
|
|
|
|
@CHMOD@ $mode $dir
|
|
|
|
}
|
|
|
|
|
2007-08-10 19:57:03 +02:00
|
|
|
courierd_prestart()
|
|
|
|
{
|
2006-06-17 21:26:48 +02:00
|
|
|
# Courier mail submission directories
|
|
|
|
mkdir_perms @COURIER_STATEDIR@/msgq \
|
|
|
|
@COURIER_USER@ @COURIER_GROUP@ 0750
|
|
|
|
mkdir_perms @COURIER_STATEDIR@/msgs \
|
|
|
|
@COURIER_USER@ @COURIER_GROUP@ 0750
|
2008-02-19 19:45:23 +01:00
|
|
|
mkdir_perms @COURIER_STATEDIR@/tmp \
|
2006-06-17 21:26:48 +02:00
|
|
|
@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()
|
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
|
|
|
|
restart)
|
|
|
|
@ECHO@ "Restarting ${name}."
|
|
|
|
;;
|
|
|
|
start)
|
|
|
|
@TEST@ -f @PKG_SYSCONFDIR@/aliases.dat ||
|
|
|
|
@PREFIX@/sbin/makealiases
|
|
|
|
@ECHO@ "Starting ${name}."
|
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
@ECHO@ "Stopping ${name}."
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
${ctl_command} $action
|
|
|
|
}
|
|
|
|
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|