pkgsrc/mail/courier-imap/files/courierimap.sh
jlam 77eebb3972 Update mail/courier-imap to courier-imap-4.0.1. Changes from version
3.0.5 include:

    * Implemented IMAP and POP3 proxy aggregator.  With a proxy
      aggregator, the mail accounts are split between multiple,
      independent servers, with an IMAP/POP3 server running on each
      individual server.  A separate, proxy server sits in front and
      accepts ordinary IMAP and POP3 connections.  It reads the login
      ID, determines which server the account is located on, connects
      to the server, and logs in.  Then, for the lifetime on the login
      session the front-end server takes itself out of the loop, and
      forwards all session traffic between the IMAP/POP3 client, and
      the back-end server.

    * Use courier-authlib for user authentication.

    * IPv6 support.

    * Minor bug fixes.

Please note when updating that the locations of the userdb files has
changed to be within the courier-authlib config directory, e.g.
/usr/pkg/etc/authlib/userdb*.
2005-02-18 22:12:46 +00:00

61 lines
1.1 KiB
Bash
Executable file

#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: courierimap.sh,v 1.11 2005/02/18 22:12:46 jlam Exp $
#
# Courier IMAP services daemon
#
# PROVIDE: courierimap
# REQUIRE: authdaemond
# KEYWORD: shutdown
. /etc/rc.subr
name="courierimap"
rcvar=${name}
command="@PREFIX@/sbin/couriertcpd"
ctl_command="@PREFIX@/sbin/imapd"
pidfile="@VARBASE@/run/imapd.pid"
required_files="@PKG_SYSCONFDIR@/imapd @PKG_SYSCONFDIR@/imapd-ssl"
required_vars="authdaemond"
start_cmd="courier_doit start"
stop_cmd="courier_doit stop"
courier_doit()
{
action=$1
case ${action} in
start)
for _f in $required_vars; do
eval _value=\$${_f}
case $_value in
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
;;
*)
@ECHO@ 1>&2 "$0: WARNING: \$${_f} is not set"
if [ -z $rc_force ]; then
return 1
fi
;;
esac
done
for f in $required_files; do
if [ ! -r "$f" ]; then
@ECHO@ 1>&2 "$0: WARNING: $f is not readable"
if [ -z $rc_force ]; then
return 1
fi
fi
done
@ECHO@ "Starting ${name}."
;;
stop)
@ECHO@ "Stopping ${name}."
;;
esac
${ctl_command} ${action}
}
load_rc_config $name
run_rc_command "$1"