From e93af56dabb62ea8af1c24c6724566cee80b1e32 Mon Sep 17 00:00:00 2001 From: waszi Date: Mon, 29 Nov 1999 11:24:55 +0000 Subject: [PATCH] - added Changed files: courier-imap.init -> 1.1 courier-imap.pamd -> 1.1 courier-imap.sysconfig -> 1.1 --- courier-imap.init | 71 ++++++++++++++++++++++++++++++++++++++++++ courier-imap.pamd | 9 ++++++ courier-imap.sysconfig | 36 +++++++++++++++++++++ 3 files changed, 116 insertions(+) create mode 100644 courier-imap.init create mode 100644 courier-imap.pamd create mode 100644 courier-imap.sysconfig diff --git a/courier-imap.init b/courier-imap.init new file mode 100644 index 0000000..b5dc380 --- /dev/null +++ b/courier-imap.init @@ -0,0 +1,71 @@ +#!/bin/sh +# IMAP Daemon +# +# chkconfig: 345 80 20 +# description: IMAP Daemon + +# Source function library +. /etc/rc.d/init.d/functions + +# Get network config +. /etc/sysconfig/network + +# Get service config +[ -f /etc/sysconfig/courier-imap ] && . /etc/sysconfig/courier-imap + +# Check that networking is up. +if [ "${NETWORKING}" = "no" ]; then + nls "WARNING: Networking is down. IMAP service can't be runed." + exit 1 +fi + + +# See how we were called. +case "$1" in + start) + # Check if the service is already running? + if [ ! -f /var/lock/subsys/courier-imap ]; then + show Starting IMAP Daemon + busy + + LIBAUTHMODULES="" + for f in `echo $AUTHMODULES`; do + LIBAUTHMODULES="$LIBAUTHMODULES /usr/lib/courier-imap/$f" + done + + /usr/lib/courier-imap/couriertcpd -address=$ADDRESS \ + -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \ + -pid=/var/run/imapd.pid -stderrlogger=/usr/lib/courier-imap/logger \ + -forcebind -nodnslookup -noidentlookup $PORT \ + /usr/bin/imaplogin $LIBAUTHMODULES /usr/bin/imapd $MAILDIR & + + if ps ax | grep -v grep | grep -q couriertcpd; then + deltext;ok + else + deltext;fail + fi + else + nls "IMAP already is running\n" + fi + touch /var/lock/subsys/courier-imap + ;; + stop) + show Stopping IMAP Daemon + killproc couriertcpd + rm -f /var/run/imapd.pid + rm -f /var/lock/subsys/courier-imap + ;; + restart|reload) + $0 stop + $0 start + ;; + status) + status couriertcpd + ;; + *) + nls "Usage: $0 {start|stop|restart|reload|status}" + exit 1 +esac + +exit 0 + diff --git a/courier-imap.pamd b/courier-imap.pamd new file mode 100644 index 0000000..3a871eb --- /dev/null +++ b/courier-imap.pamd @@ -0,0 +1,9 @@ +#%PAM-1.0 +auth required /lib/security/pam_listfile.so item=user sense=deny file=/etc/security/blacklist onerr=succeed +auth required /lib/security/pam_listfile.so item=user sense=deny file=/etc/security/blacklist.courier-imap onerr=succeed +auth required /lib/security/pam_unix.so +auth required /lib/security/pam_tally.so file=/var/log/faillog onerr=succeed no_magic_root +auth required /lib/security/pam_nologin.so +account required /lib/security/pam_tally.so deny=0 file=/var/log/faillog onerr=succeed no_magic_root +account required /lib/security/pam_unix.so +session required /lib/security/pam_unix.so \ No newline at end of file diff --git a/courier-imap.sysconfig b/courier-imap.sysconfig new file mode 100644 index 0000000..1217b4b --- /dev/null +++ b/courier-imap.sysconfig @@ -0,0 +1,36 @@ +# $Revision$ +# +# Address to listen on, can be set to a single IP address. +# +# Example: ADDRESS=127.0.0.1 +# +ADDRESS=0 + +# +# You better have a good reason for changing the port +# +PORT=143 + +# +# Maximum number of IMAP servers started +# +MAXDAEMONS=40 + +# +# Maximum number of connections to accept from the same IP address +# +MAXPERIP=4 + +# +# Authentication modules. Here's the default list: +# +# authpam authuserdb authvchkpw +# +# The default is set during the initial configuration. +# +AUTHMODULES="authpam authuserdb authvchkpw" + +# +# Courier supports only Mailbox in QMAIL Maildir Format +# +MAILDIR="Maildir" -- 2.44.0