summaryrefslogtreecommitdiff
path: root/community-staging
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2011-11-23 23:15:26 +0000
committerroot <root@rshg054.dnsready.net>2011-11-23 23:15:26 +0000
commit1e1e4927b05d9b242bfe83794e3a98ab2c8f79ef (patch)
tree070846cb6770ab17d394d88c3f0cd3ad3eb89842 /community-staging
parent851ab9aa99e9bda38f88b5f5ade096c9137e11c8 (diff)
Wed Nov 23 23:15:26 UTC 2011
Diffstat (limited to 'community-staging')
-rw-r--r--community-staging/courier-authlib/PKGBUILD63
-rw-r--r--community-staging/courier-authlib/authdaemond.rc.d48
-rw-r--r--community-staging/courier-authlib/courier-authlib.install32
-rw-r--r--community-staging/courier-imap/PKGBUILD94
-rw-r--r--community-staging/courier-imap/courier-imap.conf.d18
-rw-r--r--community-staging/courier-imap/courier-imap.install16
-rw-r--r--community-staging/courier-imap/courier-imap.pam5
-rw-r--r--community-staging/courier-imap/courier-imap.rc.d62
-rw-r--r--community-staging/courier-imap/imapd-ssl.rc.d47
-rw-r--r--community-staging/courier-imap/imapd.rc.d47
-rw-r--r--community-staging/courier-imap/pop3d-ssl.rc.d47
-rw-r--r--community-staging/courier-imap/pop3d.rc.d47
-rw-r--r--community-staging/courier-maildrop/PKGBUILD46
-rw-r--r--community-staging/courier-mta/PKGBUILD143
-rw-r--r--community-staging/courier-mta/courier-mta.conf.d18
-rw-r--r--community-staging/courier-mta/courier-mta.install61
-rw-r--r--community-staging/courier-mta/courier-mta.rc.d60
-rw-r--r--community-staging/courier-mta/courier-webmail-cleancache.cron.hourly6
-rw-r--r--community-staging/courier-mta/courier.rc.d45
-rw-r--r--community-staging/courier-mta/esmtpd-msa.rc.d45
-rw-r--r--community-staging/courier-mta/esmtpd-ssl.rc.d45
-rw-r--r--community-staging/courier-mta/esmtpd.rc.d45
-rw-r--r--community-staging/courier-mta/imapd-ssl.rc.d45
-rw-r--r--community-staging/courier-mta/imapd.rc.d45
-rw-r--r--community-staging/courier-mta/pop3d-ssl.rc.d45
-rw-r--r--community-staging/courier-mta/pop3d.rc.d45
-rw-r--r--community-staging/courier-mta/webmaild.rc.d45
-rw-r--r--community-staging/ntop/PKGBUILD44
-rwxr-xr-xcommunity-staging/ntop/ntop38
-rw-r--r--community-staging/ntop/ntop.conf.d5
-rw-r--r--community-staging/ntop/ntop.install8
31 files changed, 1360 insertions, 0 deletions
diff --git a/community-staging/courier-authlib/PKGBUILD b/community-staging/courier-authlib/PKGBUILD
new file mode 100644
index 000000000..99e43c8c3
--- /dev/null
+++ b/community-staging/courier-authlib/PKGBUILD
@@ -0,0 +1,63 @@
+# $Id: PKGBUILD 53167 2009-09-26 09:48:47Z allan $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: tobias <tobias@archlinux.org>
+# Contributor: Tobias Kieslich <tobias@justdreams.de>
+
+pkgname=courier-authlib
+pkgver=0.63.0
+pkgrel=5
+pkgdesc="Authentification library for the courier mailserver(s)"
+arch=(i686 x86_64)
+license=('GPL2')
+url="http://courier-mta.org/authlib/"
+backup=('etc/authlib/authdaemonrc' 'etc/authlib/authldaprc' \
+ 'etc/authlib/authmysqlrc' 'etc/authlib/authpgsqlrc')
+depends=('openssl' 'gdbm' 'perl' 'libtool' 'expect')
+makedepends=('pam' 'expect' 'libldap' 'libmysqlclient' 'postgresql-libs>=8.3.0')
+optdepends=('libmysqlclient' 'libldap' 'postgresql-libs')
+conflicts=('courier-imap-mysql' 'courier-imap-pgsql' 'courier-imap-ldap')
+provides=('courier-imap-mysql' 'courier-imap-pgsql' 'courier-imap-ldap')
+options=(!libtool)
+install=${pkgname}.install
+source=(http://downloads.sourceforge.net/project/courier/authlib/${pkgver}/${pkgname}-${pkgver}.tar.bz2
+ authdaemond.rc.d)
+md5sums=('411a927d178f783a1e8fab9964ce0dd2'
+ '911ee9f40d70fafc6bb4cc636c5ad531')
+
+build() {
+ #export MAKEFLAGS="-j1"
+ cd ${srcdir}/${pkgname}-${pkgver}
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --libdir=/usr/lib \
+ --libexecdir=/usr/lib \
+ --with-db=gdbm \
+ --with-mailuser=courier --with-mailgroup=courier \
+ --with-authpam --with-authpwd --with-authshadow \
+ --with-authldap --with-authmysql --with-authpgsql \
+ --with-authuserdb --with-authcram --with-authdaemon
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+ make DESTDIR=${pkgdir} install
+ ###############################################################################
+ # post_installation ---- rename the config file and change ownerschip
+ for distfile in ${pkgdir}/etc/authlib/*.dist; do
+ chown 72:72 ${distfile}
+ mv ${distfile} ${pkgdir}/etc/authlib/`basename ${distfile} .dist`
+ done
+ # copy the .schema; mostly refered to as courier.schema -> rename it
+ install -Dm 444 authldap.schema \
+ ${pkgdir}/etc/openldap/schema/courier.schema
+ ###############################################################################
+ # Install daemon, that wraps couriers bashscript
+ install -Dm 755 ${srcdir}/authdaemond.rc.d ${pkgdir}/etc/rc.d/authdaemond
+ chown -R 72:72 ${pkgdir}/var/spool/authdaemon
+ mkdir ${pkgdir}/var/spool/courier
+ chown -R 72:72 ${pkgdir}/var/spool/courier
+ # docs say we can remove .a files after make
+ find ${pkgdir} -name '*\.a' -exec rm -f {} \;
+}
diff --git a/community-staging/courier-authlib/authdaemond.rc.d b/community-staging/courier-authlib/authdaemond.rc.d
new file mode 100644
index 000000000..ff4abb182
--- /dev/null
+++ b/community-staging/courier-authlib/authdaemond.rc.d
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+start() {
+ stat_busy "Starting Authdaemond"
+ /usr/sbin/authdaemond start &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ ln -s /var/spool/authdaemon/pid /var/run/authdaemond.pid
+ add_daemon authdaemond
+ stat_done
+ fi
+}
+
+stop() {
+ stat_busy "Stopping Authdaemond"
+ /usr/sbin/authdaemond stop &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm -f /var/run/authdaemond.pid
+ rm_daemon authdaemond
+ # housecleaning; just like kids'n toys - don't care when it's needed anymore
+ rm -f /var/spool/authdaemon/{pid.lock,pid,socket} &> /dev/null
+ stat_done
+ fi
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ # calling 'stop' and 'start' without the $0 fails...
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/community-staging/courier-authlib/courier-authlib.install b/community-staging/courier-authlib/courier-authlib.install
new file mode 100644
index 000000000..cbccc636b
--- /dev/null
+++ b/community-staging/courier-authlib/courier-authlib.install
@@ -0,0 +1,32 @@
+# arg 1: the new package version
+post_install() {
+ # creates group and user on virgin systems
+ if [ -z "`grep '^courier::' /etc/group`" ]; then
+ groupadd -g 72 courier >& /dev/null
+ fi
+ if [ -z "`grep '^courier:' /etc/passwd`" ]; then
+ useradd -u 72 -d /var/spool/courier -g courier -s /bin/false courier &>/dev/null
+ fi
+}
+
+# arg 1: the new package version
+# arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+# arg 1: the old package version
+pre_remove() {
+ userdel courier &> /dev/null
+ groupdel courier &> /dev/null
+}
+
+
+post_remove() {
+ /bin/true
+}
+
+op=$1
+shift
+
+$op $*
diff --git a/community-staging/courier-imap/PKGBUILD b/community-staging/courier-imap/PKGBUILD
new file mode 100644
index 000000000..f11205e2f
--- /dev/null
+++ b/community-staging/courier-imap/PKGBUILD
@@ -0,0 +1,94 @@
+# $Id: PKGBUILD 59060 2011-11-21 06:43:48Z svenstaro $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: tobias <tobias@archlinux.org>
+# Committer: Manolis Tzanidakis <manolis@archlinux.org>
+
+pkgname=courier-imap
+pkgver=4.9.3
+pkgrel=5
+pkgdesc="IMAP(s)/POP3(s) Server"
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://www.courier-mta.org/imap/"
+depends=('courier-maildrop>=2.5.0' 'gcc-libs' 'gamin' 'gdbm' 'openssl')
+backup=('etc/courier-imap/imapd.cnf' 'etc/courier-imap/pop3d.cnf' \
+ 'etc/courier-imap/imapd' 'etc/courier-imap/imapd-ssl' \
+ 'etc/courier-imap/pop3d' 'etc/courier-imap/pop3d-ssl'\
+ 'etc/conf.d/courier-imap')
+conflicts=('courier-mta')
+provides=('imap-server' 'pop3-server')
+options=('!libtool')
+install=$pkgname.install
+source=(http://downloads.sourceforge.net/project/courier/imap/${pkgver}/${pkgname}-${pkgver}.tar.bz2
+ courier-imap.conf.d
+ courier-imap.rc.d
+ imapd.rc.d
+ imapd-ssl.rc.d
+ pop3d.rc.d
+ pop3d-ssl.rc.d)
+md5sums=('703ddbb090569436dbda61d0d62b1eb8'
+ '3e08f017f6c5a52dea28f6f0dbd50b86'
+ '500c37831974f4676b67e650c67a59f6'
+ '6574c8046e44698efa7452c4b445d88e'
+ '437167a58efddc523f25180df284da20'
+ '1be23fb224bde93b23da6e771bd1cf01'
+ 'a326309b02fed3d7226d9aac88add7f2')
+
+# MIGRATION NOTE:
+# In 2012, support for courier-imap.conf.d and courier-imap.rc.d will be removed.
+# Remove those files and this note and also courier-imap.install
+
+build() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ # fix a tiny bug
+ sed -i -e \
+ 's|--with-authchangepwdir=/var/tmp/dev/null|--with-authchangepwdir=$libexecdir/authlib|' \
+ configure && chmod 755 configure
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc/courier-imap \
+ --libexecdir=/usr/lib/courier-imap \
+ --localstatedir=/var/spool/courier-imap \
+ --disable-root-check \
+ --enable-unicode \
+ --enable-workarounds-for-imap-client-bugs \
+ --with-piddir=/var/run/courier \
+ --with-trashquota \
+ --with-db=gdbm \
+ --with-trashquota \
+ --with-mailuser=courier --with-mailgroup=courier
+ make
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}
+
+ make DESTDIR=${pkgdir} install
+
+ # cleanup - provided by courier-maildrop
+ rm ${pkgdir}/usr/bin/{deliverquota,maildirmake}
+ rm ${pkgdir}/usr/share/man/man1/maildirmake*
+ rm ${pkgdir}/usr/share/man/man8/deliverquota*
+ find ${pkgdir} -name '*\.a' -exec -rm -f {} \;
+ ###############################################################################
+ # this is what usually "make install-configure" does
+ # *.dist files get rid of "dist"
+ for distfile in ${pkgdir}/etc/courier-imap/*.dist; do
+ mv ${distfile} ${pkgdir}/etc/courier-imap/$(basename ${distfile} .dist)
+ done
+ sed -i 's|TLS_CERTFILE=/usr/share/|TLS_CERTFILE=/etc/courier-imap/|' \
+ ${pkgdir}/etc/courier-imap/*-ssl
+ for pamfile in imap/*.pam; do
+ sed -i "s|/lib/security/||;s|pam_pwdb|pam_unix|" ${pamfile}
+ install -Dm 644 ${pamfile} \
+ ${pkgdir}/etc/pam.d/$(basename ${pamfile} .pam | sed "s/d$//")
+ done
+ # install thingies
+ install -D -m 755 ${srcdir}/courier-imap.rc.d ${pkgdir}/etc/rc.d/courier-imap
+ 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 644 ${srcdir}/courier-imap.conf.d ${pkgdir}/etc/conf.d/courier-imap
+}
diff --git a/community-staging/courier-imap/courier-imap.conf.d b/community-staging/courier-imap/courier-imap.conf.d
new file mode 100644
index 000000000..66049470d
--- /dev/null
+++ b/community-staging/courier-imap/courier-imap.conf.d
@@ -0,0 +1,18 @@
+#
+# Parameters to be passed to courier-imap
+#
+#
+# Select the service you want started with courier-imap
+#
+# Available options :
+# imapd pop3d imapd-ssl pop3d-ssl
+#
+CI_DAEMONS="imapd pop3d imapd-ssl pop3d-ssl"
+
+# If you want authdaemond to be automatically started and
+# stopped by courier-imap, set this to "true"
+AUTO_AUTHDAEMON="false"
+
+# Courier will start this many seconds after autodaemond if
+# AUTO_AUTHDAEMON is set to "true"
+AUTO_AUTHDAEMON_LAG=2
diff --git a/community-staging/courier-imap/courier-imap.install b/community-staging/courier-imap/courier-imap.install
new file mode 100644
index 000000000..9046777a7
--- /dev/null
+++ b/community-staging/courier-imap/courier-imap.install
@@ -0,0 +1,16 @@
+post_upgrade() {
+ 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-imap ...)"
+ echo "Example after this change:"
+ echo " DAEMONS=( ... authdaemond imapd imapd-ssl pop3d pop3d-ssl ... )"
+ 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."
+}
diff --git a/community-staging/courier-imap/courier-imap.pam b/community-staging/courier-imap/courier-imap.pam
new file mode 100644
index 000000000..fa52db541
--- /dev/null
+++ b/community-staging/courier-imap/courier-imap.pam
@@ -0,0 +1,5 @@
+#%PAM-1.0
+auth required pam_unix.so nullok
+account required pam_unix.so
+password required pam_unix.so
+session required pam_unix.so
diff --git a/community-staging/courier-imap/courier-imap.rc.d b/community-staging/courier-imap/courier-imap.rc.d
new file mode 100644
index 000000000..8876fe401
--- /dev/null
+++ b/community-staging/courier-imap/courier-imap.rc.d
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+CI_DAEMONS=
+[ -f /etc/conf.d/courier-imap ] && . /etc/conf.d/courier-imap
+[ -z $AUTO_AUTHDAEMON_LAG ] && AUTO_AUTHDAEMON_LAG=2
+[ -z $AUTO_AUTHDAEMON ] && AUTO_AUTHDAEMON="false"
+
+. /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 [ "$AUTO_AUTHDAEMON" == "true" ]; then
+ /etc/rc.d/authdaemond start
+ sleep ${AUTO_AUTHDAEMON_LAG}
+ fi
+ if ck_daemon authdaemond; then
+ echo "ERROR: authdaemond is not running"
+ stat_fail
+ exit 1
+ fi
+ for daemon in $CI_DAEMONS; do
+ stat_busy "Starting Courier ${daemon}"
+ /usr/lib/courier-imap/${daemon}.rc start
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon $daemon
+ stat_done
+ fi
+ done
+ ;;
+ stop)
+ for daemon in $CI_DAEMONS; do
+ stat_busy "Stopping Courier ${daemon}"
+ /usr/lib/courier-imap/$daemon.rc stop > /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon $daemon
+ stat_done
+ fi
+ done
+ if [ "$AUTO_AUTHDAEMON" == "true" ]; then
+ /etc/rc.d/authdaemond stop
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
+~
+~
diff --git a/community-staging/courier-imap/imapd-ssl.rc.d b/community-staging/courier-imap/imapd-ssl.rc.d
new file mode 100644
index 000000000..6730d452c
--- /dev/null
+++ b/community-staging/courier-imap/imapd-ssl.rc.d
@@ -0,0 +1,47 @@
+#!/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 ck_daemon authdaemond; then
+ echo "ERROR: authdaemond is not running"
+ stat_fail
+ exit 1
+ fi
+
+ stat_busy "Starting Courier imapd-ssl"
+ /usr/lib/courier-imap/imapd-ssl.rc start
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon imapd-ssl
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Courier imapd-ssl"
+ /usr/lib/courier-imap/imapd-ssl.rc 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-staging/courier-imap/imapd.rc.d b/community-staging/courier-imap/imapd.rc.d
new file mode 100644
index 000000000..867b52b78
--- /dev/null
+++ b/community-staging/courier-imap/imapd.rc.d
@@ -0,0 +1,47 @@
+#!/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 ck_daemon authdaemond; then
+ echo "ERROR: authdaemond is not running"
+ stat_fail
+ exit 1
+ fi
+
+ stat_busy "Starting Courier imapd"
+ /usr/lib/courier-imap/imapd.rc start
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon imapd
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Courier imapd"
+ /usr/lib/courier-imap/imapd.rc 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-staging/courier-imap/pop3d-ssl.rc.d b/community-staging/courier-imap/pop3d-ssl.rc.d
new file mode 100644
index 000000000..aab0f6a95
--- /dev/null
+++ b/community-staging/courier-imap/pop3d-ssl.rc.d
@@ -0,0 +1,47 @@
+#!/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 ck_daemon authdaemond; then
+ echo "ERROR: authdaemond is not running"
+ stat_fail
+ exit 1
+ fi
+
+ stat_busy "Starting Courier pop3d-ssl"
+ /usr/lib/courier-imap/pop3d-ssl.rc start
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon pop3d-ssl
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Courier pop3d-ssl"
+ /usr/lib/courier-imap/pop3d-ssl.rc 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-staging/courier-imap/pop3d.rc.d b/community-staging/courier-imap/pop3d.rc.d
new file mode 100644
index 000000000..7b73c5a7a
--- /dev/null
+++ b/community-staging/courier-imap/pop3d.rc.d
@@ -0,0 +1,47 @@
+#!/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 ck_daemon authdaemond; then
+ echo "ERROR: authdaemond is not running"
+ stat_fail
+ exit 1
+ fi
+
+ stat_busy "Starting Courier pop3d"
+ /usr/lib/courier-imap/pop3d.rc start
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon pop3d
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Courier pop3d"
+ /usr/lib/courier-imap/pop3d.rc 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-staging/courier-maildrop/PKGBUILD b/community-staging/courier-maildrop/PKGBUILD
new file mode 100644
index 000000000..a2cd7edb0
--- /dev/null
+++ b/community-staging/courier-maildrop/PKGBUILD
@@ -0,0 +1,46 @@
+# $Id: PKGBUILD 57086 2009-10-31 13:13:36Z allan $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: tobias <tobias@archlinux.org>
+# Contributor: Tobias Kieslich <tobias@justdreams.de>
+
+pkgname=courier-maildrop
+_srcname=maildrop
+pkgver=2.5.4
+pkgrel=3
+pkgdesc="mail delivery agent - procmail like but nicer syntax"
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://courier-mta.org/maildrop/"
+depends=('courier-authlib>=0.63.0' 'gamin' 'pcre' 'gdbm')
+conflicts=('courier-mta')
+options=(!libtool)
+source=(http://downloads.sourceforge.net/project/courier/${_srcname}/${pkgver}/${_srcname}-${pkgver}.tar.bz2)
+md5sums=('5770345cdceae28bdc24809e7adb3426')
+
+build() {
+ cd ${srcdir}/${_srcname}-${pkgver}
+
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc/courier \
+ --localstatedir=/var \
+ --mandir=/usr/share/man \
+ --with-db=gdbm \
+ --with-devel
+ make LDFLAGS+=-lstdc++
+}
+
+package() {
+ cd ${srcdir}/${_srcname}-${pkgver}
+
+ make DESTDIR=${pkgdir} install
+ chmod u+s ${pkgdir}/usr/bin/maildrop
+ cd ${pkgdir}/usr/share/maildrop/html
+ for files in *; do
+ install -Dm644 ${files} ${pkgdir}/usr/share/htmldoc/${files}
+ done
+ rm -rf ${pkgdir}/usr/share/maildrop
+
+ # docs say we can remove .a files after make
+ cd ${pkgdir}
+ find ${pkgdir} -name '*\.a' -exec rm -f {} \;
+}
diff --git a/community-staging/courier-mta/PKGBUILD b/community-staging/courier-mta/PKGBUILD
new file mode 100644
index 000000000..82df2e28f
--- /dev/null
+++ b/community-staging/courier-mta/PKGBUILD
@@ -0,0 +1,143 @@
+# $Id: PKGBUILD 75460 2010-04-01 16:56:22Z giovanni $
+# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
+# Contributor: tobias <tobias@archlinux.org>
+# Contributor: Tobias Kieslich <tobias@justdreams.de>
+
+# ----------- NOTE TO ALL USERS ------------
+# Go read http://www.courier-mta.org/install.html b4 running or building courier
+
+pkgname=courier-mta
+pkgver=0.66.3
+pkgrel=5
+pkgdesc="IMAP(s)/POP3(s) and SMTP Server with ML-manager, webmail and webconfig"
+arch=(i686 x86_64)
+license=('GPL2')
+backup=('etc/courier/imapd.cnf' 'etc/courier/pop3d.cnf' \
+ 'etc/courier/imapd' 'etc/courier/imapd-ssl' \
+ 'etc/courier/pop3d' 'etc/courier/pop3d-ssl' \
+ 'etc/courier/courierd' 'etc/courier/sqwebmaild' \
+ 'etc/courier/esmtpd' 'etc/courier/esmtpd-ssl' \
+ 'etc/courier/esmtpd.cnf' 'etc/courier/esmtpd-msa' \
+ 'etc/courier/webadmin/password' 'etc/courier/esmtpauthclient' \
+ 'etc/conf.d/courier-mta')
+url="http://courier-mta.org"
+depends=('courier-authlib>=0.63.0' 'gamin' 'gcc-libs' 'gdbm' 'pcre' 'mime-types' 'ca-certificates')
+optdepends=('libldap')
+makedepends=('apache>=2.2.9-3' 'pam>=1.0.1-2' 'expect' 'gnupg' 'libldap' 'gamin')
+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.rc.d
+ courier-mta.rc.d
+ courier-mta.conf.d
+ esmtpd.rc.d
+ esmtpd-ssl.rc.d
+ esmtpd-msa.rc.d
+ imapd.rc.d
+ imapd-ssl.rc.d
+ pop3d.rc.d
+ pop3d-ssl.rc.d
+ webmaild.rc.d)
+md5sums=('3b28f14afe3db09b74b4845323c3e982'
+ '9055ba622efd37603186ce1f37277224'
+ '5cbeb5c323706058e545f74ad7752ebe'
+ 'f3ff70b40c7a1f7a017e8c4cc4d92f4f'
+ 'caabce8c7b66296b602316aa5af5d4c5'
+ '1c8b1b66ebafa4ff09ffc0106a9dc82c'
+ 'dae6c7d5ff0cce0fba5729fedf2a9051'
+ 'd0cc5eab5d3e0ec33dadd0392421f63e'
+ '5873a96aa149edda281730010fb4db34'
+ 'faa09e06a5dc41ee89ab1f8fa6886b63'
+ '520501daa66c0a94f2e9844ce4919a09'
+ '33a93f400c3e87bcd207295b7d7333ca')
+
+# 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}
+
+ # fix a tiny bug
+ sed -i -e \
+ 's|--with-authchangepwdir=/var/tmp/dev/null|--with-authchangepwdir=$libexecdir/authlib|' \
+ configure && chmod 755 configure
+
+ # courier is more about configuring than compiling :-), lets start the mess
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc/courier \
+ --libdir=/usr/lib \
+ --libexecdir=/usr/lib \
+ --localstatedir=/var/spool/courier \
+ --disable-root-check \
+ --enable-unicode \
+ --enable-workarounds-for-imap-client-bugs \
+ --enable-mimetypes=/etc/mime.types \
+ --with-piddir=/var/run/courier \
+ --with-locking-method=lockf \
+ --with-trashquota \
+ --with-db=gdbm \
+ --with-trashquota \
+ --with-random=/dev/urandom --without-ispell \
+ --with-mailuser=courier --with-mailgroup=courier \
+ --with-certdb=/etc/ssl/certs/
+ make
+}
+
+package() {
+ cd ${srcdir}/courier-${pkgver}
+
+ #chown mail.mail ${pkgdir}/var/spool/courier
+ make DESTDIR=${pkgdir} install
+ # docs say we can get rid of those after make
+ find ${pkgdir} -name '*\.a' -exec -rm -f {} \;
+ # install the perftest-script for testings
+ install -Dm755 courier/perftest1 ${pkgdir}/usr/lib/courier/perftest1
+ ###############################################################################
+ # this is what usually "make install-configure" does
+ # *.dist files get rid of "dist"
+ for distfile in ${pkgdir}/etc/courier/*.dist; do
+ mv ${distfile} ${pkgdir}/etc/courier/$(basename ${distfile} .dist)
+ done
+ # install pam files according to the layout used in Archlinux
+ for pamfile in ${pkgdir}/etc/courier/*.authpam; do
+ sed -i 's|/lib/security/pam_pwdb\.so|pam_unix.so|' ${pamfile}
+ #echo "password required pam_unix.so" >> $pamfile
+ install -Dm 644 ${pamfile} \
+ ${pkgdir}/etc/pam.d/$(basename ${pamfile} .authpam | sed "s/d$//")
+ rm -f ${pamfile}
+ done
+
+ ###############################################################################
+ # Arch Linux specific tweaks to make things easier for the user
+ # create passwordfile for webadmin -> standard archwebadmin
+ sed -i 's|/etc/courier/webadmin/password|$(DESTDIR)/etc/courier/webadmin/password|g' Makefile
+ yes "archwebadmin" | make DESTDIR=${pkgdir} install-webadmin-password
+ # 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
+ 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/esmtpd
+ install -D -m 755 ${srcdir}/esmtpd-ssl.rc.d ${pkgdir}/etc/rc.d/esmtpd-ssl
+ install -D -m 755 ${srcdir}/esmtpd-msa.rc.d ${pkgdir}/etc/rc.d/esmtpd-msa
+ install -D -m 755 ${srcdir}/webmaild.rc.d ${pkgdir}/etc/rc.d/webmaild
+ #install -Dm 655 ${srcdir}/courier-webmail-cleancache.cron.hourly \
+ # ${pkgdir}/etc/cron.hourly/courier-webmail-cleancache
+ # bug http://bugs.archlinux.org/task/5154
+ find ${pkgdir}/usr/lib -name '*\.a' -exec rm -f {} \;
+ # fixing some permissions
+ chown -R courier:courier ${pkgdir}/usr/lib/courier/modules
+ rm -r ${pkgdir}/var/run
+ #chown -R courier:courier ${pkgdir}/var/run/courier
+ chown root:root ${pkgdir}/usr/{.,bin,lib,sbin,share}
+ # make a link to /usr/sbin/sendmail
+ install -dm 755 ${pkgdir}/usr/sbin
+ cd ${pkgdir}/usr/sbin
+ ln -s ../bin/sendmail ./sendmail
+}
diff --git a/community-staging/courier-mta/courier-mta.conf.d b/community-staging/courier-mta/courier-mta.conf.d
new file mode 100644
index 000000000..5856a5cda
--- /dev/null
+++ b/community-staging/courier-mta/courier-mta.conf.d
@@ -0,0 +1,18 @@
+#
+# Parameters to be passed to courier-imap
+#
+#
+# Select the service you want started with courier-imap
+#
+# Available options :
+# esmtpd imapd pop3d esmtpd-ssl imapd-ssl pop3d-ssl webmaild
+#
+CI_DAEMONS="courier esmtpd imapd pop3d"
+
+# If you want authdaemond to be automatically started and
+# stopped by courier-imap, set this to "true"
+AUTO_AUTHDAEMON="false"
+
+# Courier will start this many seconds after autodaemond if
+# AUTO_AUTHDAEMON is set to "true"
+AUTO_AUTHDAEMON_LAG=2
diff --git a/community-staging/courier-mta/courier-mta.install b/community-staging/courier-mta/courier-mta.install
new file mode 100644
index 000000000..e835e3efd
--- /dev/null
+++ b/community-staging/courier-mta/courier-mta.install
@@ -0,0 +1,61 @@
+# arg 1: the new package version
+post_install() {
+ cat << EOM
+ --> if you are using LDAP services to provide lookup in sqwebmail or aliases
+ --> then you have to install:
+ libldap
+EOM
+ # create the *.dat files
+ makealiases
+ makesmtpaccess
+}
+
+pre_upgrade() {
+ pre_remove $1
+}
+
+# arg 1: the new package version
+# 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 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"
+ 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."
+}
+
+
+pre_remove() {
+ # manual backup, since courier is always processing the whole directory
+ # - so it would process "system" AND "system.pacsave" -> bad
+ [ ! -d /etc/courier/_backup ] && mkdir /etc/courier/_backup
+ 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/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!
+EOM
+}
+
+# arg 1: the old package version
+post_remove() {
+ /bin/true
+}
+
+op=$1
+shift
+
+$op $*
diff --git a/community-staging/courier-mta/courier-mta.rc.d b/community-staging/courier-mta/courier-mta.rc.d
new file mode 100644
index 000000000..416946a5a
--- /dev/null
+++ b/community-staging/courier-mta/courier-mta.rc.d
@@ -0,0 +1,60 @@
+#!/bin/bash
+
+# source application-specific settings
+[ -f /etc/conf.d/courier-mta ] && . /etc/conf.d/courier-mta
+[ -z $AUTO_AUTHDAEMON_LAG ] && AUTO_AUTHDAEMON_LAG=2
+[ -z $AUTO_AUTHDAEMON ] && AUTO_AUTHDAEMON="false"
+
+. /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 [ "$AUTO_AUTHDAEMON" == "true" ]; then
+ /etc/rc.d/authdaemond start
+ sleep ${AUTO_AUTHDAEMON_LAG}
+ fi
+ if ck_daemon authdaemond; then
+ echo "ERROR: authdaemond is not running"
+ stat_fail
+ exit 1
+ fi
+ for daemon in $CI_DAEMONS; do
+ stat_busy "Starting Courier ${daemon}"
+ /usr/sbin/${daemon} start
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon $daemon
+ stat_done
+ fi
+ done
+ ;;
+ stop)
+ for daemon in $CI_DAEMONS; do
+ stat_busy "Stopping Courier ${daemon}"
+ /usr/sbin/${daemon} stop > /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon $daemon
+ stat_done
+ fi
+ done
+ if [ "$AUTO_AUTHDAEMON" == "true" ]; then
+ /etc/rc.d/authdaemond stop
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/community-staging/courier-mta/courier-webmail-cleancache.cron.hourly b/community-staging/courier-mta/courier-webmail-cleancache.cron.hourly
new file mode 100644
index 000000000..6c541321e
--- /dev/null
+++ b/community-staging/courier-mta/courier-webmail-cleancache.cron.hourly
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Cleans the cache of the sqwebmail server
+if [ -x /usr/share/sqwebmail/cleancache.pl ]; then
+ su -c "/usr/share/sqwebmail/cleancache.pl" bin
+fi
diff --git a/community-staging/courier-mta/courier.rc.d b/community-staging/courier-mta/courier.rc.d
new file mode 100644
index 000000000..7c581a24a
--- /dev/null
+++ b/community-staging/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 ck_daemon 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
diff --git a/community-staging/courier-mta/esmtpd-msa.rc.d b/community-staging/courier-mta/esmtpd-msa.rc.d
new file mode 100644
index 000000000..31458aca8
--- /dev/null
+++ b/community-staging/courier-mta/esmtpd-msa.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 ck_daemon authdaemond; then
+ echo "ERROR: authdaemond is not running"
+ stat_fail
+ exit 1
+ fi
+
+ stat_busy "Starting Courier esmtpd-msa"
+ /usr/sbin/esmtpd-msa start
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon esmtpd-msa
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Courier esmtpd-msa"
+ /usr/sbin/esmtpd-msa stop > /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon esmtpd-msa
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/community-staging/courier-mta/esmtpd-ssl.rc.d b/community-staging/courier-mta/esmtpd-ssl.rc.d
new file mode 100644
index 000000000..2a13be03f
--- /dev/null
+++ b/community-staging/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 ck_daemon 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-staging/courier-mta/esmtpd.rc.d b/community-staging/courier-mta/esmtpd.rc.d
new file mode 100644
index 000000000..dbaa9d680
--- /dev/null
+++ b/community-staging/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 ck_daemon 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-staging/courier-mta/imapd-ssl.rc.d b/community-staging/courier-mta/imapd-ssl.rc.d
new file mode 100644
index 000000000..3dc74cfdf
--- /dev/null
+++ b/community-staging/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 ck_daemon 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-staging/courier-mta/imapd.rc.d b/community-staging/courier-mta/imapd.rc.d
new file mode 100644
index 000000000..8bce59f6c
--- /dev/null
+++ b/community-staging/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 ck_daemon 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-staging/courier-mta/pop3d-ssl.rc.d b/community-staging/courier-mta/pop3d-ssl.rc.d
new file mode 100644
index 000000000..6e7ae4e12
--- /dev/null
+++ b/community-staging/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 ck_daemon 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-staging/courier-mta/pop3d.rc.d b/community-staging/courier-mta/pop3d.rc.d
new file mode 100644
index 000000000..25f8379ba
--- /dev/null
+++ b/community-staging/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 ck_daemon 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-staging/courier-mta/webmaild.rc.d b/community-staging/courier-mta/webmaild.rc.d
new file mode 100644
index 000000000..835cc2bf0
--- /dev/null
+++ b/community-staging/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 ck_daemon 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
diff --git a/community-staging/ntop/PKGBUILD b/community-staging/ntop/PKGBUILD
new file mode 100644
index 000000000..cb921ba4f
--- /dev/null
+++ b/community-staging/ntop/PKGBUILD
@@ -0,0 +1,44 @@
+# $Id: PKGBUILD 59280 2011-11-22 10:19:42Z lfleischer $
+# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
+# Contributor: Douglas Soares de Andrade <douglas@archlinux.org>
+
+pkgname=ntop
+pkgver=4.1.0
+pkgrel=2
+pkgdesc='A network traffic probe that shows the network usage.'
+arch=('i686' 'x86_64')
+url='http://www.ntop.org/'
+license=('GPL')
+depends=('libevent' 'libpcap' 'gd' 'glib' 'libxml2' 'openssl' 'rrdtool' 'pcre' 'geoip' 'lua')
+options=('!libtool' '!makeflags')
+install='ntop.install'
+source=("http://sourceforge.net/projects/${pkgname}/files/${pkgname}/Stable/${pkgname}-${pkgver}.tar.gz"
+ 'ntop'
+ 'ntop.conf.d')
+md5sums=('116df99cf548431393991ea15443c52f'
+ '7b0d7bb57432e768ff387e9f7236f87c'
+ '6a9371de1dcf31d8ef13a4cf349c02b3')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ ./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib --disable-snmp
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR="${pkgdir}" install-recursive
+
+ install -dm0755 -o nobody -g nobody "${pkgdir}/var/lib/ntop"
+ install -dm0755 -o nobody -g nobody "${pkgdir}/var/lib/ntop/rrd"
+
+ install -Dm0755 "${srcdir}/ntop" "${pkgdir}/etc/rc.d/ntop"
+ install -Dm0644 "${srcdir}/ntop.conf.d" "${pkgdir}/etc/conf.d/ntop"
+
+ for _f in "${pkgdir}/usr/lib/ntop/plugins/"*.so; do
+ _plug="$(basename ${_f})"
+ ln -sf "../../lib${_plug}" "${_f}"
+ done
+}
diff --git a/community-staging/ntop/ntop b/community-staging/ntop/ntop
new file mode 100755
index 000000000..2f0dbcbdd
--- /dev/null
+++ b/community-staging/ntop/ntop
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+# source application-specific settings
+[ -f /etc/conf.d/ntop ] && . /etc/conf.d/ntop
+
+case "$1" in
+ start)
+ stat_busy "Starting ntop daemon"
+ /usr/bin/ntop -d ${NTOP_ARGS} 2>&1 >> ${NTOP_LOG}
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon ntop
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping ntop daemon"
+ killall /usr/bin/ntop &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon ntop
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/community-staging/ntop/ntop.conf.d b/community-staging/ntop/ntop.conf.d
new file mode 100644
index 000000000..28e2a3166
--- /dev/null
+++ b/community-staging/ntop/ntop.conf.d
@@ -0,0 +1,5 @@
+# Parameters to be passed to ntop.
+NTOP_ARGS="-i eth0 -w 3000"
+
+# Location of the log file.
+NTOP_LOG="/var/log/ntop.log"
diff --git a/community-staging/ntop/ntop.install b/community-staging/ntop/ntop.install
new file mode 100644
index 000000000..8d8063751
--- /dev/null
+++ b/community-staging/ntop/ntop.install
@@ -0,0 +1,8 @@
+post_install() {
+ /bin/cat <<EOF
+==> Before running the daemon script for the first time, you need to run
+ ntop as the root user to set an administrator password.
+==> If you attempt to run ntop as a daemon without setting a password, a
+ FATAL ERROR message is generated and ntop stops.
+EOF
+}