From c9e5a39bde987a654a8f4fced1beda4b94aeb36482c7f7e90383e80ffcb35993 Mon Sep 17 00:00:00 2001 From: Peter Wullinger Date: Thu, 29 Sep 2022 14:00:47 +0000 Subject: [PATCH] Accepting request 1006962 from home:pwcau:branches:server:mail - add (patch-no-exit-on-rewrite-malformed-address.patch) Fix exit on attempt to rewrite a malformed address (Bug 2903) OBS-URL: https://build.opensuse.org/request/show/1006962 OBS-URL: https://build.opensuse.org/package/show/server:mail/exim?expand=0&rev=265 --- exim.changes | 6 ++++ exim.spec | 3 +- ...no-exit-on-rewrite-malformed-address.patch | 29 +++++++++++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 patch-no-exit-on-rewrite-malformed-address.patch diff --git a/exim.changes b/exim.changes index 7d8cf74..8f2724a 100644 --- a/exim.changes +++ b/exim.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Sep 29 13:36:20 UTC 2022 - Peter Wullinger + +- add (patch-no-exit-on-rewrite-malformed-address.patch) + Fix exit on attempt to rewrite a malformed address (Bug 2903) + ------------------------------------------------------------------- Tue Sep 6 09:19:57 UTC 2022 - Ludwig Nussel diff --git a/exim.spec b/exim.spec index 53aed49..e0f9fee 100644 --- a/exim.spec +++ b/exim.spec @@ -75,7 +75,7 @@ Requires(pre): group(mail) Requires(pre): fileutils textutils %endif Version: 4.96 -Release: 0 +Release: 1 %if %{with_mysql} BuildRequires: mysql-devel %endif @@ -105,6 +105,7 @@ Source40: exim.service Source41: exim_db.8.gz Patch0: exim-tail.patch Patch1: gnu_printf.patch +Patch2: patch-no-exit-on-rewrite-malformed-address.patch %package -n eximon Summary: Eximon, an graphical frontend to administer Exim's mail queue diff --git a/patch-no-exit-on-rewrite-malformed-address.patch b/patch-no-exit-on-rewrite-malformed-address.patch new file mode 100644 index 0000000..3aa7b91 --- /dev/null +++ b/patch-no-exit-on-rewrite-malformed-address.patch @@ -0,0 +1,29 @@ +From e7ec503729970a03d4509921342bc81313976126 Mon Sep 17 00:00:00 2001 +From: Jeremy Harris +Date: Tue, 12 Jul 2022 22:14:04 +0100 +Subject: [PATCH] Fix exit on attempt to rewrite a malformed address. Bug 2903 + +diff --git a/src/rewrite.c b/src/src/rewrite.c +index bfd78b5f1..90614e626 100644 +--- a/src/rewrite.c ++++ b/src/rewrite.c +@@ -497,15 +497,14 @@ while (*s) + + if (!recipient) + { +- /* Handle unparesable addresses in the header. Slightly ugly because a ++ /* Log unparesable addresses in the header. Slightly ugly because a + null output from the extract can also result from a header without an +- address, "To: undisclosed recpients:;" being the classic case. */ ++ address, "To: undisclosed recpients:;" being the classic case. Ignore ++ this one and carry on. */ + + if ((rewrite_rules || routed_old) && Ustrcmp(errmess, "empty address") != 0) +- { + log_write(0, LOG_MAIN, "rewrite: %s", errmess); +- exim_exit(EXIT_FAILURE); +- } ++ + loop_reset_point = store_reset(loop_reset_point); + continue; + }