summaryrefslogtreecommitdiff
path: root/community/courier-mta
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-06-17 14:31:18 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-06-17 14:31:18 -0300
commit545a4c749d49c3fddbc57c157d650b194e2193d8 (patch)
tree7b06384a2d1d1ec07e26eda99bb0016a0540cbfc /community/courier-mta
parent40df5bbde7fc547479b2cede1f3ffb8e268816b3 (diff)
parent1fcb176285908c33aca3b0f5cb703ec098e5440c (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: multilib/wine/PKGBUILD multilib/zsnes/PKGBUILD testing/frozen-bubble/PKGBUILD testing/perl-sdl/PKGBUILD
Diffstat (limited to 'community/courier-mta')
-rw-r--r--community/courier-mta/PKGBUILD35
-rw-r--r--community/courier-mta/courier-mta.install17
-rw-r--r--community/courier-mta/esmtpd-ssl.rc.d45
-rw-r--r--community/courier-mta/esmtpd.rc.d45
-rw-r--r--community/courier-mta/imapd-ssl.rc.d45
-rw-r--r--community/courier-mta/imapd.rc.d45
-rw-r--r--community/courier-mta/pop3d-ssl.rc.d45
-rw-r--r--community/courier-mta/pop3d.rc.d45
-rw-r--r--community/courier-mta/webmaild.rc.d45
9 files changed, 361 insertions, 6 deletions
diff --git a/community/courier-mta/PKGBUILD b/community/courier-mta/PKGBUILD
index 7bee3245f..c2c4b64dc 100644
--- a/community/courier-mta/PKGBUILD
+++ b/community/courier-mta/PKGBUILD
@@ -9,7 +9,7 @@
pkgname=courier-mta
pkgver=0.66.1
-pkgrel=1
+pkgrel=3
pkgdesc="IMAP(s)/POP3(s) and SMTP Server with ML-manager, webmail and webconfig"
arch=(i686 x86_64 'mips64el')
license=('GPL2')
@@ -25,16 +25,34 @@ url="http://courier-mta.org"
depends=('courier-authlib>=0.63.0' 'fam' 'gcc-libs' 'gdbm' 'pcre' 'mime-types' 'ca-certificates')
optdepends=('libldap')
makedepends=('apache>=2.2.9-3' 'pam>=1.0.1-2' 'expect' 'gnupg' 'libldap' 'fam')
-provides=('smtp-server' 'imap-server' 'pop3-server' 'courier-imap' 'courier-maildrop')
-conflicts=('courier-imap' 'smtp-server' 'imap-server' 'courier-maildrop' 'ucspi-tcp')
+provides=('smtp-server' 'smtp-forwarder' 'imap-server' 'pop3-server' 'courier-imap' 'courier-maildrop')
+conflicts=('courier-imap' 'smtp-forwarder' 'smtp-server' 'imap-server' 'courier-maildrop' 'ucspi-tcp')
options=('!libtool')
install=courier-mta.install
source=(http://downloads.sourceforge.net/project/courier/courier/${pkgver}/courier-${pkgver}.tar.bz2
courier-mta.rc.d
- courier-mta.conf.d)
+ courier-mta.conf.d
+ esmtpd.rc.d
+ esmtpd-ssl.rc.d
+ imapd.rc.d
+ imapd-ssl.rc.d
+ pop3d.rc.d
+ pop3d-ssl.rc.d
+ webmaild.rc.d)
md5sums=('79250d71d88ba2bcb630b7356f0250cd'
'e140f320968e57cfe459cd7a3b4017e0'
- 'f3ff70b40c7a1f7a017e8c4cc4d92f4f')
+ 'f3ff70b40c7a1f7a017e8c4cc4d92f4f'
+ '799ddd56ff6c9cff132e8c771dde23d9'
+ 'c3b634ea6a671b660bf6a660cef57138'
+ 'd7c951a7e55674778077d5123ec41006'
+ 'dabac9fa0e46872049c02ef6bf83b1f0'
+ '6e9e176eb966759a1f2e3838fccf4e3c'
+ '5c0ddedca1cf2298182dbbb461c189bf'
+ 'ec5c0383d617c1f4877ebba9a9727ef4')
+
+# MIGRATION NOTE:
+# In 2012, support for courier-mta.conf.d and courier-mta.rc.d will be removed.
+# Remove those files and this note and also courier-mta.install
build() {
cd ${srcdir}/courier-${pkgver}
@@ -97,6 +115,13 @@ package() {
# arch specific scripts
install -Dm 644 ${srcdir}/${pkgname}.conf.d ${pkgdir}/etc/conf.d/courier-mta
install -Dm 755 ${srcdir}/${pkgname}.rc.d ${pkgdir}/etc/rc.d/courier-mta
+ install -D -m 755 ${srcdir}/imapd.rc.d ${pkgdir}/etc/rc.d/imapd
+ install -D -m 755 ${srcdir}/imapd-ssl.rc.d ${pkgdir}/etc/rc.d/imapd-ssl
+ install -D -m 755 ${srcdir}/pop3d.rc.d ${pkgdir}/etc/rc.d/pop3d
+ install -D -m 755 ${srcdir}/pop3d-ssl.rc.d ${pkgdir}/etc/rc.d/pop3d-ssl
+ install -D -m 755 ${srcdir}/esmtpd.rc.d ${pkgdir}/etc/rc.d/imapd-ssl
+ install -D -m 755 ${srcdir}/esmtpd-ssl.rc.d ${pkgdir}/etc/rc.d/pop3d
+ install -D -m 755 ${srcdir}/webmaild.rc.d ${pkgdir}/etc/rc.d/pop3d-ssl
#install -Dm 655 ${srcdir}/courier-webmail-cleancache.cron.hourly \
# ${pkgdir}/etc/cron.hourly/courier-webmail-cleancache
# bug http://bugs.archlinux.org/task/5154
diff --git a/community/courier-mta/courier-mta.install b/community/courier-mta/courier-mta.install
index eac627867..64de4da6b 100644
--- a/community/courier-mta/courier-mta.install
+++ b/community/courier-mta/courier-mta.install
@@ -18,6 +18,21 @@ pre_upgrade() {
# arg 2: the old package version
post_upgrade() {
post_install $1
+ echo "Please migrate to the new daemon format:"
+ echo "/etc/rc.d/courier-imap has been split into separate daemons:"
+ echo " imapd, imads-ssl, pop3d, pop3d-ssl"
+ echo "This elimates the need for /etc/conf.d/courier-imap"
+ echo "Update your /etc/rc.conf and manually add the desired daemons. Make sure"
+ echo "you first start authdaemond before any other of these daemons."
+ echo "Example prior to this change:"
+ echo " DAEMONS=( ... courier-mta ...)"
+ echo "Example after this change:"
+ echo " DAEMONS=( ... authdaemond esmtpd esmtpd-ssl imapd imapd-ssl"
+ echo " pop3d pop3d-ssl webmaild ... )"
+ echo "This allows better control over the daemons and will generate"
+ echo "correct entries in /run/daemons"
+ echo "An old configuration will keep working but please do migrate in time"
+ echo "as support for this will be removed some time in 2012."
}
@@ -28,7 +43,7 @@ pre_remove() {
cp /etc/courier/aliases/system /etc/courier/_backup/aliases.system
cp /etc/courier/smtpaccess/default /etc/courier/_backup/smtpaccess.default
cat << EOM
- --> the /etc/courier/aliase/system and the /etc/courier/smtpaccess/default
+ --> the /etc/courier/aliases/system and the /etc/courier/smtpaccess/default
--> files have been backed up to /etc/courier/_backup since the *.pacsave
--> files cannot stay in place. Read about couriers alias handling from the
--> documentation!
diff --git a/community/courier-mta/esmtpd-ssl.rc.d b/community/courier-mta/esmtpd-ssl.rc.d
new file mode 100644
index 000000000..78001332f
--- /dev/null
+++ b/community/courier-mta/esmtpd-ssl.rc.d
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+
+ [ -d /var/run/courier ] || mkdir -p /var/run/courier
+ chown courier:courier /var/run/courier
+
+ if [ ! -f /var/run/daemons/authdaemond ]; then
+ echo "ERROR: authdaemond is not running"
+ stat_fail
+ exit 1
+ fi
+
+ stat_busy "Starting Courier esmtpd-ssl"
+ /usr/sbin/esmtpd-ssl start
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon esmtpd-ssl
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Courier esmtpd-ssl"
+ /usr/sbin/esmtpd-ssl stop > /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon esmtpd-ssl
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/community/courier-mta/esmtpd.rc.d b/community/courier-mta/esmtpd.rc.d
new file mode 100644
index 000000000..951aa3e6e
--- /dev/null
+++ b/community/courier-mta/esmtpd.rc.d
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+
+ [ -d /var/run/courier ] || mkdir -p /var/run/courier
+ chown courier:courier /var/run/courier
+
+ if [ ! -f /var/run/daemons/authdaemond ]; then
+ echo "ERROR: authdaemond is not running"
+ stat_fail
+ exit 1
+ fi
+
+ stat_busy "Starting Courier esmtpd"
+ /usr/sbin/esmtpd start
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon esmtpd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Courier esmtpd"
+ /usr/sbin/esmtpd stop > /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon esmtpd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/community/courier-mta/imapd-ssl.rc.d b/community/courier-mta/imapd-ssl.rc.d
new file mode 100644
index 000000000..7b21fda76
--- /dev/null
+++ b/community/courier-mta/imapd-ssl.rc.d
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+
+ [ -d /var/run/courier ] || mkdir -p /var/run/courier
+ chown courier:courier /var/run/courier
+
+ if [ ! -f /var/run/daemons/authdaemond ]; then
+ echo "ERROR: authdaemond is not running"
+ stat_fail
+ exit 1
+ fi
+
+ stat_busy "Starting Courier imapd-ssl"
+ /usr/sbin/imapd-ssl start
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon imapd-ssl
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Courier imapd-ssl"
+ /usr/sbin/imapd-ssl stop > /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon imapd-ssl
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/community/courier-mta/imapd.rc.d b/community/courier-mta/imapd.rc.d
new file mode 100644
index 000000000..7a8bff410
--- /dev/null
+++ b/community/courier-mta/imapd.rc.d
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+
+ [ -d /var/run/courier ] || mkdir -p /var/run/courier
+ chown courier:courier /var/run/courier
+
+ if [ ! -f /var/run/daemons/authdaemond ]; then
+ echo "ERROR: authdaemond is not running"
+ stat_fail
+ exit 1
+ fi
+
+ stat_busy "Starting Courier imapd"
+ /usr/sbin/imapd start
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon imapd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Courier imapd"
+ /usr/sbin/imapd stop > /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon imapd
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/community/courier-mta/pop3d-ssl.rc.d b/community/courier-mta/pop3d-ssl.rc.d
new file mode 100644
index 000000000..730c6edbf
--- /dev/null
+++ b/community/courier-mta/pop3d-ssl.rc.d
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+
+ [ -d /var/run/courier ] || mkdir -p /var/run/courier
+ chown courier:courier /var/run/courier
+
+ if [ ! -f /var/run/daemons/authdaemond ]; then
+ echo "ERROR: authdaemond is not running"
+ stat_fail
+ exit 1
+ fi
+
+ stat_busy "Starting Courier pop3d-ssl"
+ /usr/sbin/pop3d-ssl start
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon pop3d-ssl
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Courier pop3d-ssl"
+ /usr/sbin/pop3d-ssl stop > /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon pop3d-ssl
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/community/courier-mta/pop3d.rc.d b/community/courier-mta/pop3d.rc.d
new file mode 100644
index 000000000..6ec1d82b6
--- /dev/null
+++ b/community/courier-mta/pop3d.rc.d
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+
+ [ -d /var/run/courier ] || mkdir -p /var/run/courier
+ chown courier:courier /var/run/courier
+
+ if [ ! -f /var/run/daemons/authdaemond ]; then
+ echo "ERROR: authdaemond is not running"
+ stat_fail
+ exit 1
+ fi
+
+ stat_busy "Starting Courier pop3d"
+ /usr/sbin/pop3d start
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon pop3d
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Courier pop3d"
+ /usr/sbin/pop3d stop > /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon pop3d
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/community/courier-mta/webmaild.rc.d b/community/courier-mta/webmaild.rc.d
new file mode 100644
index 000000000..2337e3ce8
--- /dev/null
+++ b/community/courier-mta/webmaild.rc.d
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+case "$1" in
+ start)
+
+ [ -d /var/run/courier ] || mkdir -p /var/run/courier
+ chown courier:courier /var/run/courier
+
+ if [ ! -f /var/run/daemons/authdaemond ]; then
+ echo "ERROR: authdaemond is not running"
+ stat_fail
+ exit 1
+ fi
+
+ stat_busy "Starting Courier webmaild"
+ /usr/sbin/webmaild start
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon webmaild
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Courier webmaild"
+ /usr/sbin/webmaild stop > /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon webmaild
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0