summaryrefslogtreecommitdiff
blob: 72bc708c71ea2a0b5b277911dad1dbd59d0bb5e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# $Id: courier-imap-4.0.1-r1-gentoo-imapd.rc,v 1.1 2005/02/11 15:34:49 robbat2 Exp $
#
# Copyright 1998 - 2000 Double Precision, Inc.
# See COPYING for distribution information.

prefix=/usr
exec_prefix=/usr
bindir=/usr/sbin
libexecdir=/usr/lib/courier-imap

source /etc/courier-imap/imapd-ssl
source /etc/courier-imap/imapd

# The new courier-authlib doesn't use these settings.
#LIBAUTHMODULES=""
#for f in `echo $AUTHMODULES`
#do
#	LIBAUTHMODULES="$LIBAUTHMODULES /usr/lib/courier-imap/authlib/$f"
#done

ulimit -d $IMAP_ULIMITD
IMAP_STARTTLS="$IMAPDSTARTTLS"
export IMAPDSTARTTLS IMAP_STARTTLS
TLS_PROTOCOL=$TLS_STARTTLS_PROTOCOL
eval `sed -n '/^#/d;/=/p' </etc/courier-imap/imapd | \
	sed 's/=.*//;s/^/export /;s/$/;/'`
eval `sed -n '/^#/d;/=/p' </etc/courier-imap/imapd-ssl | \
	sed 's/=.*//;s/^/export /;s/$/;/'`

eval $PRERUN \
/usr/lib/courier-imap/couriertcpd -address=$ADDRESS \
	-stderrlogger=/usr/lib/courier-imap/courierlogger \
	-stderrloggername=imapd \
	-maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
	-pid=$PIDFILE $TCPDOPTS \
	$PORT ${exec_prefix}/sbin/imaplogin \
		/usr/lib/courier-imap/courier-imapd.indirect ${MAILDIR}