2014-03-15 23:52:41 +01:00
|
|
|
[Unit]
|
|
|
|
Description=Courier IMAP
|
|
|
|
Wants=courier-authdaemon.service
|
|
|
|
After=syslog.target
|
|
|
|
After=network.target
|
|
|
|
After=courier-authdaemon.target
|
|
|
|
After=courier-authdaemon.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
EnvironmentFile=/etc/courier/imapd
|
|
|
|
Environment="PIDFILE=/run/imapd.pid" "LOCKFILE=/run/imapd.pid.lock"
|
|
|
|
PIDFile=/run/imapd.pid
|
|
|
|
LimitNOFILE=65536
|
|
|
|
ExecStart=/usr/bin/env - /bin/sh -c " set -a ; \
|
|
|
|
. /etc/courier/imapd ; \
|
2014-09-25 17:22:01 +02:00
|
|
|
grep IMAPDSTARTTLS=NO /etc/courier/imapd-ssl &>/dev/null || . /etc/courier/imapd-ssl ; \
|
|
|
|
IMAP_STARTTLS=$IMAPDSTARTTLS ; export IMAP_STARTTLS ; \
|
2014-03-15 23:52:41 +01:00
|
|
|
PROXY_HOSTNAME=$PROXY_HOSTNAME ; \
|
2014-09-25 17:22:01 +02:00
|
|
|
TLS_PROTOCOL=$TLS_STARTTLS_PROTOCOL ; \
|
2014-03-15 23:52:41 +01:00
|
|
|
/usr/sbin/courierlogger -pid=$PIDFILE -start $LOGGEROPTS \
|
|
|
|
/usr/lib/courier-imap/couriertcpd -address=$ADDRESS \
|
|
|
|
-maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP $TCPDOPTS \
|
|
|
|
$PORT /usr/sbin/imaplogin /usr/sbin/imapd $MAILDIRPATH"
|
|
|
|
ExecStop=/usr/sbin/courierlogger -pid=$PIDFILE -stop
|
|
|
|
ExecStopPost=/usr/bin/rm $PIDFILE $LOCKFILE
|
|
|
|
Restart=always
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|