[exim-cvs] Named Queues: fix immediate-delivery. Bug 2743

Inizio della pagina
Delete this message
Reply to this message
Autore: Exim Git Commits Mailing List
Data:  
To: exim-cvs
Oggetto: [exim-cvs] Named Queues: fix immediate-delivery. Bug 2743
Gitweb: https://git.exim.org/exim.git/commitdiff/159cf206c97f876b07829d92db2217689745c1e8
Commit:     159cf206c97f876b07829d92db2217689745c1e8
Parent:     cd4a22176a7532ed1c8bd2b5c3f4c2c3e53bdf37
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Wed May 12 15:01:12 2021 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Wed May 12 15:01:12 2021 +0100


    Named Queues: fix immediate-delivery.  Bug 2743
---
 doc/doc-txt/ChangeLog        | 4 +++-
 src/src/exim.c               | 6 ++++--
 test/confs/0576              | 6 ++++++
 test/log/0576                | 3 +++
 test/scripts/0000-Basic/0576 | 4 ++++
 5 files changed, 20 insertions(+), 3 deletions(-)


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index c3fc013..df6efee 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -247,8 +247,10 @@ JH/51 Taint-check ACL line. Previously, only filenames (for out-of-line ACL

 JH/52 Fix ${ip6norm:} operator.  Previously, any trailing line text was dropped,
       making it unusable in complex expressions.
-    


+JH/53 Bug 2743: fix immediate-delivery via named queue.  Previously this would
+      fail with a taint-check on the spoolfile name, and leave the message
+      queued.



 Exim version 4.94
diff --git a/src/src/exim.c b/src/src/exim.c
index 3e08f03..fd1d873 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -2784,9 +2784,11 @@ on the second character (the one after '-'), to save some effort. */
           else badarg = TRUE;
           break;


-    /* -MCG: set the queue name, to a non-default value */
+    /* -MCG: set the queue name, to a non-default value. Arguably, anything
+       from the commandline should be tainted - but we will need an untainted
+       value for the spoolfile when doing a -odi delivery process. */


-    case 'G': if (++i < argc) queue_name = string_copy_taint(argv[i], TRUE);
+    case 'G': if (++i < argc) queue_name = string_copy_taint(argv[i], FALSE);
           else badarg = TRUE;
           break;


diff --git a/test/confs/0576 b/test/confs/0576
index d6c0a1d..1b147aa 100644
--- a/test/confs/0576
+++ b/test/confs/0576
@@ -7,6 +7,8 @@ SERVER =
log_selector = +received_recipients +sender_on_delivery

acl_smtp_rcpt = rcpt
+acl_not_smtp_start = not_smtp
+
queue_only
queue_run_in_order

@@ -19,6 +21,10 @@ rcpt:
     queue = ${extract {$local_part} {normal="" alternate=alternate lowpri=lowpri}}
     logwrite = using queue '$queue_name'


+not_smtp:
+  accept
+    queue = example
+
 #---------------


begin routers
diff --git a/test/log/0576 b/test/log/0576
index 246b105..ddc28f9 100644
--- a/test/log/0576
+++ b/test/log/0576
@@ -28,6 +28,9 @@
1999-03-02 09:44:33 10HmbC-0005vi-00 moved from (alternate) input, msglog to (third) input, msglog
1999-03-02 09:44:33 10HmbB-0005vi-00 moved from (third) input, msglog to input, msglog
1999-03-02 09:44:33 10HmbC-0005vi-00 moved from (third) input, msglog to input, msglog
+1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@??? U=CALLER P=local S=sss Q=example for q_set_by_nonsmtp_acl@???
+1999-03-02 09:44:33 10HmbD-0005vi-00 => q_set_by_nonsmtp_acl <q_set_by_nonsmtp_acl@???> F=<CALLER@???> Q=example R=all T=dump
+1999-03-02 09:44:33 10HmbD-0005vi-00 Completed

******** SERVER ********
1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, -qGlowpri/3s, not listening for SMTP
diff --git a/test/scripts/0000-Basic/0576 b/test/scripts/0000-Basic/0576
index ddf17f8..0f9a8c7 100644
--- a/test/scripts/0000-Basic/0576
+++ b/test/scripts/0000-Basic/0576
@@ -119,4 +119,8 @@ exim -bp -qGalternate
exim -bp -qGthird
****
#
+# Immediate delivery, via alternate queue
+exim -odi q_set_by_nonsmtp_acl@???
+****
+#
no_stderr_check