diff options
Diffstat (limited to 'net-mail')
-rw-r--r-- | net-mail/courier-imap/files/authdaemond.rc6 | 52 | ||||
-rw-r--r-- | net-mail/courier-imap/files/courier-imapd-ssl.rc6 | 36 | ||||
-rw-r--r-- | net-mail/courier-imap/files/courier-imapd.rc6 | 31 | ||||
-rw-r--r-- | net-mail/courier-imap/files/courier-pop3d-ssl.rc6 | 36 | ||||
-rw-r--r-- | net-mail/courier-imap/files/courier-pop3d.rc6 | 31 | ||||
-rw-r--r-- | net-mail/courier-imap/files/gentoo-imapd-ssl.rc | 35 | ||||
-rw-r--r-- | net-mail/courier-imap/files/gentoo-imapd.rc | 35 | ||||
-rw-r--r-- | net-mail/courier-imap/files/gentoo-pop3d-ssl.rc | 34 | ||||
-rw-r--r-- | net-mail/courier-imap/files/gentoo-pop3d.rc | 34 | ||||
-rw-r--r-- | net-mail/courier-imap/files/mkpop3dcert | 39 |
10 files changed, 363 insertions, 0 deletions
diff --git a/net-mail/courier-imap/files/authdaemond.rc6 b/net-mail/courier-imap/files/authdaemond.rc6 new file mode 100644 index 000000000000..319cf292d52a --- /dev/null +++ b/net-mail/courier-imap/files/authdaemond.rc6 @@ -0,0 +1,52 @@ +#!/sbin/runscript +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-mail/courier-imap/files/authdaemond.rc6,v 1.1 2002/06/13 19:01:00 nitro Exp $ + +depend() { + need net +} + +checkconfig() { + if [ ! -e /etc/courier-imap/authdaemonrc ] ; then + eerror "You need an /etc/courier-imap/authdaemonrc file to run authdaemon" + return 1 + fi +} + +setauth() { + source /etc/courier-imap/authdaemonrc + AUTHLIB="/usr/lib/courier-imap/authlib" + + if [ "${version}" != "" ] ; then + AUTHDAEMOND="$version" + elif [ -x $AUTHLIB/authdaemond.pgsql ] ; then + AUTHDAEMOND="authdaemond.pqsql" + elif [ -x $AUTHLIB/authdaemond.mysql ] ; then + AUTHDAEMOND="authdaemond.mysql" + elif [ -x $AUTHLIB/authdaemond.ldap ] ; then + AUTHDAEMOND="authdaemond.ldap" + else + AUTHDAEMOND="authdaemond.plain" + fi +} + +start() { + checkconfig || return 1 + setauth + + ebegin "Starting ${AUTHDAEMOND}" + start-stop-daemon --quiet --start --exec \ + /usr/bin/env - "${AUTHLIB}/${AUTHDAEMOND}" start \ + --pidfile /var/lib/courier-imap/authdaemon/pid + eend $? +} + +stop() { + setauth + + ebegin "Stopping ${AUTHDAEMOND}" + start-stop-daemon --quiet --stop \ + --pidfile /var/lib/courier-imap/authdaemon/pid + eend $? +} diff --git a/net-mail/courier-imap/files/courier-imapd-ssl.rc6 b/net-mail/courier-imap/files/courier-imapd-ssl.rc6 new file mode 100644 index 000000000000..772f55b7edd8 --- /dev/null +++ b/net-mail/courier-imap/files/courier-imapd-ssl.rc6 @@ -0,0 +1,36 @@ +#!/sbin/runscript +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-mail/courier-imap/files/courier-imapd-ssl.rc6,v 1.1 2002/06/13 19:01:00 nitro Exp $ + +depend() { + need net authdaemond +} + +source /etc/courier-imap/imapd-ssl + +checkconfig() { + if [ ! -e /etc/courier-imap/imapd-ssl ] ; then + eerror "You need an /etc/courier-imap/imapd-ssl file to run courier-imapd" + return 1 + fi + if [ ! -e /etc/courier-imap/imapd.pem ] ; then + eerror "You need to create a SSL certificate to use IMAP over SSL" + eerror "Edit /etc/courier-imap/imapd.cnf, then run: mkimapdcert" + return 2 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting courier-imapd over SSL" + start-stop-daemon --quiet --start --exec /usr/bin/env - /usr/lib/courier-imap/gentoo-imapd-ssl.rc \ + --pid=$SSLPIDFILE + eend $? +} + +stop() { + ebegin "Stopping courier-imapd over SSL" + start-stop-daemon --quiet --stop --pid=$SSLPIDFILE + eend $? +} diff --git a/net-mail/courier-imap/files/courier-imapd.rc6 b/net-mail/courier-imap/files/courier-imapd.rc6 new file mode 100644 index 000000000000..4756825c8658 --- /dev/null +++ b/net-mail/courier-imap/files/courier-imapd.rc6 @@ -0,0 +1,31 @@ +#!/sbin/runscript +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-mail/courier-imap/files/courier-imapd.rc6,v 1.1 2002/06/13 19:01:00 nitro Exp $ + +depend() { + need net authdaemond +} + +source /etc/courier-imap/imapd + +checkconfig() { + if [ ! -e /etc/courier-imap/imapd ] ; then + eerror "You need an /etc/courier-imap/imapd file to run courier-imapd" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting courier-imapd" + start-stop-daemon --quiet --start --exec /usr/bin/env - /usr/lib/courier-imap/gentoo-imapd.rc \ + --pid=$PIDFILE + eend $? +} + +stop() { + ebegin "Stopping courier-imapd" + start-stop-daemon --quiet --stop --pid=$PIDFILE + eend $? +} diff --git a/net-mail/courier-imap/files/courier-pop3d-ssl.rc6 b/net-mail/courier-imap/files/courier-pop3d-ssl.rc6 new file mode 100644 index 000000000000..c4777823e21a --- /dev/null +++ b/net-mail/courier-imap/files/courier-pop3d-ssl.rc6 @@ -0,0 +1,36 @@ +#!/sbin/runscript +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-mail/courier-imap/files/courier-pop3d-ssl.rc6,v 1.1 2002/06/13 19:01:00 nitro Exp $ + +depend() { + need net authdaemond +} + +source /etc/courier-imap/pop3d-ssl + +checkconfig() { + if [ ! -e /etc/courier-imap/pop3d-ssl ] ; then + eerror "You need an /etc/courier-imap/pop3d-ssl file to run courier-pop3d" + return 1 + fi + if [ ! -e /etc/courier-imap/pop3d.pem ] ; then + eerror "You need to create a SSL certificate to use POP3 over SSL" + eerror "Edit /etc/courier-imap/pop3d.cnf, then run: mkpop3dcert" + return 2 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting courier-pop3d over SSL" + start-stop-daemon --quiet --start --exec /usr/bin/env - /usr/lib/courier-imap/gentoo-pop3d-ssl.rc \ + --pidfile $SSLPIDFILE + eend $? +} + +stop() { + ebegin "Stopping courier-pop3d over SSL" + start-stop-daemon --quiet --stop --pidfile $SSLPIDFILE + eend $? +} diff --git a/net-mail/courier-imap/files/courier-pop3d.rc6 b/net-mail/courier-imap/files/courier-pop3d.rc6 new file mode 100644 index 000000000000..ec6237ec0377 --- /dev/null +++ b/net-mail/courier-imap/files/courier-pop3d.rc6 @@ -0,0 +1,31 @@ +#!/sbin/runscript +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-mail/courier-imap/files/courier-pop3d.rc6,v 1.1 2002/06/13 19:01:00 nitro Exp $ + +depend() { + need net authdaemond +} + +source /etc/courier-imap/pop3d + +checkconfig() { + if [ ! -e /etc/courier-imap/pop3d ] ; then + eerror "You need an /etc/courier-imap/pop3d file to run courier-pop3d" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting courier-pop3d" + start-stop-daemon --quiet --start --exec /usr/bin/env - /usr/lib/courier-imap/gentoo-pop3d.rc \ + --pidfile $PIDFILE + eend $? +} + +stop() { + ebegin "Stopping courier-pop3d" + start-stop-daemon --quiet --stop --pidfile $PIDFILE + eend $? +} diff --git a/net-mail/courier-imap/files/gentoo-imapd-ssl.rc b/net-mail/courier-imap/files/gentoo-imapd-ssl.rc new file mode 100644 index 000000000000..488bd8acf256 --- /dev/null +++ b/net-mail/courier-imap/files/gentoo-imapd-ssl.rc @@ -0,0 +1,35 @@ +#!/bin/sh +# $Id: gentoo-imapd-ssl.rc,v 1.1 2002/06/13 19:01:00 nitro 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 +source /etc/courier-imap/imapd-ssl + +LIBAUTHMODULES="" +for f in `echo $AUTHMODULES` +do + LIBAUTHMODULES="$LIBAUTHMODULES /usr/lib/courier-imap/authlib/$f" +done + +ulimit -d $IMAP_ULIMITD +export IMAP_TLS=1 +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/$/;/'` + +/usr/lib/courier-imap/couriertcpd -address=$SSLADDRESS \ + -stderrlogger=/usr/lib/courier-imap/logger \ + -stderrloggername=imapd-ssl \ + -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \ + -pid=$SSLPIDFILE $TCPDOPTS \ + $SSLPORT $COURIERTLS -server -tcpd \ + ${exec_prefix}/sbin/imaplogin $LIBAUTHMODULES \ + /usr/sbin/courier-imapd ${MAILDIR} diff --git a/net-mail/courier-imap/files/gentoo-imapd.rc b/net-mail/courier-imap/files/gentoo-imapd.rc new file mode 100644 index 000000000000..6691090610ee --- /dev/null +++ b/net-mail/courier-imap/files/gentoo-imapd.rc @@ -0,0 +1,35 @@ +#!/bin/sh +# $Id: gentoo-imapd.rc,v 1.1 2002/06/13 19:01:00 nitro 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 + +LIBAUTHMODULES="" +for f in `echo $AUTHMODULES` +do + LIBAUTHMODULES="$LIBAUTHMODULES /usr/lib/courier-imap/authlib/$f" +done + +ulimit -d $IMAP_ULIMITD +export IMAP_STARTTLS=$IMAPDSTARTTLS +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/$/;/'` + +/usr/lib/courier-imap/couriertcpd -address=$ADDRESS \ + -stderrlogger=/usr/lib/courier-imap/logger \ + -stderrloggername=imapd \ + -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \ + -pid=$PIDFILE $TCPDOPTS \ + $PORT ${exec_prefix}/sbin/imaplogin $LIBAUTHMODULES \ + /usr/sbin/courier-imapd $MAILDIR diff --git a/net-mail/courier-imap/files/gentoo-pop3d-ssl.rc b/net-mail/courier-imap/files/gentoo-pop3d-ssl.rc new file mode 100644 index 000000000000..e8aedeedd6be --- /dev/null +++ b/net-mail/courier-imap/files/gentoo-pop3d-ssl.rc @@ -0,0 +1,34 @@ +#!/bin/sh +# $Id: gentoo-pop3d-ssl.rc,v 1.1 2002/06/13 19:01:00 nitro 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/pop3d +source /etc/courier-imap/pop3d-ssl + +LIBAUTHMODULES="" +for f in `echo $AUTHMODULES` +do + LIBAUTHMODULES="$LIBAUTHMODULES /usr/lib/courier-imap/authlib/$f" +done + +export POP3_TLS=1 +eval `sed -n '/^#/d;/=/p' </etc/courier-imap/pop3d | \ + sed 's/=.*//;s/^/export /;s/$/;/'` +eval `sed -n '/^#/d;/=/p' </etc/courier-imap/pop3d-ssl | \ + sed 's/=.*//;s/^/export /;s/$/;/'` + +/usr/lib/courier-imap/couriertcpd -address=$SSLADDRESS \ + -stderrlogger=/usr/lib/courier-imap/logger \ + -stderrloggername=pop3d-ssl \ + -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \ + -pid=$SSLPIDFILE $TCPDOPTS \ + $SSLPORT $COURIERTLS -server -tcpd \ + ${exec_prefix}/sbin/pop3login $LIBAUTHMODULES \ + /usr/sbin/courier-pop3d ${MAILDIR} diff --git a/net-mail/courier-imap/files/gentoo-pop3d.rc b/net-mail/courier-imap/files/gentoo-pop3d.rc new file mode 100644 index 000000000000..007a4c87f02a --- /dev/null +++ b/net-mail/courier-imap/files/gentoo-pop3d.rc @@ -0,0 +1,34 @@ +#!/bin/sh +# $Id: gentoo-pop3d.rc,v 1.1 2002/06/13 19:01:00 nitro 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/pop3d-ssl +source /etc/courier-imap/pop3d + +LIBAUTHMODULES="" +for f in `echo $AUTHMODULES` +do + LIBAUTHMODULES="$LIBAUTHMODULES /usr/lib/courier-imap/authlib/$f" +done + +export POP3_STARTTLS=$POP3DSTARTTLS +TLS_PROTOCOL=$TLS_STARTTLS_PROTOCOL +eval `sed -n '/^#/d;/=/p' </etc/courier-imap/pop3d | \ + sed 's/=.*//;s/^/export /;s/$/;/'` +eval `sed -n '/^#/d;/=/p' </etc/courier-imap/pop3d-ssl | \ + sed 's/=.*//;s/^/export /;s/$/;/'` + +/usr/lib/courier-imap/couriertcpd -address=$ADDRESS \ + -stderrlogger=/usr/lib/courier-imap/logger \ + -stderrloggername=pop3d \ + -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \ + -pid=$PIDFILE $TCPDOPTS \ + $PORT ${exec_prefix}/sbin/pop3login $LIBAUTHMODULES \ + /usr/sbin/pop3d $MAILDIR diff --git a/net-mail/courier-imap/files/mkpop3dcert b/net-mail/courier-imap/files/mkpop3dcert new file mode 100644 index 000000000000..6a55e99f9c8e --- /dev/null +++ b/net-mail/courier-imap/files/mkpop3dcert @@ -0,0 +1,39 @@ +#! /bin/sh +# +# mkimapdcert,v 1.1 2001/01/02 03:54:25 drobbins Exp +# +# Copyright 2000 Double Precision, Inc. See COPYING for +# distribution information. +# +# This is a short script to quickly generate a self-signed X.509 key for +# IMAP over SSL. Normally this script would get called by an automatic +# package installation routine. + +test -x /usr/bin/openssl || exit 0 + +prefix="/usr" +pemfile="/etc/courier-imap/pop3d.pem" +randfile="/etc/courier-imap/pop3d.rand" + +if test -f $pemfile +then + echo "$pemfile already exists." + exit 1 +fi + +cp /dev/null $pemfile +chmod 600 $pemfile +chown root $pemfile + +cleanup() { + rm -f $pemfile + rm -f $randfile + exit 1 +} + +dd if=/dev/urandom of=$randfile count=1 2>/dev/null +/usr/bin/openssl req -new -x509 -days 365 -nodes \ + -config /etc/courier-imap/pop3d.cnf -out $pemfile -keyout $pemfile || cleanup +/usr/bin/openssl gendh -rand $randfile 512 >> $pemfile || cleanup +/usr/bin/openssl x509 -subject -dates -fingerprint -noout -in $pemfile || cleanup +rm -f $randfile |