summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Prünster2015-07-13 10:46:51 +0200
committerBernd Prünster2015-07-13 10:46:51 +0200
commit07026cb4edaad121ff9f687adb8b76fc64e1709b (patch)
tree23d7aa1dffb9a40bdc8a6afaf450cebb3ed1cc09
downloadaur-07026cb4edaad121ff9f687adb8b76fc64e1709b.tar.gz
Update and migrate to AUR4
-rw-r--r--.SRCINFO77
-rw-r--r--PKGBUILD139
-rw-r--r--courier-courierfilter.service12
-rw-r--r--courier-esmtpd-msa.service14
-rw-r--r--courier-esmtpd-ssl.service15
-rw-r--r--courier-esmtpd.service14
-rw-r--r--courier-imapd-ssl.service14
-rw-r--r--courier-imapd.conf1
-rw-r--r--courier-imapd.service14
-rw-r--r--courier-mta.install46
-rw-r--r--courier-pop3d-ssl.service14
-rw-r--r--courier-pop3d.service14
-rw-r--r--courier.service13
-rw-r--r--webmaild.service14
14 files changed, 401 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..0be000201bc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,77 @@
+pkgbase = courier-mta
+ pkgdesc = IMAP(s)/POP3(s) and SMTP Server with ML-manager, webmail and webconfig
+ pkgver = 0.75.0
+ pkgrel = 1
+ url = http://courier-mta.org
+ install = courier-mta.install
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = pam
+ makedepends = expect
+ makedepends = gnupg
+ makedepends = libldap
+ makedepends = gamin
+ depends = courier-authlib
+ depends = gamin
+ depends = gcc-libs
+ depends = gdbm
+ depends = pcre
+ depends = mime-types
+ depends = ca-certificates
+ optdepends = libldap
+ provides = smtp-server
+ provides = smtp-forwarder
+ provides = imap-server
+ provides = pop3-server
+ provides = courier-imap
+ provides = courier-maildrop
+ conflicts = courier-imap
+ conflicts = smtp-forwarder
+ conflicts = smtp-server
+ conflicts = imap-server
+ conflicts = courier-maildrop
+ conflicts = ucspi-tcp
+ options = !libtool
+ backup = etc/courier/imapd.cnf
+ backup = etc/courier/pop3d.cnf
+ backup = etc/courier/imapd
+ backup = etc/courier/imapd-ssl
+ backup = etc/courier/pop3d
+ backup = etc/courier/pop3d-ssl
+ backup = etc/courier/courierd
+ backup = etc/courier/sqwebmaild
+ backup = etc/courier/esmtpd
+ backup = etc/courier/esmtpd-ssl
+ backup = etc/courier/esmtpd.cnf
+ backup = etc/courier/esmtpd-msa
+ backup = etc/courier/webadmin/password
+ backup = etc/courier/esmtpauthclient
+ backup = etc/conf.d/courier-mta
+ source = http://downloads.sourceforge.net/project/courier/courier/0.75.0/courier-0.75.0.tar.bz2
+ source = courier-imapd.service
+ source = courier-imapd-ssl.service
+ source = courier-pop3d.service
+ source = courier-pop3d-ssl.service
+ source = courier-esmtpd.service
+ source = courier-esmtpd-ssl.service
+ source = courier-esmtpd-msa.service
+ source = courier.service
+ source = webmaild.service
+ source = courier-courierfilter.service
+ source = courier-imapd.conf
+ sha1sums = 6e6f279530bcca09090cd9f6a47003a7421ba3ef
+ sha1sums = 5e7f4bc751663069c773ec39bb2761c6bd506a95
+ sha1sums = f68f7c96abd83a78405227fa6dee20cefc8f6119
+ sha1sums = 6a4617b334661ff6e1c83f5d2f83f467d59718d0
+ sha1sums = b7e0b0acb7ddb5f2874d33635497d33609eed40a
+ sha1sums = b9029eb07cb18768d66d6741d7bdf1a59878ef9c
+ sha1sums = af64a07a0ce852277556829129dcc3b3f7a6dfbe
+ sha1sums = d5918e95df3009091684597e38fbffd19a5786fe
+ sha1sums = d306d91b0e5f85d455683ce073282257fd89542f
+ sha1sums = 262aea3a0436db6aff6a2b2c89fb7bb6a0b91f4b
+ sha1sums = 997d34d07af2446f6283b183517cf3e2543c5f4a
+ sha1sums = 72b81e3d330486e2e53ba11b498332a7bc7ea37e
+
+pkgname = courier-mta
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..7aa73ce57e4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,139 @@
+# Maintainer: Bernd Prünster <aur@berndpruenster.org>
+# 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.75.0
+pkgrel=1
+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' 'gamin' 'gcc-libs' 'gdbm' 'pcre' 'mime-types' 'ca-certificates')
+optdepends=('libldap')
+makedepends=('pam' '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-imapd.service
+ courier-imapd-ssl.service
+ courier-pop3d.service
+ courier-pop3d-ssl.service
+ courier-esmtpd.service
+ courier-esmtpd-ssl.service
+ courier-esmtpd-msa.service
+ courier.service
+ webmaild.service
+ courier-courierfilter.service
+ courier-imapd.conf)
+sha1sums=('6e6f279530bcca09090cd9f6a47003a7421ba3ef'
+ '5e7f4bc751663069c773ec39bb2761c6bd506a95'
+ 'f68f7c96abd83a78405227fa6dee20cefc8f6119'
+ '6a4617b334661ff6e1c83f5d2f83f467d59718d0'
+ 'b7e0b0acb7ddb5f2874d33635497d33609eed40a'
+ 'b9029eb07cb18768d66d6741d7bdf1a59878ef9c'
+ 'af64a07a0ce852277556829129dcc3b3f7a6dfbe'
+ 'd5918e95df3009091684597e38fbffd19a5786fe'
+ 'd306d91b0e5f85d455683ce073282257fd89542f'
+ '262aea3a0436db6aff6a2b2c89fb7bb6a0b91f4b'
+ '997d34d07af2446f6283b183517cf3e2543c5f4a'
+ '72b81e3d330486e2e53ba11b498332a7bc7ea37e')
+
+build() {
+ cd ${srcdir}/courier-${pkgver}
+
+ LDFLAGS+=",-L /usr/lib/courier-authlib -lcourierauth"
+ ./configure --prefix=/usr \
+ --sbindir=/usr/bin \
+ --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
+
+ # Install systemd service files
+ install -Dm 644 "${srcdir}/courier-imapd.service" "${pkgdir}/usr/lib/systemd/system/courier-imapd.service"
+ install -Dm 644 "${srcdir}/courier-imapd-ssl.service" "${pkgdir}/usr/lib/systemd/system/courier-imapd-ssl.service"
+ install -Dm 644 "${srcdir}/courier-pop3d.service" "${pkgdir}/usr/lib/systemd/system/courier-pop3d.service"
+ install -Dm 644 "${srcdir}/courier-pop3d-ssl.service" "${pkgdir}/usr/lib/systemd/system/courier-pop3d-ssl.service"
+ install -Dm 644 "${srcdir}/courier-esmtpd.service" "${pkgdir}/usr/lib/systemd/system/courier-esmtpd.service"
+ install -Dm 644 "${srcdir}/courier-esmtpd-ssl.service" "${pkgdir}/usr/lib/systemd/system/courier-esmtpd-ssl.service"
+ install -Dm 644 "${srcdir}/courier-esmtpd-msa.service" "${pkgdir}/usr/lib/systemd/system/courier-esmtpd-msa.service"
+ install -Dm 644 "${srcdir}/courier.service" "${pkgdir}/usr/lib/systemd/system/courier.service"
+ install -Dm 644 "${srcdir}/courier.service" "${pkgdir}/usr/lib/systemd/system/courier.service"
+ install -Dm 644 "${srcdir}/courier-courierfilter.service" "${pkgdir}/usr/lib/systemd/system/courier-courierfilter.service"
+ install -Dm 644 "${srcdir}/webmaild.service" "${pkgdir}/usr/lib/systemd/system/webmaild.service"
+
+ # Install systemd configuration files
+ install -Dm 644 "$srcdir/courier-imapd.conf" "$pkgdir/usr/lib/tmpfiles.d/courier-imapd.conf"
+
+ #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,share}
+
+ # Recent fixes concerning imapd-binary, see https://aur.archlinux.org/packages/courier-mta/
+ install -m 755 "${srcdir}/courier-${pkgver}/courier/imapd" "${pkgdir}/usr/lib/courier/courierimapd"
+ sed -i 's/\/usr\/bin\/imapd/\/usr\/lib\/courier\/courierimapd/' "${pkgdir}/usr/share/imapd" "${pkgdir}/usr/share/imapd-ssl"
+}
diff --git a/courier-courierfilter.service b/courier-courierfilter.service
new file mode 100644
index 00000000000..bbbdcde9dd5
--- /dev/null
+++ b/courier-courierfilter.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Courier filter Daemon
+
+[Service]
+Type=forking
+ExecStartPre=[ -d /var/run/courier ] || mkdir -p /var/run/courier && chown courier:courier /var/run/courier
+ExecStart=/usr/sbin/courierfilter start
+ExecStop=/usr/sbin/courierfilter stop
+PIDFile=/var/run/courier/courierfilter.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/courier-esmtpd-msa.service b/courier-esmtpd-msa.service
new file mode 100644
index 00000000000..3f01eb574c1
--- /dev/null
+++ b/courier-esmtpd-msa.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Courier ESMTP-MSA Daemon
+Requires=authdaemond.service
+After=authdaemond.service
+
+[Service]
+Type=forking
+ExecStartPre=[ -d /var/run/courier ] || mkdir -p /var/run/courier && chown courier:courier /var/run/courier
+ExecStart=/usr/sbin/esmtpd-msa start
+ExecStop=/usr/sbin/esmtpd-msa stop
+PIDFile=/var/run/courier/esmtpd-msa.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/courier-esmtpd-ssl.service b/courier-esmtpd-ssl.service
new file mode 100644
index 00000000000..f0ffb04a675
--- /dev/null
+++ b/courier-esmtpd-ssl.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Courier ESMTP Daemon
+Requires=authdaemond.service
+After=authdaemond.service, courier-courierfilter.service
+
+
+[Service]
+Type=forking
+ExecStartPre=[ -d /var/run/courier ] || mkdir -p /var/run/courier && chown courier:courier /var/run/courier
+ExecStart=/usr/sbin/esmtpd-ssl start
+ExecStop=/usr/sbin/esmtpd-ssl stop
+PIDFile=/var/run/courier/esmtpd-ssl.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/courier-esmtpd.service b/courier-esmtpd.service
new file mode 100644
index 00000000000..c085b6b205b
--- /dev/null
+++ b/courier-esmtpd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Courier ESMTP Daemon
+Requires=authdaemond.service
+After=authdaemond.service, courier-courierfilter.service
+
+[Service]
+Type=forking
+ExecStartPre=[ -d /var/run/courier ] || mkdir -p /var/run/courier && chown courier:courier /var/run/courier
+ExecStart=/usr/sbin/esmtpd start
+ExecStop=/usr/sbin/esmtpd stop
+PIDFile=/var/run/courier/esmtpd.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/courier-imapd-ssl.service b/courier-imapd-ssl.service
new file mode 100644
index 00000000000..94223d32ecb
--- /dev/null
+++ b/courier-imapd-ssl.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Courier IMAP Daemon (SSL)
+Requires=authdaemond.service
+After=authdaemond.service
+
+[Service]
+Type=forking
+ExecStartPre=[ -d /var/run/courier ] || mkdir -p /var/run/courier && chown courier:courier /var/run/courier
+ExecStart=/usr/sbin/imapd-ssl start
+ExecStop=/usr/sbin/imapd-ssl stop
+PIDFile=/var/run/courier/imapd-ssl.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/courier-imapd.conf b/courier-imapd.conf
new file mode 100644
index 00000000000..fcf5c50df8b
--- /dev/null
+++ b/courier-imapd.conf
@@ -0,0 +1 @@
+D /run/courier 0755 courier courier
diff --git a/courier-imapd.service b/courier-imapd.service
new file mode 100644
index 00000000000..85f694408de
--- /dev/null
+++ b/courier-imapd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Courier IMAP Daemon
+Requires=authdaemond.service
+After=authdaemond.service
+
+[Service]
+Type=forking
+ExecStartPre=[ -d /var/run/courier ] || mkdir -p /var/run/courier && chown courier:courier /var/run/courier
+ExecStart=/usr/sbin/imapd start
+ExecStop=/usr/sbin/imapd stop
+PIDFile=/var/run/courier/imapd.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/courier-mta.install b/courier-mta.install
new file mode 100644
index 00000000000..43cf7038da1
--- /dev/null
+++ b/courier-mta.install
@@ -0,0 +1,46 @@
+# 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
+}
+
+
+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/courier-pop3d-ssl.service b/courier-pop3d-ssl.service
new file mode 100644
index 00000000000..aa018c4b4af
--- /dev/null
+++ b/courier-pop3d-ssl.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Courier POP3 (SSL) Daemon
+Requires=authdaemond.service
+After=authdaemond.service
+
+[Service]
+Type=forking
+ExecStartPre=[ -d /var/run/courier ] || mkdir -p /var/run/courier && chown courier:courier /var/run/courier
+ExecStart=/usr/sbin/pop3d-ssl start
+ExecStop=/usr/sbin/pop3d-ssl stop
+PIDFile=/var/run/courier/pop3d-ssl.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/courier-pop3d.service b/courier-pop3d.service
new file mode 100644
index 00000000000..5f8cf5efd83
--- /dev/null
+++ b/courier-pop3d.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Courier POP3 Daemon
+Requires=authdaemond.service
+After=authdaemond.service
+
+[Service]
+Type=forking
+ExecStartPre=[ -d /var/run/courier ] || mkdir -p /var/run/courier && chown courier:courier /var/run/courier
+ExecStart=/usr/sbin/pop3d start
+ExecStop=/usr/sbin/pop3d stop
+PIDFile=/var/run/courier/pop3d.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/courier.service b/courier.service
new file mode 100644
index 00000000000..2192b2f5693
--- /dev/null
+++ b/courier.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Courier Daemon
+Requires=authdaemond.service
+After=authdaemond.service
+
+[Service]
+Type=forking
+ExecStartPre=[ -d /var/run/courier ] || mkdir -p /var/run/courier && chown courier:courier /var/run/courier
+ExecStart=/usr/sbin/courier start
+ExecStop=/usr/sbin/courier stop
+
+[Install]
+WantedBy=multi-user.target
diff --git a/webmaild.service b/webmaild.service
new file mode 100644
index 00000000000..ca3939d29a8
--- /dev/null
+++ b/webmaild.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Courier Webmail Daemon
+Requires=authdaemond.service
+After=authdaemond.service
+
+[Service]
+Type=forking
+ExecStartPre=[ -d /var/run/courier ] || mkdir -p /var/run/courier && chown courier:courier /var/run/courier
+ExecStart=/usr/sbin/webmaild start
+ExecStop=/usr/sbin/webmaild stop
+PIDFile=/var/run/courier/webmaild.pid
+
+[Install]
+WantedBy=multi-user.target