Import from AlmaLinux stable repository
This commit is contained in:
parent
eb8d9b20dc
commit
4ed2cb4585
@ -1,4 +1,3 @@
|
||||
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
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,3 @@
|
||||
SOURCES/README.rpm
|
||||
SOURCES/cassandane-693da61.tar.gz
|
||||
SOURCES/cassandane-testdata-ca669d4b.tar.gz
|
||||
SOURCES/cyrus-imapd-3.4.1.tar.gz
|
||||
|
34
SOURCES/README.rpm
Normal file
34
SOURCES/README.rpm
Normal file
@ -0,0 +1,34 @@
|
||||
---------------
|
||||
Cyrus IMAPd RPM
|
||||
---------------
|
||||
|
||||
This is a _very_ 'quick and dirty' install howto.
|
||||
|
||||
The following steps should lead you to a running Cyrus IMAP server:
|
||||
|
||||
1) Install on a distribution which is supported by this RPM. Don't install
|
||||
on a dirty system, where you have previously installed from source.
|
||||
2) Don't install if you have a previous Cyrus IMAPd installation <=2.1.x on
|
||||
your box. Upgrading any Invoca rpm based installation should be fine.
|
||||
3) Make sure you understand that this RPM installs in FHS compliant
|
||||
directories, like /var/lib/imap and /var/spool/imap
|
||||
4) Make sure cyrus-sasl is installed.
|
||||
5) Make sure saslauthd is running. If not, edit /etc/sysconfig/saslauthd as
|
||||
needed and do 'chkconfig saslauthd on ; service saslauthd start'
|
||||
6) Install the cyrus-imapd RPMs.
|
||||
7) If it's your first install of Cyrus IMAPd, then set a password for the
|
||||
cyrus user in whatever database you are using to authenticate. When
|
||||
using a local account, this should be 'passwd cyrus'.
|
||||
8) Make sure your MTA delivers to Cyrus IMAPd, I recommend LMTP for this.
|
||||
9) Start Cyrus IMAPd with 'service cyrus-imapd start'
|
||||
10) Run cyradm and create a user. Usually it's something like this:
|
||||
'cyradm --user=cyrus --auth=login localhost'
|
||||
11) If you're using sendmail, be aware that cyrusv2.m4 included in standard
|
||||
sendmail distribution uses socket /var/imap/socket/lmtp while this rpm
|
||||
uses /var/lib/imap/socket/lmtp.
|
||||
12) Check your syslog configuration. This RPM uses the mail facility to log
|
||||
messages. On busy sites you may want to limit the mail facility to the
|
||||
info priority with something like 'mail.info /var/log/maillog' in
|
||||
/etc/syslog.conf.
|
||||
|
||||
Enjoy!
|
5
SOURCES/cyrus-imapd.sysusers
Normal file
5
SOURCES/cyrus-imapd.sysusers
Normal file
@ -0,0 +1,5 @@
|
||||
#Type Name ID GECOS Home directory Shell
|
||||
g saslauth 76
|
||||
g mail 12
|
||||
u cyrus 76:mail "Cyrus IMAP Server" /var/lib/imap /sbin/nologin
|
||||
m cyrus saslauth
|
78
SOURCES/patch-cassandane-seen-unseen-flag
Normal file
78
SOURCES/patch-cassandane-seen-unseen-flag
Normal file
@ -0,0 +1,78 @@
|
||||
diff --git a/Cassandane/Cyrus/Flags.pm b/Cassandane/Cyrus/Flags.pm
|
||||
index a61d256..eedaf40 100644
|
||||
--- a/Cassandane/Cyrus/Flags.pm
|
||||
+++ b/Cassandane/Cyrus/Flags.pm
|
||||
@@ -239,6 +239,73 @@ sub test_seen_otheruser
|
||||
$self->check_messages(\%msg);
|
||||
}
|
||||
|
||||
+# https://github.com/cyrusimap/cyrus-imapd/issues/3240
|
||||
+sub test_seen_sharedmb_nosharedseen
|
||||
+ :UnixHierarchySep :AltNamespace
|
||||
+{
|
||||
+ my ($self) = @_;
|
||||
+
|
||||
+ my $folder = 'shared';
|
||||
+
|
||||
+ # shared mailbox with sharedseen=false
|
||||
+ my $admintalk = $self->{adminstore}->get_client();
|
||||
+ $admintalk->create($folder);
|
||||
+ $self->assert_str_equals('ok', $admintalk->get_last_completion_response());
|
||||
+ $admintalk->setacl('shared', 'cassandane' => 'lrswipkxtecdan');
|
||||
+ $self->assert_str_equals('ok', $admintalk->get_last_completion_response());
|
||||
+ $admintalk->setmetadata($folder,
|
||||
+ '/shared/vendor/cmu/cyrus-imapd/sharedseen' => 'false'
|
||||
+ );
|
||||
+ $self->assert_str_equals('ok', $admintalk->get_last_completion_response());
|
||||
+
|
||||
+
|
||||
+ # add some messages
|
||||
+ my $talk = $self->{store}->get_client();
|
||||
+ $self->{store}->set_folder("Shared Folders/$folder");
|
||||
+ $self->{store}->_select();
|
||||
+ $self->assert_num_equals(1, $talk->uid());
|
||||
+ $self->{store}->set_fetch_attributes(qw(uid flags));
|
||||
+
|
||||
+ xlog $self, "Add two messages";
|
||||
+ my %msg;
|
||||
+ $msg{A} = $self->make_message('Message A');
|
||||
+ $msg{A}->set_attributes(id => 1,
|
||||
+ uid => 1,
|
||||
+ flags => []);
|
||||
+ $msg{B} = $self->make_message('Message B');
|
||||
+ $msg{B}->set_attributes(id => 2,
|
||||
+ uid => 2,
|
||||
+ flags => []);
|
||||
+ $self->check_messages(\%msg);
|
||||
+
|
||||
+ # fiddle with seen flag, making sure we get both the expected results
|
||||
+ # and the expected untagged fetch response
|
||||
+ xlog $self, "Set \\Seen on message A";
|
||||
+ my $res = $talk->store('1', '+flags', '(\\Seen)');
|
||||
+ $self->assert_deep_equals({ '1' => { 'flags' => [ '\\Seen' ] }}, $res);
|
||||
+ $msg{A}->set_attribute(flags => ['\\Seen']);
|
||||
+ $self->check_messages(\%msg);
|
||||
+
|
||||
+ xlog $self, "Clear \\Seen on message A";
|
||||
+ $res = $talk->store('1', '-flags', '(\\Seen)');
|
||||
+ $self->assert_deep_equals({ '1' => { 'flags' => [] }}, $res);
|
||||
+ $msg{A}->set_attribute(flags => []);
|
||||
+ $self->check_messages(\%msg);
|
||||
+
|
||||
+ xlog $self, "Set \\Seen on message A again";
|
||||
+ $res = $talk->store('1', '+flags', '(\\Seen)');
|
||||
+ $self->assert_deep_equals({ '1' => { 'flags' => [ '\\Seen' ] }}, $res);
|
||||
+ $msg{A}->set_attribute(flags => ['\\Seen']);
|
||||
+ $self->check_messages(\%msg);
|
||||
+
|
||||
+ # seen flag should survive a reconnect
|
||||
+ xlog $self, "Reconnect, \\Seen should still be on message A";
|
||||
+ $self->{store}->disconnect();
|
||||
+ $self->{store}->connect();
|
||||
+ $self->{store}->_select();
|
||||
+ $self->check_messages(\%msg);
|
||||
+}
|
||||
+
|
||||
#
|
||||
# Test that
|
||||
# - the \Flagged flag can be set
|
60
SOURCES/patch-cyrus-seen-unseen-flag
Normal file
60
SOURCES/patch-cyrus-seen-unseen-flag
Normal file
@ -0,0 +1,60 @@
|
||||
From 6dc8b483b5045a94e72e631a8faee388713c3c05 Mon Sep 17 00:00:00 2001
|
||||
From: Bron Gondwana <brong@fastmail.fm>
|
||||
Date: Wed, 21 Sep 2022 16:08:07 +1000
|
||||
Subject: [PATCH] index: track changes for modseq bump when setting seen on
|
||||
shared folders
|
||||
|
||||
---
|
||||
imap/index.c | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/imap/index.c b/imap/index.c
|
||||
index af06e94e6..5c96216ad 100644
|
||||
--- a/imap/index.c
|
||||
+++ b/imap/index.c
|
||||
@@ -4778,6 +4778,7 @@ static int index_storeflag(struct index_state *state,
|
||||
int dirty = 0;
|
||||
modseq_t oldmodseq;
|
||||
struct index_map *im = &state->map[msgno-1];
|
||||
+ int seen_dirty = 0;
|
||||
int r;
|
||||
|
||||
memset(modified_flags, 0, sizeof(struct index_modified_flags));
|
||||
@@ -4803,6 +4804,7 @@ static int index_storeflag(struct index_state *state,
|
||||
im->isseen = new;
|
||||
state->seen_dirty = 1;
|
||||
dirty++;
|
||||
+ seen_dirty = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4925,6 +4927,7 @@ static int index_storeflag(struct index_state *state,
|
||||
else
|
||||
system_flags &= ~FLAG_SEEN;
|
||||
}
|
||||
+
|
||||
/* add back the internal tracking flags */
|
||||
system_flags |= keep;
|
||||
|
||||
@@ -4942,6 +4945,18 @@ static int index_storeflag(struct index_state *state,
|
||||
r = msgrecord_set_userflags(msgrec, user_flags);
|
||||
if (r) return r;
|
||||
|
||||
+ // patch back in seen state for non-internal-seen
|
||||
+ if (seen_dirty && !state->internalseen) {
|
||||
+ if (im->isseen) {
|
||||
+ modified_flags->added_system_flags |= FLAG_SEEN;
|
||||
+ modified_flags->added_flags++;
|
||||
+ }
|
||||
+ else {
|
||||
+ modified_flags->removed_system_flags |= FLAG_SEEN;
|
||||
+ modified_flags->removed_flags++;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* if it's silent and unchanged, update the seen value, but
|
||||
* not if qresync is enabled - RFC 4551 says that the MODSEQ
|
||||
* must always been told, and we prefer just to tell flags
|
||||
--
|
||||
2.43.0
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
Name: cyrus-imapd
|
||||
Version: 3.4.1
|
||||
Release: 7%{?dist}
|
||||
Release: 11%{?dist}
|
||||
|
||||
|
||||
%define ssl_pem_file_prefix /etc/pki/%name/%name
|
||||
@ -48,17 +48,25 @@ Patch1: patch-cyrus-default-configs
|
||||
# place in the source must be patched to match.
|
||||
Patch2: patch-cyrus-rename-quota
|
||||
|
||||
|
||||
# Workaround for some compiled Perl modules not being linked against
|
||||
# libpcreposix, which causes them to fail to load.
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1668723
|
||||
# https://github.com/cyrusimap/cyrus-imapd/issues/2629#issuecomment-456925909
|
||||
Patch4: patch-cyrus-perl-linking
|
||||
|
||||
Patch5: cyrus-imapd-CVE-2021-33582.patch
|
||||
Patch6: fix-broken-delivery-to-shared-mailboxes.patch
|
||||
Patch5: patch-cyrus-CVE-2021-33582
|
||||
Patch6: patch-cyrus-fix-broken-delivery-to-shared-mailboxes
|
||||
|
||||
# https://github.com/cyrusimap/cyrus-imapd/pull/3892
|
||||
Patch7: cyrus-imapd-squatter-assert-crash.patch
|
||||
Patch7: patch-cyrus-squatter-assert-crash
|
||||
|
||||
# https://issues.redhat.com/browse/RHEL-20925
|
||||
# https://github.com/cyrusimap/cyrus-imapd/issues/3240
|
||||
# was fixed upstream in 3.2 by:
|
||||
# https://github.com/cyrusimap/cyrus-imapd/pull/3577
|
||||
# for 3.4 and up the below fix got used instead:
|
||||
# https://github.com/cyrusimap/cyrus-imapd/pull/4240
|
||||
Patch8: patch-cyrus-seen-unseen-flag
|
||||
|
||||
Source10: cyrus-imapd.logrotate
|
||||
Source11: cyrus-imapd.pam-config
|
||||
@ -70,6 +78,7 @@ Source15: README.rpm
|
||||
Source16: cyrus-imapd.service
|
||||
Source17: cyrus-imapd-init.service
|
||||
Source18: cyrus-imapd.tmpfiles.conf
|
||||
Source19: cyrus-imapd.sysusers
|
||||
|
||||
# Source files for running the Cassandane test suite at build time.
|
||||
Source80: https://github.com/cyrusimap/cassandane/archive/%cocas/cassandane-${cocas_short}.tar.gz#/cassandane-%{scmt %cocas}.tar.gz
|
||||
@ -88,6 +97,9 @@ Source91: patch-cassandane-no-syslog
|
||||
# Upstream ticket https://github.com/cyrusimap/cyrus-imapd/issues/1995
|
||||
Source92: patch-cassandane-fix-annotator
|
||||
|
||||
# Regression test for RHEL-20925
|
||||
# https://github.com/cyrusimap/cyrus-imapd/commit/b78c39153f96f473c1b0bbac8f8762c0ad4c64cc
|
||||
Source93: patch-cassandane-seen-unseen-flag
|
||||
|
||||
BuildRequires: autoconf automake bison flex gcc gcc-c++ git glibc-langpack-en
|
||||
BuildRequires: groff libtool pkgconfig rsync systemd transfig
|
||||
@ -109,6 +121,8 @@ BuildRequires: python3-sphinx
|
||||
# Miscellaneous modules needed for 'make check' to function:
|
||||
BuildRequires: cyrus-sasl-plain cyrus-sasl-md5
|
||||
|
||||
BuildRequires: systemd-rpm-macros
|
||||
|
||||
%if %{with cassandane}
|
||||
# Additional packages required for cassandane to function
|
||||
BuildRequires: imaptest net-tools words
|
||||
@ -155,8 +169,10 @@ BuildRequires: make
|
||||
|
||||
Requires(pre): shadow-utils
|
||||
%{?systemd_requires}
|
||||
%{?sysusers_requires_compat}
|
||||
|
||||
Requires: %name-utils = %version-%release
|
||||
Requires: cyrus-imapd-libs%{?_isa} = %{version}-%{release}
|
||||
Requires: cyrus-imapd-utils = %{version}-%{release}
|
||||
Requires: file sscg
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
|
||||
@ -187,7 +203,7 @@ hierarchies.
|
||||
|
||||
%package devel
|
||||
Summary: Cyrus IMAP server development files
|
||||
Requires: %name%{?_isa} = %version-%release
|
||||
Requires: cyrus-imapd-libs%{?_isa} = %{version}-%{release}
|
||||
Requires: pkgconfig
|
||||
|
||||
%description devel
|
||||
@ -215,7 +231,8 @@ and the its utilities.
|
||||
|
||||
%package utils
|
||||
Summary: Cyrus IMAP server administration utilities
|
||||
Requires: cyrus-imapd = %{version}-%{release}
|
||||
Requires: cyrus-imapd-libs%{?_isa} = %{version}-%{release}
|
||||
Requires: perl-Cyrus = %{version}-%{release}
|
||||
|
||||
%description utils
|
||||
The cyrus-imapd-utils package contains administrative tools for the
|
||||
@ -225,6 +242,7 @@ one running the server.
|
||||
|
||||
%package virusscan
|
||||
Summary: Cyrus virus scanning utility
|
||||
Requires: cyrus-imapd-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description virusscan
|
||||
The cyrus-imapd-virusscan package contains the cyr_virusscan utility. It
|
||||
@ -258,6 +276,7 @@ tar xf %SOURCE81
|
||||
|
||||
patch -p1 < %SOURCE91
|
||||
patch -p1 < %SOURCE92
|
||||
patch -p1 < %SOURCE93
|
||||
|
||||
cp %SOURCE82 cassandane.ini
|
||||
# RF rpm-buildroot-usage
|
||||
@ -410,6 +429,8 @@ install -p -m 644 doc/examples/imapd_conf/normal.conf %buildroot/etc/imapd.conf
|
||||
install -p -D -m 644 %SOURCE16 %buildroot/%_unitdir/cyrus-imapd.service
|
||||
install -p -D -m 644 %SOURCE17 %buildroot/%_unitdir/cyrus-imapd-init.service
|
||||
install -p -D -m 644 %SOURCE18 %buildroot/%_tmpfilesdir/cyrus-imapd.conf
|
||||
# systemd-sysusers
|
||||
install -p -D -m 644 %{SOURCE19} %{buildroot}%{_sysusersdir}/cyrus-imapd.conf
|
||||
|
||||
# Cleanup of doc dir
|
||||
find doc perl -name CVS -type d -prune -exec rm -rf {} \;
|
||||
@ -548,10 +569,7 @@ exclude+=("!Master.maxforkrate")
|
||||
|
||||
|
||||
%pre
|
||||
# Create 'cyrus' user on target host
|
||||
getent group saslauth >/dev/null || /usr/sbin/groupadd -g %gid -r saslauth
|
||||
getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /var/lib/imap -g %cyrusgroup \
|
||||
-G saslauth -s /sbin/nologin -u %uid -r %cyrususer
|
||||
%sysusers_create_compat %{SOURCE19}
|
||||
|
||||
%post
|
||||
%systemd_post cyrus-imapd.service
|
||||
@ -593,6 +611,7 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v
|
||||
%_unitdir/cyrus-imapd.service
|
||||
%_unitdir/cyrus-imapd-init.service
|
||||
%_tmpfilesdir/cyrus-imapd.conf
|
||||
%{_sysusersdir}/cyrus-imapd.conf
|
||||
|
||||
%dir %cyrexecdir/
|
||||
%cyrexecdir/[a-uw-z]*
|
||||
@ -664,6 +683,20 @@ getent passwd cyrus >/dev/null || /usr/sbin/useradd -c "Cyrus IMAP Server" -d /v
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Feb 08 2024 Martin Osvald <mosvald@redhat.com> - 3.4.1-11
|
||||
- Resolves: RHEL-20925 - Seen/Unseen Flag not working correctly
|
||||
for shared mailboxes
|
||||
- cyrus-imapd.spec: rename patches to correspond with others
|
||||
|
||||
* Tue Aug 01 2023 Martin Osvald <mosvald@redhat.com> - 3.4.1-10
|
||||
- Resolves: #2095381 - Use systemd-sysusers for cyrus user and group
|
||||
|
||||
* Tue Aug 01 2023 Martin Osvald <mosvald@redhat.com> - 3.4.1-9
|
||||
- Resolves: #2228035 - Fix rpminspect CI errors
|
||||
|
||||
* Sun Jul 23 2023 Martin Osvald <mosvald@redhat.com> - 3.4.1-8
|
||||
- Resolves: #2169709 - Remove utils dependency on main package
|
||||
|
||||
* Wed Aug 17 2022 Martin Osvald <mosvald@redhat.com> - 3.4.1-7
|
||||
- Resolves: #2096149 - Fatal error when running "squatter -r user"
|
||||
- Resolves: #2096885 - Enhanced TMT testing for centos-stream
|
||||
|
Loading…
Reference in New Issue
Block a user