summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-mail/cyrus-imapd/files')
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-2.4.17-statuscache.diff11
-rw-r--r--net-mail/cyrus-imapd/files/cyrus-imapd-db.patch81
-rw-r--r--net-mail/cyrus-imapd/files/cyrus.conf43
-rw-r--r--net-mail/cyrus-imapd/files/cyrus.confd6
-rw-r--r--net-mail/cyrus-imapd/files/cyrus.pam-include6
-rw-r--r--net-mail/cyrus-imapd/files/cyrus.rc623
-rw-r--r--net-mail/cyrus-imapd/files/imapd.conf52
7 files changed, 222 insertions, 0 deletions
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-2.4.17-statuscache.diff b/net-mail/cyrus-imapd/files/cyrus-imapd-2.4.17-statuscache.diff
new file mode 100644
index 000000000000..b939479e4a78
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-2.4.17-statuscache.diff
@@ -0,0 +1,11 @@
+--- imap/statuscache_db.c.orig 2012-12-01 20:57:54.000000000 +0100
++++ imap/statuscache_db.c 2013-10-18 17:09:42.110915989 +0200
+@@ -152,7 +152,7 @@
+ len = strlcpy(key, mailboxname, sizeof(key));
+ key[len++] = '%';
+ key[len++] = '%';
+- len += strlcpy(key + len, userid, sizeof(key) - len);
++ if (userid) len += strlcpy(key + len, userid, sizeof(key) - len);
+
+ *keylen = len;
+
diff --git a/net-mail/cyrus-imapd/files/cyrus-imapd-db.patch b/net-mail/cyrus-imapd/files/cyrus-imapd-db.patch
new file mode 100644
index 000000000000..f720cf2cb127
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus-imapd-db.patch
@@ -0,0 +1,81 @@
+--- configure.ac 2015-07-06 01:22:19.000000000 +0000
++++ configure.ac 2015-07-22 11:18:33.000000000 +0000
+@@ -236,50 +236,29 @@
+ dnl Berkeley DB Detection
+
+ AC_ARG_WITH(bdb,
+- [AS_HELP_STRING([--with-bdb=DIR], [use Berkeley DB (in DIR) [yes]])],
+- with_bdb=$withval, with_bdb="yes")
+-
+-dnl support old-style
+-AC_ARG_WITH(dbdir,, with_bdb=$withval)
++ [AS_HELP_STRING([--with-bdb], [use Berkeley DB [yes]])],
++ [],
++ [with_bdb="yes"])
+
++# On a properly installed system, we build
++# by including <db.h> and by linking with -ldb
+ case "$with_bdb" in
+- no)
+- use_berkeley="no"
+- ;;
+- yes)
+- use_berkeley="yes"
+- with_bdb_lib=none
+- with_bdb_inc=none
+- ;;
+- *)
+- use_berkeley="yes"
+- with_bdb_lib="$with_bdb/lib"
+- with_bdb_inc="$with_bdb/include"
++ no) ;;
++ *) AC_CHECK_FILE([/usr/include/db.h],
++ [],
++ AC_CHECK_FILE([/usr/include/db/db.h]),
++ [BDB_INC="-I/usr/include/db"],
++ AC_MSG_ERROR([No <db.h> include file is found. Install the
++ appropriate db*-devel package first.]))
++ BDB_LIB="-ldb"
++ AC_SUBST(BDB_INC)
++ AC_SUBST(BDB_LIB)
++ LIBS="${LIBS} ${BDB_LIB}"
++ CPPFLAGS="${CPPFLAGS} ${BDB_INC}"
++ AC_DEFINE(HAVE_BDB,[],[Build in Berkeley DB support?])
+ ;;
+ esac
+-
+-if test "$use_berkeley" != "no"; then
+- CYRUS_BERKELEY_DB_CHK()
+-
+- if test "$dblib" = "no"; then
+- AC_MSG_ERROR([Berkeley DB 3.x or later was not found. You may need to
+- supply the --with-bdb-libdir or --with-bdb-incdir configure options.])
+- fi
+-
+- if test "$with_bdb_lib" != "none"; then
+- CMU_ADD_LIBPATH($with_bdb_lib)
+- fi
+-
+- BDB_INC=${BDB_INCADD}
+- BDB_LIB=${BDB_LIBADD}
+- AC_SUBST(BDB_INC)
+- AC_SUBST(BDB_LIB)
+-
+- LIBS="${LIBS} ${BDB_LIBADD}"
+- CPPFLAGS="${BDB_INCADD} ${CPPFLAGS}"
+- AC_DEFINE(HAVE_BDB,[],[Build in Berkeley DB support?])
+-fi
+-AM_CONDITIONAL([USE_BERKELEY], [test "$use_berkeley" != "no"])
++AM_CONDITIONAL([USE_BERKELEY], [test "$with_bdb" != "no"])
+
+ dnl End Berkeley DB Detection
+
+@@ -1800,7 +1779,7 @@
+ pcre: $cyrus_cv_pcre_utf8
+
+ Database support:
+- bdb: $use_berkeley
++ bdb: $with_bdb
+ mysql: $with_mysql
+ postgresql: $use_pgsql
+ sqlite: $use_sqlite
diff --git a/net-mail/cyrus-imapd/files/cyrus.conf b/net-mail/cyrus-imapd/files/cyrus.conf
new file mode 100644
index 000000000000..18bbd51d4c09
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus.conf
@@ -0,0 +1,43 @@
+# $Id$
+
+# Standard standalone server configuration.
+
+START {
+ # Do not delete this entry!
+ recover cmd="ctl_cyrusdb -r"
+
+ # This is only necessary if using idled for IMAP IDLE.
+ #idled cmd="idled"
+}
+
+# UNIX sockets start with a slash and are put into /var/imap/socket.
+SERVICES {
+ # Add or remove based on preferences.
+ imap cmd="imapd" listen="imap2" prefork=0
+ pop3 cmd="pop3d" listen="pop-3" prefork=0
+
+ # Don't forget to generate the needed keys for SSL or TLS
+ # (see doc/html/install-configure.html).
+ #imaps cmd="imapd -s" listen="imaps" prefork=0
+ #pop3s cmd="pop3d -s" listen="pop3s" prefork=0
+
+ sieve cmd="timsieved" listen="sieve" prefork=0
+
+ # at least one LMTP is required for delivery
+ #lmtp cmd="lmtpd" listen="lmtp" prefork=0
+ lmtpunix cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=0
+
+ # this is only necessary if using notifications
+ #notify cmd="notifyd" listen="/var/imap/socket/notify" proto="udp" prefork=1
+}
+
+EVENTS {
+ # This is required.
+ checkpoint cmd="ctl_cyrusdb -c" period=30
+
+ # This is only necessary if using duplicate delivery suppression.
+ delprune cmd="ctl_deliver -E 3" period=1440
+
+ # This is only necessary if caching TLS sessions.
+ tlsprune cmd="tls_prune" period=1440
+}
diff --git a/net-mail/cyrus-imapd/files/cyrus.confd b/net-mail/cyrus-imapd/files/cyrus.confd
new file mode 100644
index 000000000000..ed7ffe93209d
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus.confd
@@ -0,0 +1,6 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Additional options for the cyrus master
+CYRUS_OPTS=""
diff --git a/net-mail/cyrus-imapd/files/cyrus.pam-include b/net-mail/cyrus-imapd/files/cyrus.pam-include
new file mode 100644
index 000000000000..6e47645bd7d6
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus.pam-include
@@ -0,0 +1,6 @@
+#%PAM-1.0
+
+auth required pam_nologin.so
+auth include system-auth
+
+account include system-auth
diff --git a/net-mail/cyrus-imapd/files/cyrus.rc6 b/net-mail/cyrus-imapd/files/cyrus.rc6
new file mode 100644
index 000000000000..89a3b9fc7bbf
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/cyrus.rc6
@@ -0,0 +1,23 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use net
+ use dns logger
+ after drac saslauthd
+}
+
+start() {
+ ebegin "Starting cyrus imapd"
+ start-stop-daemon --start --quiet --background \
+ --exec /usr/lib/cyrus/master -- ${CYRUS_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping cyrus imapd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/cyrus-master.pid
+ eend $?
+}
diff --git a/net-mail/cyrus-imapd/files/imapd.conf b/net-mail/cyrus-imapd/files/imapd.conf
new file mode 100644
index 000000000000..c7595a116cd4
--- /dev/null
+++ b/net-mail/cyrus-imapd/files/imapd.conf
@@ -0,0 +1,52 @@
+# $Id$
+
+# Don't forget to use chattr +S (if you are using ext[23])
+# when you change these directories (read the docs).
+configdirectory: /var/imap
+partition-default: /var/spool/imap
+sievedir: /var/imap/sieve
+
+tls_ca_path: /etc/ssl/certs
+tls_cert_file: /etc/ssl/cyrus/server.crt
+tls_key_file: /etc/ssl/cyrus/server.key
+
+# Don't use an everyday user as admin.
+admins: cyrus
+
+hashimapspool: yes
+allowanonymouslogin: no
+allowplaintext: no
+
+# Allow renaming of top-level mailboxes.
+#allowusermoves: yes
+
+# Use this if sieve-scripts could be in ~user/.sieve.
+#sieveusehomedir: yes
+
+# Use saslauthd if you want to use pam for imap.
+# But be warned: login with DIGEST-MD5 or CRAM-MD5
+# is not possible using pam.
+#sasl_pwcheck_method: saslauthd
+
+####################################################
+## This is a recommended authentication method if you
+## emerge cyrus-sasl with 'postgres' or 'mysql'
+## To use with mysql database uncomment those lines below.
+
+#sasl_pwcheck_method: auxprop
+#sasl_auxprop_plugin: sql
+
+## possible values for sasl_auxprop_plugin 'mysql', 'pgsql', 'sqlite'.
+#sasl_sql_engine: mysql
+
+## all possible values.
+#sasl_mech_list: LOGIN PLAIN CRAM-MD5 DIGEST-MD5 NTLM
+## or limit to CRAM-MD5 only
+#sasl_mech_list: CRAM-MD5
+
+## change below to suit your setup.
+sasl_sql_user: mailsqluser
+sasl_sql_passwd: password
+sasl_sql_database: mailsqldb
+sasl_sql_hostnames: localhost
+sasl_sql_select: SELECT clear FROM users WHERE email = '%u@%r'