Projects
Kolab:16:Testing:Candidate
cyrus-imapd-3
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 9
View file
cyrus-imapd.spec
Changed
@@ -54,6 +54,9 @@ Patch10: 0005-Fixed-GETMETADATA-proxying.patch Patch11: 0001-Accept-existing-ancestors-to-new-mailboxes.patch Patch12: 0001-Fix-SETMETADATA-on-shared-folders.patch +Patch13: 0001-Print-errors-during-sieve-script-parsing.patch +Patch14: 0002-Ignore-broken-and-missing-sieve-scripts-during-repli.patch + Source10: cyrus-imapd.logrotate Source11: cyrus-imapd.pam-config
View file
0001-Print-errors-during-sieve-script-parsing.patch
Added
@@ -0,0 +1,49 @@ +From 0812b21a1697face5e49b73c9820d4c072735da1 Mon Sep 17 00:00:00 2001 +From: Christian Mollekopf <mollekopf@apheleia-it.ch> +Date: Wed, 15 Mar 2023 15:27:12 +0100 +Subject: PATCH 1/2 Print errors during sieve script parsing + +The one in mailbox.c stopped replication in it's tracks (from cyrus 2.5 +to 3.6), with a rather unhelpful "append_fromstage() failed: System I/O error" message. +--- + imap/mailbox.c | 3 +++ + imap/sieve_db.c | 3 +++ + 2 files changed, 6 insertions(+) + mode change 100644 => 100755 imap/mailbox.c + mode change 100644 => 100755 imap/sieve_db.c + +diff --git a/imap/mailbox.c b/imap/mailbox.c +old mode 100644 +new mode 100755 +index 434afc11a..73ed22b38 +--- a/imap/mailbox.c ++++ b/imap/mailbox.c +@@ -4087,6 +4087,9 @@ static int mailbox_update_sieve(struct mailbox *mailbox, + char *errors = NULL; + + r = sievedir_put_script(mailbox->sievedir, name, content, &errors); ++ if (errors) { ++ syslog(LOG_ERR, "Error during sievedir_put_script for %s %s", mailbox_name(mailbox), errors); ++ } + + if (!r && isactive) { + r = sievedir_activate_script(mailbox->sievedir, name); +diff --git a/imap/sieve_db.c b/imap/sieve_db.c +old mode 100644 +new mode 100755 +index 6088b8425..ea3653874 +--- a/imap/sieve_db.c ++++ b/imap/sieve_db.c +@@ -1052,6 +1052,9 @@ EXPORTED int sieve_script_rebuild(const char *userid, + /* Update bytecode */ + char *errors = NULL; + r = sievedir_put_script(sievedir, script, content, &errors); ++ if (errors) { ++ syslog(LOG_ERR, "Error during sievedir_put_script for %s %s", userid, errors); ++ } + free(errors); + + done: +-- +2.39.2 +
View file
0002-Ignore-broken-and-missing-sieve-scripts-during-repli.patch
Added
@@ -0,0 +1,66 @@ +From e88b325855b83ff366c8108114ced33ec8f964b2 Mon Sep 17 00:00:00 2001 +From: Christian Mollekopf <mollekopf@apheleia-it.ch> +Date: Wed, 15 Mar 2023 15:58:09 +0100 +Subject: PATCH 2/2 Ignore broken and missing sieve scripts during + replication + +Required to synchronize legacy sieve scripts +--- + imap/sync_support.c | 14 +++++++++++++- + lib/imapoptions | 5 +++++ + 2 files changed, 18 insertions(+), 1 deletion(-) + mode change 100644 => 100755 imap/sync_support.c + +diff --git a/imap/sync_support.c b/imap/sync_support.c +old mode 100644 +new mode 100755 +index e6e558d6f..f2699108a +--- a/imap/sync_support.c ++++ b/imap/sync_support.c +@@ -933,7 +933,13 @@ int sync_sieve_activate(const char *userid, const char *bcname) + (int) strlen(bcname) - BYTECODE_SUFFIX_LEN, bcname); + + r = sievedb_lookup_name(db, name, &sdata, 0); +- if (r) goto done; ++ if (r) { ++ if (config_getswitch(IMAPOPT_SYNC_IGNORE_SIEVE_ERRORS)) { ++ syslog(LOG_ERR, "Failed to find the sieve script to activate: %s. Ignoring", bcname); ++ r = 0; ++ } ++ goto done; ++ } + } + + r = sieve_script_activate(mailbox, sdata); +@@ -3447,6 +3453,12 @@ int sync_sieve_upload(const char *userid, const char *fname, + } + + r = sieve_script_store(mailbox, sdata, &buf); ++ if (r) { ++ if (config_getswitch(IMAPOPT_SYNC_IGNORE_SIEVE_ERRORS)) { ++ syslog(LOG_ERR, "Failed to store the sieve script %s for %s. Ignoring", name, userid); ++ r = 0; ++ } ++ } + + done: + if (!r) sync_log_sieve(userid); +diff --git a/lib/imapoptions b/lib/imapoptions +index c15163265..384fb523b 100644 +--- a/lib/imapoptions ++++ b/lib/imapoptions +@@ -2827,6 +2827,11 @@ product version in the capabilities + sync_client will only use csync. Prefix with a channel name to + apply only for that channel */ + ++{ "sync_ignore_sieve_errors", 0, SWITCH, "3.6.0" } ++/* Whether sync_client should ignore errors related to sieve ++ script creation, and activation. Useful to fix replication ++ with legacy backends*/ ++ + { "syslog_prefix", NULL, STRING, "3.1.8" } + /* String to be prepended to the process name in syslog entries. Can + be further overridden by setting the $CYRUS_SYSLOG_PREFIX environment +-- +2.39.2 +
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.