diff options
Diffstat (limited to 'packaging')
| -rw-r--r-- | packaging/suse/courier-imap.init.in | 145 | ||||
| -rw-r--r-- | packaging/suse/imap.pam | 13 | ||||
| -rw-r--r-- | packaging/suse/pop3.pam | 13 | ||||
| -rw-r--r-- | packaging/systemd/courier-imap.service.in | 16 | ||||
| -rw-r--r-- | packaging/systemd/courier-imap.sysvinit.in | 125 | 
5 files changed, 312 insertions, 0 deletions
diff --git a/packaging/suse/courier-imap.init.in b/packaging/suse/courier-imap.init.in new file mode 100644 index 0000000..a8e4aa7 --- /dev/null +++ b/packaging/suse/courier-imap.init.in @@ -0,0 +1,145 @@ +# /bin/sh +# +# This is a sample /etc/init.d file for Courier-IMAP server +# on SuSE systems. +# +# description: Courier-IMAP - IMAP server +# +# /etc/init.d/courier-imap +# +### BEGIN INIT INFO +# Provides:       cyrus courier-imap +# Required-Start: $network $named $syslog +# X-UnitedLinux-Should-Start: ldap ypbind +# Required-Stop: +# Default-Start:  3 5 +# Default-Stop: +# Description:    start the Courier-imap mail delivery agent +### END INIT INFO + +# Determine the base and follow a runlevel link name. +base=${0##*/} +link=${base#*[SK][0-9][0-9]} + +COURIER_ETC=@sysconfdir@ +COURIER_LIBEXEC=@libexecdir@ +COURIER_DATAROOT=@datarootdir@ +COURIER_DATA=@datadir@ +COURIER_BIN=@bindir@/imapd + +if [ ! -x $COURIER_BIN ] ; then +        echo -n "courier-imap server not installed ! " +        exit 5 +fi + +. /etc/rc.status +rc_reset + +case "$1" in +start) +        cd / +	. ${COURIER_ETC}/imapd +	touch /var/lock/subsys/courier-imap + +	echo -n "Starting Courier-IMAP server:" + +	case x$IMAPDSTART in +	x[yY]*) +		# Start daemons. +		${COURIER_LIBEXEC}/imapd.rc start +		echo -n " imap" +		;; +	esac + +	. ${COURIER_ETC}/imapd-ssl +	case x$IMAPDSSLSTART in +	x[yY]*) +		if test -x $COURIERTLS +		then + +		# First time we start this, generate a dummy SSL certificate. + +			if test ! -f $TLS_CERTFILE +			then +				echo -n " generating-SSL-certificate..." +				${COURIER_DATA}/mkimapdcert >/dev/null 2>&1 +			fi +			${COURIER_LIBEXEC}/imapd-ssl.rc start +			echo -n " imap-ssl" +		fi +		;; +	esac + +	POP3DSTART="" +	POP3DSSLSTART="" + +	if test -f ${COURIER_ETC}/pop3d +	then +		. ${COURIER_ETC}/pop3d +	fi + +	case x$POP3DSTART in +	x[yY]*) +		# Start daemons. +		${COURIER_LIBEXEC}/pop3d.rc start +		echo -n " pop3" +		;; +	esac + +	if test -f ${COURIER_ETC}/pop3d-ssl +	then +		. ${COURIER_ETC}/pop3d-ssl +	fi + +	case x$POP3DSSLSTART in +	x[yY]*) +		if test -x $COURIERTLS +		then + +		# First time we start this, generate a dummy SSL certificate. + +			if test ! -f $TLS_CERTFILE +			then +				echo -n " generating-SSL-certificate..." +				${COURIER_DATA}/mkpop3dcert >/dev/null 2>&1 +			fi +			${COURIER_LIBEXEC}/pop3d-ssl.rc start +			echo -n " pop3-ssl" +		fi +		;; +	esac + +	echo "" +	;; +stop) +        echo -n "Stopping Courier-IMAP server:" +	. ${COURIER_ETC}/imapd +	. ${COURIER_ETC}/imapd-ssl +	${COURIER_LIBEXEC}/imapd.rc stop +	echo -n " imap" +	if test -x $COURIERTLS +	then +		${COURIER_LIBEXEC}/imapd-ssl.rc stop +		echo -n " imap-ssl" +	fi + +	if test -f ${COURIER_ETC}/pop3d +	then +		${COURIER_LIBEXEC}/pop3d.rc stop +		echo -n " pop3" + +		if test -x $COURIERTLS +		then +			${COURIER_LIBEXEC}/pop3d-ssl.rc stop +			echo -n " pop3-ssl" +		fi +	fi + +	echo "" +	;; +restart) +	$0 stop +	$0 start +        ;; +esac +exit 0 diff --git a/packaging/suse/imap.pam b/packaging/suse/imap.pam new file mode 100644 index 0000000..816ec93 --- /dev/null +++ b/packaging/suse/imap.pam @@ -0,0 +1,13 @@ +# Sample PAM configuration for SuSE distributions. +# +# Author: Jan Zimmerschied <jan@zimmerschied.de> +# +# To use the authpam authentication module with courierimapd, you must +# configure your PAM library to authenticate the "imap" service. +# See your system documentation for information on how to configure your +# PAM services. In most cases, all you need to do is to install this file +# as /etc/pam.d/imap, but check your system documentation to make sure. +# +auth       required     pam_unix2.so nullok +account    required     pam_unix2.so +session    required     pam_unix2.so diff --git a/packaging/suse/pop3.pam b/packaging/suse/pop3.pam new file mode 100644 index 0000000..b7f0f15 --- /dev/null +++ b/packaging/suse/pop3.pam @@ -0,0 +1,13 @@ +# Sample PAM configuration for SuSE distributions. +# +# Author: Jan Zimmerschied <jan@zimmerschied.de> +# +# To use the authpam authentication module with courierpop3d, you must +# configure your PAM library to authenticate the "pop3" service. +# See your system documentation for information on how to configure your +# PAM services. In most cases, all you need to do is to install this file +# as /etc/pam.d/pop3, but check your system documentation to make sure. +# +auth       required     pam_unix2.so nullok +account    required     pam_unix2.so +session    required     pam_unix2.so diff --git a/packaging/systemd/courier-imap.service.in b/packaging/systemd/courier-imap.service.in new file mode 100644 index 0000000..e85f7a4 --- /dev/null +++ b/packaging/systemd/courier-imap.service.in @@ -0,0 +1,16 @@ +[Unit] +Description=Courier-IMAP service +Wants=network.target +Wants=courier-authlib.service +After=network.target +After=courier-authlib.service + +[Install] +WantedBy=mail-transfer-agent.target +WantedBy=multi-user.target + +[Service] +Type=forking +RemainAfterExit=true +ExecStart=@datadir@/courier-imap.sysvinit start +ExecStop=@datadir@/courier-imap.sysvinit stop diff --git a/packaging/systemd/courier-imap.sysvinit.in b/packaging/systemd/courier-imap.sysvinit.in new file mode 100644 index 0000000..af40fa7 --- /dev/null +++ b/packaging/systemd/courier-imap.sysvinit.in @@ -0,0 +1,125 @@ +#!@SHELL@ +# +# This is a sample /etc/init.d file for Courier-IMAP +# +# chkconfig: 2345 80 30 +# description: Courier-IMAP - IMAP server +# +# +# + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +bindir=@bindir@ +sbindir=@sbindir@ +datarootdir=@datarootdir@ + +case "$1" in +start) +        cd / +	. @sysconfdir@/imapd +	touch /var/lock/subsys/courier-imap + +	echo -n "Starting Courier-IMAP server:" + +	case x$IMAPDSTART in +	x[yY]*) +		# Start daemons. +		@libexecdir@/imapd.rc start +		echo -n " imap" +		;; +	esac + +	. @sysconfdir@/imapd-ssl +	case x$IMAPDSSLSTART in +	x[yY]*) +		if test -x $COURIERTLS +		then + +		# First time we start this, generate a dummy SSL certificate. + +			if test ! -f $TLS_CERTFILE +			then +				echo -n " generating-SSL-certificate..." +				@datadir@/mkimapdcert >/dev/null 2>&1 +			fi +			@libexecdir@/imapd-ssl.rc start +			echo -n " imap-ssl" +		fi +		;; +	esac + +	POP3DSTART="" +	POP3DSSLSTART="" + +	if test -f @sysconfdir@/pop3d +	then +		. @sysconfdir@/pop3d +	fi + +	case x$POP3DSTART in +	x[yY]*) +		# Start daemons. +		@libexecdir@/pop3d.rc start +		echo -n " pop3" +		;; +	esac + +	if test -f @sysconfdir@/pop3d-ssl +	then +		. @sysconfdir@/pop3d-ssl +	fi + +	case x$POP3DSSLSTART in +	x[yY]*) +		if test -x $COURIERTLS +		then + +		# First time we start this, generate a dummy SSL certificate. + +			if test ! -f $TLS_CERTFILE +			then +				echo -n " generating-SSL-certificate..." +				@datadir@/mkpop3dcert >/dev/null 2>&1 +			fi +			@libexecdir@/pop3d-ssl.rc start +			echo -n " pop3-ssl" +		fi +		;; +	esac + +	echo "" +	;; +stop) +        echo -n "Stopping Courier-IMAP server:" +	. @sysconfdir@/imapd +	. @sysconfdir@/imapd-ssl +	@libexecdir@/imapd.rc stop +	echo -n " imap" +	if test -x $COURIERTLS +	then +		@libexecdir@/imapd-ssl.rc stop +		echo -n " imap-ssl" +	fi + +	if test -f @sysconfdir@/pop3d +	then +		@libexecdir@/pop3d.rc stop +		echo -n " pop3" + +		if test -x $COURIERTLS +		then +			@libexecdir@/pop3d-ssl.rc stop +			echo -n " pop3-ssl" +		fi +	fi + +	echo "" +	rm -f /var/lock/subsys/courier-imap +	;; +restart) +	$0 stop +	$0 start +        ;; +esac +exit 0  | 
