import cyrus-imapd-3.4.1-4.el9

This commit is contained in:
CentOS Sources 2021-11-02 21:21:46 -04:00 committed by Stepan Oksanichenko
commit 1f6ea91235
18 changed files with 2553 additions and 0 deletions

5
.cyrus-imapd.metadata Normal file
View File

@ -0,0 +1,5 @@
e39754f688d98ac0040df85e8850a2e330c6235d SOURCES/README.rpm
616efd5bc85d00486a80c78a4d6cc12ebe07565f SOURCES/cassandane-693da61.tar.gz
fd08427d105d2306e95528eff407ab1723b31c69 SOURCES/cassandane-testdata-ca669d4b.tar.gz
8edfa3bca1f914ca30856e6f73d07e4de66173ed SOURCES/cyrus-imapd-3.4.1.tar.gz
7eefe4d240d7033b1f460f85038f6607154e58f4 SOURCES/cyrus-manpages-3.2.6.tar.gz

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
SOURCES/README.rpm
SOURCES/cassandane-693da61.tar.gz
SOURCES/cassandane-testdata-ca669d4b.tar.gz
SOURCES/cyrus-imapd-3.4.1.tar.gz
SOURCES/cyrus-manpages-3.2.6.tar.gz

56
SOURCES/cassandane.ini Normal file
View File

@ -0,0 +1,56 @@
# A basic cassandane.ini file for running cassandane as part of the Fedora
# package build process.
# The idea here is to run tests on the just-compiled version of cyrus-imapd.
# However, many of the build locations are just random temporary directories, and
# so this requires some finesse.
[cassandane]
rootdir = CASSDIR/work
pwcheck = alwaystrue # This is enabled in Fedora builds
cleanup = no
maxworkers = 1
base_port = 19100
#[valgrind]
#enabled = no
# The installed copy
[cyrus default]
prefix = /usr
destdir = BUILDROOT
quota = cyr_quota
# Replication testing disabled
# [cyrus replica]
# [cyrus murder]
# Don't enable any of the gdb options but leave them here in case someone ever
# needs to do so
#[gdb]
# imapd = yes
# sync_server = yes
# lntpd = yes
# timsieved = yes
# backupd = yes
[config]
altnamespace = no
unixhierarchysep = no
client_timeout = 60
#[caldavtalk]
#basedir = CASSDIR/cassandane/testdata
[imaptest]
# Cassandane wants this to not be installed. Don't know why. To use it we
# have to make a directory and link things into it.
basedir = imaptest
# [jmaptester]
# basedir = JMAP-Tester
# The JMAP modules end up needing JSON-Typist (which I could bundle) and CryptX (which is a bit too much to bundle)
# [caldavtester]
# XXX Would need to include the source in the cyrus package just as cassandane is, and get it built before running tests
# basedir = ...

View File

@ -0,0 +1,12 @@
[Unit]
Description=One-time configuration for cyrus-imapd
ConditionPathExists=!/etc/pki/cyrus-imapd/cyrus-imapd.pem
ConditionPathExists=!/etc/pki/cyrus-imapd/cyrus-imapd-key.pem
ConditionPathExists=!/etc/pki/cyrus-imapd/cyrus-imapd-ca.pem
[Service]
Type=oneshot
Group=mail
RemainAfterExit=no
ExecStart=/usr/bin/sscg --package cyrus-imapd --cert-file /etc/pki/cyrus-imapd/cyrus-imapd.pem --cert-key-file /etc/pki/cyrus-imapd/cyrus-imapd-key.pem --ca-file /etc/pki/cyrus-imapd/cyrus-imapd-ca.pem --cert-key-mode=0640

View File

@ -0,0 +1,36 @@
#!/bin/sh
#
# This file is run on a daily basis to perform a backup of your
# mailbox list which can be used to recreate mailboxes.db from backup.
# Restore is done using ctl_mboxlist after uncompressing the file.
BACKDIR="/var/lib/imap/backup"
MBOXLIST="${BACKDIR}/mboxlist"
ROTATE=6
# fallback to su if runuser not available
if [ -x /sbin/runuser ]; then
RUNUSER=runuser
else
RUNUSER=su
fi
# source custom configuration
if [ -f /etc/sysconfig/cyrus-imapd ]; then
. /etc/sysconfig/cyrus-imapd
fi
[ -x /usr/sbin/ctl_mboxlist ] || exit 0
[ -f /var/lib/imap/db/skipstamp ] || exit 0
# rotate mailbox lists
seq $[ $ROTATE - 1 ] -1 1 | while read i; do
[ -f ${MBOXLIST}.${i}.gz ] && mv -f ${MBOXLIST}.${i}.gz ${MBOXLIST}.$[ $i + 1 ].gz
done
[ -f ${MBOXLIST}.gz ] && mv -f ${MBOXLIST}.gz ${MBOXLIST}.1.gz
# export mailboxes.db
$RUNUSER - cyrus -s /bin/sh -c "umask 077 < /dev/null ; /usr/sbin/ctl_mboxlist -d | gzip > ${MBOXLIST}.gz"
exit 0
# EOF

View File

@ -0,0 +1,7 @@
/var/log/imapd.log /var/log/auth.log {
missingok
sharedscripts
postrotate
/bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
endscript
}

View File

@ -0,0 +1,9 @@
# Magic
# Magic data for file(1) command.
# Format is described in magic(files), where:
# files is 5 on V7 and BSD, 4 on SV, and ?? in the SVID.
#------------------------------------------------------------------------------
# skiplist: file(1) magic Cyrus skiplist DB
#
0 string \241\002\213\015skiplist\ file\0\0\0 Cyrus skiplist DB

View File

@ -0,0 +1,5 @@
#%PAM-1.0
auth required pam_nologin.so
auth include password-auth
account include password-auth
session include password-auth

View File

@ -0,0 +1,22 @@
[Unit]
Description=Cyrus-imapd IMAP/POP3 email server
After=local-fs.target network-online.target
Requires=cyrus-imapd-init.service
After=cyrus-imapd-init.service
[Service]
Type=simple
EnvironmentFile=/etc/sysconfig/cyrus-imapd
ExecStart=/usr/libexec/cyrus-imapd/master $CYRUSOPTIONS
ExecReload=/bin/kill -HUP $MAINPID
PrivateTmp=true
# Cyrus may spawn many processes in normal operation. These figures are higher
# than the defaults, but may still need to be tuned for your local
# configuration.
TasksMax=2048
LimitNOFILE=16384
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,5 @@
# Options to cyrus-master
CYRUSOPTIONS=""
# Mailbox list dumps are rotated n times via cron.daily
#ROTATE=6

View File

@ -0,0 +1,5 @@
d /run/cyrus 0750 cyrus mail -
d /run/cyrus/db 0700 cyrus mail -
d /run/cyrus/lock 0700 cyrus mail -
d /run/cyrus/proc 0700 cyrus mail -
d /run/cyrus/socket 0750 cyrus mail -

View File

@ -0,0 +1,14 @@
diff --git a/utils/annotator.pl b/utils/annotator.pl
index 265c73f..8af3d58 100755
--- a/utils/annotator.pl
+++ b/utils/annotator.pl
@@ -140,6 +140,8 @@ GetOptions(
xlog "annotator $$ starting";
Cassandane::AnnotatorDaemon->run(
pid_file => $pidfile,
- port => $port
+ port => $port,
+ user => (getpwuid($<))[0],
+ group => (getgrgid($())[0],
);
xlog "annotator $$ exiting";

View File

@ -0,0 +1,41 @@
diff --git a/Cassandane/Util/Log.pm b/Cassandane/Util/Log.pm
index 17d2cc7..11b747f 100644
--- a/Cassandane/Util/Log.pm
+++ b/Cassandane/Util/Log.pm
@@ -51,9 +51,6 @@ our @EXPORT = qw(
my $verbose = 0;
-openlog('cassandane', '', LOG_LOCAL6)
- or die "Cannot openlog";
-
sub xlog
{
my $id;
@@ -70,7 +67,6 @@ sub xlog
$msg .= "($id) " if $id;
$msg .= join(' ', @_);
print STDERR "$msg\n";
- syslog(LOG_ERR, "$msg");
}
sub set_verbose
diff --git a/Cassandane/Instance.pm b/Cassandane/Instance.pm
index bdfa44f..e852599 100644
--- a/Cassandane/Instance.pm
+++ b/Cassandane/Instance.pm
@@ -2030,12 +2030,8 @@ sub setup_syslog_replacement
{
my ($self) = @_;
- if (not(-e 'utils/syslog.so') || not(-e 'utils/syslog_probe')) {
- xlog "utils/syslog.so not found (do you need to run 'make'?)";
- xlog "tests will not examine syslog output";
- $self->{have_syslog_replacement} = 0;
- return;
- }
+ $self->{have_syslog_replacement} = 0;
+ return;
$self->{syslog_fname} = "$self->{basedir}/conf/log/syslog";
$self->{have_syslog_replacement} = 1;

View File

@ -0,0 +1,105 @@
diff --git a/doc/examples/imapd_conf/normal.conf b/doc/examples/imapd_conf/normal.conf
index 95b54e9..3935b77 100644
--- a/doc/examples/imapd_conf/normal.conf
+++ b/doc/examples/imapd_conf/normal.conf
@@ -10,7 +10,7 @@ admins: cyrus
###################################################################
# Configuration directory
-configdirectory: /var/lib/cyrus
+configdirectory: /var/lib/imap
# Directories for proc and lock files
proc_path: /run/cyrus/proc
@@ -19,18 +19,18 @@ mboxname_lockpath: /run/cyrus/lock
# Locations for DB files
# The following DB are recreated upon initialization, so should live in
# ephemeral storage for best performance.
-duplicate_db_path: /run/cyrus/deliver.db
-ptscache_db_path: /run/cyrus/ptscache.db
-statuscache_db_path: /run/cyrus/statuscache.db
-tls_sessions_db_path: /run/cyrus/tls_sessions.db
+duplicate_db_path: /run/cyrus/db/deliver.db
+ptscache_db_path: /run/cyrus/db/ptscache.db
+statuscache_db_path: /run/cyrus/db/statuscache.db
+tls_sessions_db_path: /run/cyrus/db/tls_sessions.db
# Which partition to use for default mailboxes
defaultpartition: default
-partition-default: /var/spool/cyrus/mail
+partition-default: /var/spool/imap
# If sieveusehomedir is false (the default), this directory is searched
# for Sieve scripts.
-sievedir: /var/spool/sieve
+sievedir: /var/lib/imap/sieve
###################################################################
## Important: KEEP THESE IN SYNC WITH cyrus.conf
@@ -51,19 +51,16 @@ syslog_prefix: cyrus
# Space-separated list of HTTP modules that will be enabled in
# httpd(8). This option has no effect on modules that are disabled at
# compile time due to missing dependencies (e.g. libical).
-#
-# Allowed values: caldav, carddav, domainkey, ischedule, rss
-httpmodules: caldav carddav
+# Fedora default: enable all modules besides admin and tzdist
+httpmodules: caldav carddav domainkey freebusy ischedule rss webdav
# If enabled, the partitions will also be hashed, in addition to the
# hashing done on configuration directories. This is recommended if one
# partition has a very bushy mailbox tree.
hashimapspool: true
-# Enable virtual domains
-# and set default domain to localhost
-virtdomains: yes
-defaultdomain: localhost
+# Disable virtual domains by default
+virtdomains: off
###################################################################
## User experience settings
@@ -72,6 +69,14 @@ defaultdomain: localhost
# Minimum time between POP mail fetches in minutes
popminpoll: 1
+# Conversation support is required for jmap
+conversations: 1
+conversations_db: twoskip
+
+# This will default to on in 3.1, and improves compatibility with some Apple
+# devices. Upstream https://github.com/cyrusimap/cyrus-imapd/issues/1556
+specialusealways: 1
+
###################################################################
## User Authentication settings
###################################################################
@@ -99,6 +104,12 @@ sasl_auto_transition: no
## SSL/TLS Options
###################################################################
+# These three files will automatically be generated by the systemd unit when
+# the service starts for the first time.
+tls_server_cert: /etc/pki/cyrus-imapd/cyrus-imapd.pem
+tls_server_key: /etc/pki/cyrus-imapd/cyrus-imapd-key.pem
+tls_client_ca_file: /etc/pki/cyrus-imapd/cyrus-imapd-ca.pem
+
# File containing the global certificate used for ALL services (imap,
# pop3, lmtp, sieve)
#tls_server_cert: /etc/ssl/certs/ssl-cert-snakeoil.pem
diff --git a/doc/examples/cyrus_conf/prefork.conf b/doc/examples/cyrus_conf/prefork.conf
index 186fe66..ab97848 100644
--- a/doc/examples/cyrus_conf/prefork.conf
+++ b/doc/examples/cyrus_conf/prefork.conf
@@ -19,8 +19,8 @@ SERVICES {
# nntps cmd="nntpd -s" listen="nntps" prefork=1
# these are only necessary if using HTTP for CalDAV, CardDAV, or RSS
-# http cmd="httpd" listen="http" prefork=3
-# https cmd="httpd -s" listen="https" prefork=1
+ http cmd="httpd" listen="http" prefork=3
+ https cmd="httpd -s" listen="https" prefork=1
# at least one LMTP is required for delivery
# lmtp cmd="lmtpd" listen="lmtp" prefork=0

View File

@ -0,0 +1,26 @@
diff --git a/perl/sieve/managesieve/Makefile.PL.in b/perl/sieve/managesieve/Makefile.PL.in
index 7180b98..d589ebe 100644
--- a/perl/sieve/managesieve/Makefile.PL.in
+++ b/perl/sieve/managesieve/Makefile.PL.in
@@ -69,7 +69,7 @@ WriteMakefile(
'ABSTRACT' => 'Cyrus Sieve management interface',
'VERSION_FROM' => "@top_srcdir@/perl/sieve/managesieve/managesieve.pm", # finds $VERSION
'MYEXTLIB' => '../lib/.libs/libisieve.a @top_builddir@/perl/.libs/libcyrus.a @top_builddir@/perl/.libs/libcyrus_min.a',
- 'LIBS' => ["$LIB_SASL @SSL_LIBS@ @LIB_UUID@ @LIB_REGEX@ @ZLIB@ @SQLITE_LIBADD@ @MYSQL_LIBADD@ @PGSQL_LIBADD@"],
+ 'LIBS' => ["$LIB_SASL @SSL_LIBS@ @LIB_UUID@ @LIB_REGEX@ @ZLIB@ @SQLITE_LIBADD@ @MYSQL_LIBADD@ @PGSQL_LIBADD@ -lpcreposix"],
'CCFLAGS' => '@GCOV_CFLAGS@',
'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING'
'INC' => "-I@top_srcdir@/lib -I@top_srcdir@/perl/sieve -I@top_srcdir@/perl/sieve/lib @SASLFLAGS@ @SSL_CPPFLAGS@",
diff --git a/perl/imap/Makefile.PL.in b/perl/imap/Makefile.PL.in
index 71416cc..f76cda6 100644
--- a/perl/imap/Makefile.PL.in
+++ b/perl/imap/Makefile.PL.in
@@ -91,7 +91,7 @@ WriteMakefile(
'LD' => $Config{ld} . ' @GCOV_LDFLAGS@',
'OBJECT' => 'IMAP.o',
'MYEXTLIB' => '@top_builddir@/perl/.libs/libcyrus.a @top_builddir@/perl/.libs/libcyrus_min.a',
- 'LIBS' => [ "$LIB_SASL @SSL_LIBS@ @LIB_UUID@ @ZLIB@ @GCOV_LIBS@ @LIBCAP_LIBS@"],
+ 'LIBS' => [ "$LIB_SASL @SSL_LIBS@ @LIB_UUID@ @ZLIB@ @GCOV_LIBS@ @LIBCAP_LIBS@ -lpcreposix"],
'DEFINE' => '-DPERL_POLLUTE', # e.g., '-DHAVE_SOMETHING'
'INC' => "-I@top_srcdir@ -I@top_srcdir@/com_err/et @SASLFLAGS@ @SSL_CPPFLAGS@ @GCOV_CFLAGS@ -I@top_srcdir@/perl/imap",
'EXE_FILES' => [cyradm],

View File

@ -0,0 +1,13 @@
diff --git a/imap/imapd.c b/imap/imapd.c
index 3cc75f5..a22a356 100644
--- a/imap/imapd.c
+++ b/imap/imapd.c
@@ -8022,7 +8022,7 @@ static void cmd_reconstruct(const char *tag, const char *name, int recursive)
fclose(stdout);
fclose(stderr);
- ret = snprintf(buf, sizeof(buf), "%s/quota", SBIN_DIR);
+ ret = snprintf(buf, sizeof(buf), "%s/cyr_quota", SBIN_DIR);
if(ret < 0 || ret >= (int) sizeof(buf)) {
/* in child, so fatailing won't disconnect our user */
fatal("quota buffer not sufficiently big", EX_CONFIG);

View File

@ -0,0 +1,13 @@
diff --git a/cunit/unit.c b/cunit/unit.c
index 46dc358..ca37f22 100644
--- a/cunit/unit.c
+++ b/cunit/unit.c
@@ -97,7 +97,7 @@ EXPORTED void fatal(const char *s, int code)
}
/* Each test gets a maximum of 20 seconds. */
-#define TEST_TIMEOUT_MS (20*1000)
+#define TEST_TIMEOUT_MS (30*1000)
static jmp_buf jbuf;
static const char *code;

2174
SPECS/cyrus-imapd.spec Normal file

File diff suppressed because it is too large Load Diff