Backupt of cyrus-imapd-2* from portage tree
This commit is contained in:
81
net-mail/cyrus-imapd/files/cyrus-imapd-db.patch
Normal file
81
net-mail/cyrus-imapd/files/cyrus-imapd-db.patch
Normal file
@@ -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
|
||||
43
net-mail/cyrus-imapd/files/cyrus-imapd-sieve-libs.patch
Normal file
43
net-mail/cyrus-imapd/files/cyrus-imapd-sieve-libs.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
--- a/configure.ac 2016-10-17 23:01:04.000000000 +0200
|
||||
+++ b/configure.ac 2016-12-28 02:42:37.936610002 +0100
|
||||
@@ -400,6 +379,7 @@
|
||||
fi
|
||||
|
||||
LIBS="${LIBS} ${SQLITE_LIBADD}"
|
||||
+ AC_SUBST(SQLITE_LIBADD)
|
||||
CPPFLAGS="${SQLITE_INCADD} ${CPPFLAGS}"
|
||||
|
||||
AC_DEFINE(HAVE_SQLITE,[],[Build in SQLite support?])
|
||||
@@ -437,7 +416,9 @@
|
||||
fi
|
||||
|
||||
if test "$cyrus_cv_pcre_utf8" = "yes"; then
|
||||
- LIBS="$LIBS -lpcre -lpcreposix";
|
||||
+ PCRE_LIBS="-lpcre -lpcreposix"
|
||||
+ AC_SUBST(PCRE_LIBS)
|
||||
+ LIBS="$LIBS $PCRE_LIBS"
|
||||
AC_DEFINE(ENABLE_REGEX, [], [Do we have a regex library?])
|
||||
AC_DEFINE(HAVE_PCREPOSIX_H, [], [Do we have usable pcre library?])
|
||||
else
|
||||
--- a/perl/imap/Makefile.PL.in 2016-10-17 23:01:04.000000000 +0200
|
||||
+++ b/perl/imap/Makefile.PL.in 2016-12-28 02:42:04.559449967 +0100
|
||||
@@ -69,7 +69,7 @@
|
||||
'clean' => {'FILES' => 'libcyrperl.a cyradm'},
|
||||
'OBJECT' => 'IMAP.o',
|
||||
'MYEXTLIB' => '@top_builddir@/perl/.libs/libcyrus.a @top_builddir@/perl/.libs/libcyrus_min.a',
|
||||
- 'LIBS' => [ "@BDB_LIB@ $LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@"],
|
||||
+ 'LIBS' => [ "@BDB_LIB@ $LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@ @PCRE_LIBS@ @SQLITE_LIBADD@"],
|
||||
'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING'
|
||||
'INC' => "@BDB_INC@ -I@top_srcdir@ -I@top_srcdir@/com_err/et @SASLFLAGS@ @SSL_CPPFLAGS@ -I@top_srcdir@/perl/imap",
|
||||
'EXE_FILES' => [cyradm],
|
||||
--- a/perl/sieve/managesieve/Makefile.PL.in 2016-10-17 23:01:04.000000000 +0200
|
||||
+++ b/perl/sieve/managesieve/Makefile.PL.in 2016-12-28 02:42:34.496490437 +0100
|
||||
@@ -52,7 +52,7 @@
|
||||
'ABSTRACT' => 'Cyrus Sieve management interface',
|
||||
'VERSION_FROM' => "@top_srcdir@/perl/sieve/managesieve/managesieve.pm", # finds $VERSION
|
||||
'MYEXTLIB' => '../lib/libisieve.a @top_builddir@/perl/.libs/libcyrus.a @top_builddir@/perl/.libs/libcyrus_min.a',
|
||||
- 'LIBS' => ["@BDB_LIB@ $LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@"],
|
||||
+ 'LIBS' => ["@BDB_LIB@ $LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@ @PCRE_LIBS@ @SQLITE_LIBADD@"],
|
||||
'CCFLAGS' => '@COV_CFLAGS@',
|
||||
'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING'
|
||||
'INC' => "@BDB_INC@ -I@top_srcdir@/lib -I@top_srcdir@/perl/sieve/lib @SASLFLAGS@ @SSL_CPPFLAGS@",
|
||||
41
net-mail/cyrus-imapd/files/cyrus.conf
Normal file
41
net-mail/cyrus-imapd/files/cyrus.conf
Normal file
@@ -0,0 +1,41 @@
|
||||
# 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
|
||||
}
|
||||
5
net-mail/cyrus-imapd/files/cyrus.confd
Normal file
5
net-mail/cyrus-imapd/files/cyrus.confd
Normal file
@@ -0,0 +1,5 @@
|
||||
# Copyright 1999-2004 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# Additional options for the cyrus master
|
||||
CYRUS_OPTS=""
|
||||
6
net-mail/cyrus-imapd/files/cyrus.pam-include
Normal file
6
net-mail/cyrus-imapd/files/cyrus.pam-include
Normal file
@@ -0,0 +1,6 @@
|
||||
#%PAM-1.0
|
||||
|
||||
auth required pam_nologin.so
|
||||
auth include system-auth
|
||||
|
||||
account include system-auth
|
||||
22
net-mail/cyrus-imapd/files/cyrus.rc6
Normal file
22
net-mail/cyrus-imapd/files/cyrus.rc6
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2007 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
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 $?
|
||||
}
|
||||
50
net-mail/cyrus-imapd/files/imapd.conf
Normal file
50
net-mail/cyrus-imapd/files/imapd.conf
Normal file
@@ -0,0 +1,50 @@
|
||||
# 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'
|
||||
Reference in New Issue
Block a user