summaryrefslogtreecommitdiff
path: root/community/dbmail
diff options
context:
space:
mode:
Diffstat (limited to 'community/dbmail')
-rw-r--r--community/dbmail/PKGBUILD59
-rw-r--r--community/dbmail/dbmail-2.2.10-pam-support.patch251
-rw-r--r--community/dbmail/dbmail-7-systemd.diff176
-rw-r--r--community/dbmail/dbmail-imapd.service11
-rw-r--r--community/dbmail/dbmail-lmtpd.service11
-rw-r--r--community/dbmail/dbmail-pop3d.service11
-rw-r--r--community/dbmail/dbmail-timsieved.service11
-rw-r--r--community/dbmail/dbmail.tmpfiles1
8 files changed, 201 insertions, 330 deletions
diff --git a/community/dbmail/PKGBUILD b/community/dbmail/PKGBUILD
index 0b0580c28..d91d6f79a 100644
--- a/community/dbmail/PKGBUILD
+++ b/community/dbmail/PKGBUILD
@@ -1,15 +1,15 @@
-# $Id: PKGBUILD 96731 2013-09-03 16:12:39Z spupykin $
+# $Id: PKGBUILD 97976 2013-10-02 13:30:38Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Sebastian Faltoni <sebastian.faltoni@gmail.com>
pkgname=dbmail
-pkgver=3.1.4
+pkgver=3.1.7
pkgrel=2
pkgdesc="Fast and scalable sql based mail services"
arch=('i686' 'x86_64' 'mips64el')
depends=('gmime' 'libzdb' 'mhash' 'libevent')
makedepends=('asciidoc' 'xmlto' 'docbook-xsl' 'docbook-xml' 'postgresql-libs>=8.4.1'
- 'sqlite' 'libmysqlclient' 'libldap>=2.4.18' 'libsieve')
+ 'sqlite' 'libmysqlclient' 'libldap>=2.4.18' 'libsieve' 'git')
optdepends=('libldap: for LDAP authentication'
'libsieve: for dbmail-sieve'
'python2-mysql2pgsql: migrate from MySQL to PostreSQL')
@@ -20,51 +20,45 @@ backup=(etc/xinetd.d/dbmail-imapd
etc/xinetd.d/dbmail-pop3d
etc/xinetd.d/dbmail-lmtpd
etc/xinetd.d/dbmail-timsieved)
-source=(http://www.dbmail.org/download/3.1/dbmail-${pkgver/_/-}.tar.gz
- dbmail.tmpfiles
- dbmail-imapd.service
- dbmail-lmtpd.service
- dbmail-pop3d.service
- dbmail-timsieved.service
- dbmail-imapd.xinetd
- dbmail-lmtpd.xinetd
- dbmail-pop3d.xinetd
- dbmail-timsieved.xinetd
- "boundary.patch::http://git.dbmail.eu/paul/dbmail/patch/?id=fd742e39b13ec45e4ecf2e175113a6a0120af27b"
- "crlf.patch::http://git.dbmail.eu/paul/dbmail/patch/?id=17a2e61917ae64b1f20039f49b70b9130b678c87")
-md5sums=('0090bb7998469e963d2eb49b7d16ea3f'
- 'c4b5793c5422b62a675d4c66ff7e9300'
- '5a6297cb03c8d0b424f978ea1d7402de'
- '070db88538af9833f003f4cb516d337b'
- '422f0399f97a780b7cab84443e8f429a'
- '15c7d367d4242aebac5f87649a2250aa'
+#source=("http://www.dbmail.org/download/3.1/dbmail-${pkgver}.tar.gz"
+source=("dbmail-$pkgver::git://git.subdir.eu/paul/dbmail#branch=dbmail_3_1"
+ "dbmail-imapd.xinetd"
+ "dbmail-lmtpd.xinetd"
+ "dbmail-pop3d.xinetd"
+ "dbmail-timsieved.xinetd"
+ "dbmail-6-sieve.patch::http://git.dbmail.eu/paul/dbmail/patch/?id=92b98094a01eda5efe3ba3080e529482d08945a2"
+ "dbmail-7-systemd.diff")
+md5sums=('SKIP'
'890de13361afbdf4fed12d6d7eb53e66'
'961593658cd596297d03d25eb9c9e98f'
'4cb764894abd3914802e90602bf90a0c'
'e78dc86355f9aaf24590bc7c6611162f'
- 'e9f9c1140e77e3714fd2c3905b1760f1'
- 'c86c4c2a4e9171ae8c0ad5692262b393')
+ 'b1063893dd0e74bc0ddee454bb65bf01'
+ 'a781a4ebe2dd75ed635c9b4a239b38d8')
prepare() {
- cd $srcdir/dbmail-${pkgver/_/-}/
- patch -p1 <$srcdir/boundary.patch
- patch -p1 <$srcdir/crlf.patch
+ cd $srcdir/dbmail-${pkgver}/
+ patch -p1 <$srcdir/dbmail-6-sieve.patch
+ patch -Rp1 <$srcdir/dbmail-7-systemd.diff
+ aclocal
+ automake --add-missing
+ autoreconf
}
build() {
- cd $srcdir/dbmail-${pkgver/_/-}/
+ cd $srcdir/dbmail-${pkgver}/
+ automake
[ -f Makefile ] || ./configure \
--prefix=/usr --sbindir=/usr/bin --sysconfdir=/etc \
- --with-ldap --with-sieve
+ --with-ldap --with-sieve \
+ --enable-systemd --enable-manpages
make
}
package() {
- cd $srcdir/dbmail-${pkgver/_/-}/
+ cd $srcdir/dbmail-${pkgver}/
make DESTDIR=$pkgdir install
- (cd man && make && make install DESTDIR=$pkgdir)
- mkdir $pkgdir/etc
install -Dm644 dbmail.conf $pkgdir/etc/dbmail.conf.sample
mkdir $pkgdir/usr/share/dbmail
cp -r sql/* $pkgdir/usr/share/dbmail/
@@ -72,9 +66,6 @@ package() {
cp dbmail.schema $pkgdir/usr/share/dbmail/
for i in dbmail-imapd dbmail-lmtpd dbmail-pop3d dbmail-timsieved; do
- install -Dm0644 $srcdir/$i.service $pkgdir/usr/lib/systemd/system/$i.service
install -Dm0644 $srcdir/$i.xinetd $pkgdir/etc/xinetd.d/$i
done
-
- install -Dm0644 $srcdir/dbmail.tmpfiles $pkgdir/usr/lib/tmpfiles.d/dbmail.conf
}
diff --git a/community/dbmail/dbmail-2.2.10-pam-support.patch b/community/dbmail/dbmail-2.2.10-pam-support.patch
deleted file mode 100644
index 805a7f609..000000000
--- a/community/dbmail/dbmail-2.2.10-pam-support.patch
+++ /dev/null
@@ -1,251 +0,0 @@
-diff -wbBur dbmail-2.2.10/configure.in dbmail-2.2.10.pam/configure.in
---- dbmail-2.2.10/configure.in 2008-03-24 17:49:33.000000000 +0300
-+++ dbmail-2.2.10.pam/configure.in 2008-09-18 16:43:04.000000000 +0400
-@@ -78,6 +78,13 @@
-
- AC_SUBST(CRYPTLIB)
-
-+dnl Check for PAM
-+AC_SUBST(PAMLIBS,"")
-+AC_CHECK_HEADERS(security/pam_appl.h,
-+ [AC_CHECK_LIB(pam,pam_start,
-+ [AC_DEFINE(HAVE_PAM,1,[Define if you have PAN including devel headers])
-+ PAMLIBS="-lpam"],,)])
-+
- AC_SUBST(MYSQLLIB)
- AC_SUBST(MYSQLALIB)
- AC_SUBST(MYSQLLTLIB)
-diff -wbBur dbmail-2.2.10/dbmail-user.c dbmail-2.2.10.pam/dbmail-user.c
---- dbmail-2.2.10/dbmail-user.c 2008-03-24 17:49:33.000000000 +0300
-+++ dbmail-2.2.10.pam/dbmail-user.c 2008-09-18 16:43:04.000000000 +0400
-@@ -157,7 +157,7 @@
- "md5", "md5-raw", "md5sum", "md5sum-raw",
- "md5-hash", "md5-hash-raw", "md5-digest", "md5-digest-raw",
- "md5-base64", "md5-base64-raw", "md5base64", "md5base64-raw",
-- "shadow", "", NULL
-+ "shadow", "pam", "", NULL
- };
-
- /* These must correspond to the easy text names. */
-@@ -166,7 +166,7 @@
- MD5_HASH, MD5_HASH_RAW, MD5_DIGEST, MD5_DIGEST_RAW,
- MD5_HASH, MD5_HASH_RAW, MD5_DIGEST, MD5_DIGEST_RAW,
- MD5_BASE64, MD5_BASE64_RAW, MD5_BASE64, MD5_BASE64_RAW,
-- SHADOW, PLAINTEXT, PWTYPE_NULL
-+ SHADOW, PWTYPE_PAM, PLAINTEXT, PWTYPE_NULL
- };
-
- memset(pw, 0, 50);
-@@ -251,6 +251,12 @@
- *enctype = "crypt";
- }
- break;
-+#ifdef HAVE_PAM
-+ case PWTYPE_PAM:
-+ null_strncpy(pw, passwd, 49);
-+ *enctype = "pam";
-+ break;
-+#endif
- default:
- qerrorf("Error: password type not supported [%s].\n",
- passwdtype);
-diff -wbBur dbmail-2.2.10/dbmail-user.h dbmail-2.2.10.pam/dbmail-user.h
---- dbmail-2.2.10/dbmail-user.h 2008-03-24 17:49:33.000000000 +0300
-+++ dbmail-2.2.10.pam/dbmail-user.h 2008-09-18 16:43:04.000000000 +0400
-@@ -34,7 +34,7 @@
- typedef enum {
- PLAINTEXT = 0, PLAINTEXT_RAW, CRYPT, CRYPT_RAW,
- MD5_HASH, MD5_HASH_RAW, MD5_DIGEST, MD5_DIGEST_RAW,
-- MD5_BASE64, MD5_BASE64_RAW, SHADOW, PWTYPE_NULL
-+ MD5_BASE64, MD5_BASE64_RAW, SHADOW, PWTYPE_PAM, PWTYPE_NULL
- } pwtype_t;
-
- int mkpassword(const char * const user, const char * const passwd,
-diff -wbBur dbmail-2.2.10/modules/authsql.c dbmail-2.2.10.pam/modules/authsql.c
---- dbmail-2.2.10/modules/authsql.c 2008-03-24 17:49:33.000000000 +0300
-+++ dbmail-2.2.10.pam/modules/authsql.c 2008-09-18 16:43:04.000000000 +0400
-@@ -27,6 +27,19 @@
- #include "dbmail.h"
- #define THIS_MODULE "auth"
-
-+#ifdef HAVE_PAM
-+#include <security/pam_appl.h>
-+
-+#ifndef DEFAULT_DBMAIL_PAM_SERVICE
-+#define DEFAULT_DBMAIL_PAM_SERVICE "dbmail"
-+#endif
-+
-+#ifndef DEFAULT_DBMAIL_PAM_TTL
-+#define DEFAULT_DBMAIL_PAM_TTL 60
-+#endif
-+
-+#endif
-+
- extern db_param_t _db_params;
- #define DBPFX _db_params.pfx
-
-@@ -49,17 +62,80 @@
- */
- static int __auth_query(const char *thequery);
-
-+#ifdef HAVE_PAM
-+
-+static char *pam_password = NULL; /* Workaround for Solaris 2.6 brokenness */
-+static pam_handle_t *pamh = NULL;
-+static int pam_ttl = DEFAULT_DBMAIL_PAM_TTL;
-+static char *pam_service = DEFAULT_DBMAIL_PAM_SERVICE;
-+static time_t pamh_created = 0;
-+/*
-+ * A simple "conversation" function returning the supplied password.
-+ * Has a bit to much error control, but this is my first PAM application
-+ * so I'd rather check everything than make any mistakes. The function
-+ * expects a single converstation message of type PAM_PROMPT_ECHO_OFF.
-+ */
-+static int
-+password_conversation(int num_msg, const struct pam_message **msg, struct pam_response **resp, void *appdata_ptr)
-+{
-+ if (num_msg != 1 || msg[0]->msg_style != PAM_PROMPT_ECHO_OFF) {
-+ TRACE(TRACE_ERROR, "Unexpected PAM converstaion '%d/%s'", msg[0]->msg_style, msg[0]->msg);
-+ return PAM_CONV_ERR;
-+ }
-+ if (!appdata_ptr) {
-+ /* Workaround for Solaris 2.6 where the PAM library is broken
-+ * and does not pass appdata_ptr to the conversation routine
-+ */
-+ appdata_ptr = pam_password;
-+ }
-+ if (!appdata_ptr) {
-+ TRACE(TRACE_ERROR, "ERROR: No password available to password_converstation!");
-+ return PAM_CONV_ERR;
-+ }
-+ *resp = calloc(num_msg, sizeof(struct pam_response));
-+ if (!*resp) {
-+ TRACE(TRACE_ERROR, "Out of memory!");
-+ return PAM_CONV_ERR;
-+ }
-+ (*resp)[0].resp = strdup((char *) appdata_ptr);
-+ (*resp)[0].resp_retcode = 0;
-+
-+ return ((*resp)[0].resp ? PAM_SUCCESS : PAM_CONV_ERR);
-+}
-+
-+static struct pam_conv conv =
-+{
-+ &password_conversation,
-+ NULL
-+};
-+
-+#endif
-+
-+
- int auth_connect()
- {
- /* this function is only called after a connection has been made
- * if, in the future this is not the case, db.h should export a
- * function that enables checking for the database connection
- */
-+#ifdef HAVE_PAM
-+
-+#endif
- return 0;
- }
-
- int auth_disconnect()
- {
-+#ifdef HAVE_PAM
-+ int retval=PAM_SUCCESS;
-+ if (pamh) {
-+ retval = pam_end(pamh, retval);
-+ if (retval != PAM_SUCCESS) {
-+ pamh = NULL;
-+ TRACE(TRACE_ERROR, "failed to release PAM authenticator");
-+ }
-+ }
-+#endif
- return 0;
- }
-
-@@ -458,7 +534,71 @@
- is_validated = (strncmp(md5str, query_result, 32) == 0) ? 1 : 0;
- g_free(md5str);
- }
-+#ifdef HAVE_PAM
-+ else if (strcasecmp(query_result, "pam") == 0) {
-+ int retval=0;
-+ TRACE(TRACE_DEBUG, "validating using pam for user [%s] pass:[%s]",real_username,password);
-+ conv.appdata_ptr = (char *) password;
-+ pam_password= password;
-+ if (pam_ttl == 0) {
-+ /* Create PAM connection */
-+ retval = pam_start(pam_service, real_username, &conv, &pamh);
-+ if (retval != PAM_SUCCESS) {
-+ TRACE(TRACE_ERROR, "failed to create PAM authenticator");
-+ goto pam_error;
-+ }
-+ } else if (!pamh || (time(NULL) - pamh_created) >= pam_ttl || pamh_created > time(NULL)) {
-+ /* Close previous PAM connection */
-+ if (pamh) {
-+ retval = pam_end(pamh, retval);
-+ if (retval != PAM_SUCCESS) {
-+ TRACE(TRACE_WARNING, "failed to release PAM authenticator");
-+ }
-+ pamh = NULL;
-+ }
-+ /* Initialize persistent PAM connection */
-+ retval = pam_start(pam_service, "dbmail@", &conv, &pamh);
-+ if (retval != PAM_SUCCESS) {
-+ TRACE(TRACE_ERROR, "failed to create PAM authenticator");
-+ goto pam_error;
-+ }
-+ pamh_created = time(NULL);
-+ }
-+ retval = PAM_SUCCESS;
-+ if (pam_ttl != 0) {
-+ if (retval == PAM_SUCCESS)
-+ retval = pam_set_item(pamh, PAM_USER, real_username);
-+ if (retval == PAM_SUCCESS)
-+ retval = pam_set_item(pamh, PAM_CONV, &conv);
-+ }
-+ if (retval == PAM_SUCCESS)
-+ retval = pam_authenticate(pamh, 0);
-+ if (retval == PAM_SUCCESS ) //&& !no_acct_mgmt
-+ retval = pam_acct_mgmt(pamh, 0);
-+ if (retval == PAM_SUCCESS) {
-+ is_validated=1;
-+ } else {
-+pam_error:
-+ is_validated=0;
-+ }
-+ /* cleanup */
-+ retval = PAM_SUCCESS;
-+#ifdef PAM_AUTHTOK
-+ if (pam_ttl != 0) {
-+ if (retval == PAM_SUCCESS)
-+ retval = pam_set_item(pamh, PAM_AUTHTOK, NULL);
-+ }
-+#endif
-+ if (pam_ttl == 0 || retval != PAM_SUCCESS) {
-+ retval = pam_end(pamh, retval);
-+ if (retval != PAM_SUCCESS) {
-+ TRACE(TRACE_WARNING, "failed to release PAM authenticator\n");
-+ }
-+ pamh = NULL;
-+ }
-
-+ }
-+#endif
- if (is_validated) {
- db_user_log_login(*user_idnr);
- } else {
-diff -wbBur dbmail-2.2.10/modules/Makefile.am dbmail-2.2.10.pam/modules/Makefile.am
---- dbmail-2.2.10/modules/Makefile.am 2008-03-24 17:49:33.000000000 +0300
-+++ dbmail-2.2.10.pam/modules/Makefile.am 2008-09-18 16:44:53.000000000 +0400
-@@ -60,7 +60,7 @@
-
- # This one is always built.
- libauth_sql_la_SOURCES = authsql.c
--libauth_sql_la_LIBADD = @CRYPTLIB@
-+libauth_sql_la_LIBADD = @CRYPTLIB@ @PAMLIBS@
-
- if LDAP
- libauth_ldap_la_SOURCES = authldap.c
diff --git a/community/dbmail/dbmail-7-systemd.diff b/community/dbmail/dbmail-7-systemd.diff
new file mode 100644
index 000000000..097949694
--- /dev/null
+++ b/community/dbmail/dbmail-7-systemd.diff
@@ -0,0 +1,176 @@
+diff -wbBurN dbmail.git/configure.in dbmail-3.1.5/configure.in
+--- dbmail.git/configure.in 2013-09-05 18:07:48.661707165 +0400
++++ dbmail-3.1.5/configure.in 2013-09-09 15:05:17.639600103 +0400
+@@ -44,10 +44,6 @@
+ AS_HELP_STRING([--enable-manpages], [Enable building and installation of man pages]))
+ AM_CONDITIONAL(MANPAGES, [ test "$enable_manpages" = "yes" ])
+
+-AC_ARG_ENABLE([systemd],
+- AS_HELP_STRING([--enable-systemd], [Enable systemd support]))
+-AM_CONDITIONAL(SYSTEMD, [ test "$enable_systemd" = "yes" ])
+-
+ AC_PROG_CC
+ AC_COMPILE_WARNINGS
+ AC_C_CONST
+@@ -82,8 +78,9 @@
+ AC_SUBST(DM_STATEDIR)
+ AC_SUBST(DM_PKGLIBDIR)
+ AC_SUBST(DM_PWD)
++
+ AC_PROG_LIBTOOL
+
+-AC_OUTPUT(src/dbmail.h Makefile src/Makefile src/modules/Makefile man/Makefile test/Makefile systemd/Makefile)
++AC_OUTPUT(src/dbmail.h Makefile src/Makefile src/modules/Makefile man/Makefile test/Makefile)
+
+ DM_MSG_CONFIGURE_RESULTS
+diff -wbBurN dbmail.git/systemd/dbmail-imapd.service.in dbmail-3.1.5/systemd/dbmail-imapd.service.in
+--- dbmail.git/systemd/dbmail-imapd.service.in 2013-09-05 18:07:48.711707166 +0400
++++ dbmail-3.1.5/systemd/dbmail-imapd.service.in 1970-01-01 03:00:00.000000000 +0300
+@@ -1,11 +0,0 @@
+-[Unit]
+-Description=DBMail Imap Server
+-After=syslog.target network.target mysqld.service postgresql.service
+-
+-[Service]
+-Type=forking
+-PIDFile=@piddir@/dbmail-imapd.pid
+-ExecStart=@sbindir@/dbmail-imapd -p @piddir@/dbmail-imapd.pid
+-
+-[Install]
+-WantedBy=multi-user.target
+diff -wbBurN dbmail.git/systemd/dbmail-lmtpd.service.in dbmail-3.1.5/systemd/dbmail-lmtpd.service.in
+--- dbmail.git/systemd/dbmail-lmtpd.service.in 2013-09-05 18:07:48.711707166 +0400
++++ dbmail-3.1.5/systemd/dbmail-lmtpd.service.in 1970-01-01 03:00:00.000000000 +0300
+@@ -1,11 +0,0 @@
+-[Unit]
+-Description=DBMail LMTP Server
+-After=syslog.target network.target mysqld.service postgresql.service
+-
+-[Service]
+-Type=forking
+-PIDFile=@piddir@/dbmail-lmtpd.pid
+-ExecStart=@sbindir@/dbmail-lmtpd -p @piddir@/dbmail-lmtpd.pid
+-
+-[Install]
+-WantedBy=multi-user.target
+diff -wbBurN dbmail.git/systemd/dbmail-pop3d.service.in dbmail-3.1.5/systemd/dbmail-pop3d.service.in
+--- dbmail.git/systemd/dbmail-pop3d.service.in 2013-09-05 18:07:48.711707166 +0400
++++ dbmail-3.1.5/systemd/dbmail-pop3d.service.in 1970-01-01 03:00:00.000000000 +0300
+@@ -1,11 +0,0 @@
+-[Unit]
+-Description=DBMail pop3 Server
+-After=syslog.target network.target mysqld.service postgresql.service
+-
+-[Service]
+-Type=forking
+-PIDFile=@piddir@/dbmail-pop3d.pid
+-ExecStart=@sbindir@/dbmail-pop3d -p @piddir@/dbmail-pop3d.pid
+-
+-[Install]
+-WantedBy=multi-user.target
+diff -wbBurN dbmail.git/systemd/dbmail-timsieved.service.in dbmail-3.1.5/systemd/dbmail-timsieved.service.in
+--- dbmail.git/systemd/dbmail-timsieved.service.in 2013-09-05 18:07:48.711707166 +0400
++++ dbmail-3.1.5/systemd/dbmail-timsieved.service.in 1970-01-01 03:00:00.000000000 +0300
+@@ -1,11 +0,0 @@
+-[Unit]
+-Description=DBMail Sieve Server
+-After=syslog.target network.target mysqld.service postgresql.service
+-
+-[Service]
+-Type=forking
+-PIDFile=@piddir@/dbmail-timsieved.pid
+-ExecStart=@sbindir@/dbmail-timsieved -p @piddir@/dbmail-timsieved.pid
+-
+-[Install]
+-WantedBy=multi-user.target
+diff -wbBurN dbmail.git/systemd/dbmail.tmpfiles.in dbmail-3.1.5/systemd/dbmail.tmpfiles.in
+--- dbmail.git/systemd/dbmail.tmpfiles.in 2013-09-05 18:07:48.711707166 +0400
++++ dbmail-3.1.5/systemd/dbmail.tmpfiles.in 1970-01-01 03:00:00.000000000 +0300
+@@ -1 +0,0 @@
+-d @piddir@ 0755 nobody nobody -
+diff -wbBurN dbmail.git/systemd/Makefile.am dbmail-3.1.5/systemd/Makefile.am
+--- dbmail.git/systemd/Makefile.am 2013-09-07 16:12:34.840475834 +0400
++++ dbmail-3.1.5/systemd/Makefile.am 1970-01-01 03:00:00.000000000 +0300
+@@ -1,68 +0,0 @@
+-# Copyright (C) 1999-2004 IC & S dbmail@ic-s.nl
+-# Copyright (c) 2004-2011 NFG Net Facilities Group BV support@nfg.nl
+-#
+-# This program is free software; you can redistribute it and/or
+-# modify it under the terms of the GNU General Public License
+-# as published by the Free Software Foundation; either
+-# version 2 of the License, or (at your option) any later
+-# version.
+-#
+-# This program is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with this program; if not, write to the Free Software
+-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+-
+-
+-EXTRA_DIST = dbmail-imapd.service.in dbmail-lmtpd.service.in dbmail-pop3d.service.in dbmail-timsieved.service.in
+-SYSTEMD_UNIT_DIR = /usr/lib/systemd/system
+-SYSTEMD_TMPFILES_DIR = /usr/lib/tmpfiles.d
+-PID_DIR=/run/dbmail
+-
+-if SYSTEMD
+-install-systemd: dbmail-imapd.service dbmail-lmtpd.service dbmail-pop3d.service dbmail-timsieved.service dbmail.tmpfiles
+- $(MKDIR_P) $(DESTDIR)$(SYSTEMD_UNIT_DIR)
+- $(INSTALL_DATA) dbmail-imapd.service \
+- $(DESTDIR)$(SYSTEMD_UNIT_DIR)/dbmail-imapd.service
+- $(INSTALL_DATA) dbmail-lmtpd.service \
+- $(DESTDIR)$(SYSTEMD_UNIT_DIR)/dbmail-lmtpd.service
+- $(INSTALL_DATA) dbmail-pop3d.service \
+- $(DESTDIR)$(SYSTEMD_UNIT_DIR)/dbmail-pop3d.service
+- $(INSTALL_DATA) dbmail-timsieved.service \
+- $(DESTDIR)$(SYSTEMD_UNIT_DIR)/dbmail-timsieved.service
+- $(MKDIR_P) $(DESTDIR)$(SYSTEMD_TMPFILES_DIR)
+- $(INSTALL_DATA) dbmail.tmpfiles \
+- $(DESTDIR)$(SYSTEMD_TMPFILES_DIR)/dbmail.conf
+-
+-uninstall-systemd:
+- rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/dbmail-imapd.service
+- rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/dbmail-lmtpd.service
+- rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/dbmail-pop3d.service
+- rm -f $(DESTDIR)$(SYSTEMD_UNIT_DIR)/dbmail-timsieved.service
+- rm -f $(DESTDIR)$(SYSTEMD_TMPFILES_DIR)/dbmail.tmpfiles
+-
+-SUFFIXES=.service.in .service .tmpfiles.in .tmpfiles
+-
+-.service.in.service:
+- $(AM_V_GEN)sed \
+- -e 's|[@]sbindir[@]|$(sbindir)|g' \
+- -e 's|[@]piddir[@]|$(PID_DIR)|g' \
+- < $< > $@-t && \
+- mv $@-t $@
+-
+-.tmpfiles.in.tmpfiles:
+- $(AM_V_GEN)sed \
+- -e 's|[@]piddir[@]|$(PID_DIR)|g' \
+- < $< > $@-t && \
+- mv $@-t $@
+-
+-else
+-install-systemd:
+-uninstall-systemd:
+-endif
+-
+-install-data-local: install-systemd
+-uninstall-local: uninstall-systemd
+diff -wbBurN dbmail.git/Makefile.am dbmail-3.1.5/Makefile.am
+--- dbmail.git/Makefile.am 2013-09-04 19:00:55.000000000 +0400
++++ dbmail-3.1.5/Makefile.am 2013-09-09 15:14:22.549612297 +0400
+@@ -6,10 +6,6 @@
+ SUBDIRS += man
+ endif
+
+-if SYSTEMD
+-SUBDIRS += systemd
+-endif
+-
+ testall:
+ CK_FORK=no make check
+ imaptest user=testuser1 pass=test port=10143 host=localhost test=test-scripts/imap
diff --git a/community/dbmail/dbmail-imapd.service b/community/dbmail/dbmail-imapd.service
deleted file mode 100644
index bc3319fd0..000000000
--- a/community/dbmail/dbmail-imapd.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=DBMail Imap Server
-After=syslog.target network.target mysqld.service postgresql.service
-
-[Service]
-Type=forking
-PIDFile=/run/dbmail/dbmail-imapd.pid
-ExecStart=/usr/bin/dbmail-imapd -p /run/dbmail/dbmail-imapd.pid
-
-[Install]
-WantedBy=multi-user.target
diff --git a/community/dbmail/dbmail-lmtpd.service b/community/dbmail/dbmail-lmtpd.service
deleted file mode 100644
index 570ba1ec7..000000000
--- a/community/dbmail/dbmail-lmtpd.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=DBMail LMTP Server
-After=syslog.target network.target mysqld.service postgresql.service
-
-[Service]
-Type=forking
-PIDFile=/run/dbmail/dbmail-lmtpd.pid
-ExecStart=/usr/bin/dbmail-lmtpd -p /run/dbmail/dbmail-lmtpd.pid
-
-[Install]
-WantedBy=multi-user.target
diff --git a/community/dbmail/dbmail-pop3d.service b/community/dbmail/dbmail-pop3d.service
deleted file mode 100644
index edfa2570a..000000000
--- a/community/dbmail/dbmail-pop3d.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=DBMail pop3 Server
-After=syslog.target network.target mysqld.service postgresql.service
-
-[Service]
-Type=forking
-PIDFile=/run/dbmail/dbmail-pop3d.pid
-ExecStart=/usr/bin/dbmail-pop3d -p /run/dbmail/dbmail-pop3d.pid
-
-[Install]
-WantedBy=multi-user.target
diff --git a/community/dbmail/dbmail-timsieved.service b/community/dbmail/dbmail-timsieved.service
deleted file mode 100644
index 32623e038..000000000
--- a/community/dbmail/dbmail-timsieved.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=DBMail Sieve Server
-After=syslog.target network.target mysqld.service postgresql.service
-
-[Service]
-Type=forking
-PIDFile=/run/dbmail/dbmail-timsieved.pid
-ExecStart=/usr/bin/dbmail-timsieved -p /run/dbmail/dbmail-timsieved.pid
-
-[Install]
-WantedBy=multi-user.target
diff --git a/community/dbmail/dbmail.tmpfiles b/community/dbmail/dbmail.tmpfiles
deleted file mode 100644
index 4b97c91f5..000000000
--- a/community/dbmail/dbmail.tmpfiles
+++ /dev/null
@@ -1 +0,0 @@
-d /run/dbmail 0755 nobody nobody -