summaryrefslogtreecommitdiff
path: root/community/courier-mta
diff options
context:
space:
mode:
Diffstat (limited to 'community/courier-mta')
-rw-r--r--community/courier-mta/PKGBUILD9
-rw-r--r--community/courier-mta/courier-mta.install2
-rw-r--r--community/courier-mta/courier.rc.d45
3 files changed, 52 insertions, 4 deletions
diff --git a/community/courier-mta/PKGBUILD b/community/courier-mta/PKGBUILD
index 50418889d..ced394074 100644
--- a/community/courier-mta/PKGBUILD
+++ b/community/courier-mta/PKGBUILD
@@ -8,8 +8,8 @@
pkgname=courier-mta
-pkgver=0.66.1
-pkgrel=4
+pkgver=0.66.3
+pkgrel=1
pkgdesc="IMAP(s)/POP3(s) and SMTP Server with ML-manager, webmail and webconfig"
arch=(i686 x86_64)
license=('GPL2')
@@ -30,6 +30,7 @@ conflicts=('courier-imap' 'smtp-forwarder' 'smtp-server' 'imap-server' 'courier-
options=('!libtool')
install=courier-mta.install
source=(http://downloads.sourceforge.net/project/courier/courier/${pkgver}/courier-${pkgver}.tar.bz2
+ courier.rc.d
courier-mta.rc.d
courier-mta.conf.d
esmtpd.rc.d
@@ -39,7 +40,8 @@ source=(http://downloads.sourceforge.net/project/courier/courier/${pkgver}/couri
pop3d.rc.d
pop3d-ssl.rc.d
webmaild.rc.d)
-md5sums=('79250d71d88ba2bcb630b7356f0250cd'
+md5sums=('3b28f14afe3db09b74b4845323c3e982'
+ 'bc2bdbc2f5c95cee8304f98a3b3a4895'
'e140f320968e57cfe459cd7a3b4017e0'
'f3ff70b40c7a1f7a017e8c4cc4d92f4f'
'799ddd56ff6c9cff132e8c771dde23d9'
@@ -115,6 +117,7 @@ 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}/courier.rc.d ${pkgdir}/etc/rc.d/courier
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
diff --git a/community/courier-mta/courier-mta.install b/community/courier-mta/courier-mta.install
index 64de4da6b..e835e3efd 100644
--- a/community/courier-mta/courier-mta.install
+++ b/community/courier-mta/courier-mta.install
@@ -27,7 +27,7 @@ post_upgrade() {
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 " DAEMONS=( ... authdaemond courier 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"
diff --git a/community/courier-mta/courier.rc.d b/community/courier-mta/courier.rc.d
new file mode 100644
index 000000000..7c321d452
--- /dev/null
+++ b/community/courier-mta/courier.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 daemon"
+ /usr/sbin/courier start
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon courier
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Courier daemon"
+ /usr/sbin/courier stop > /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon courier
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0