From fc7bae7f2fa3668ada9bd173e9f24c7166e1dd13 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Thu, 24 Oct 2019 23:34:19 +0100 Subject: Support moving messages across named queues. Bug 2456 --- test/log/0576 | 8 ++++++++ test/runtest | 17 ++++++++++++++++- test/scripts/0000-Basic/0576 | 40 ++++++++++++++++++++++++++++++++++++++++ test/stdout/0576 | 29 +++++++++++++++++++++++++++++ 4 files changed, 93 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/log/0576 b/test/log/0576 index 8c1cb73df..246b10578 100644 --- a/test/log/0576 +++ b/test/log/0576 @@ -20,6 +20,14 @@ 1999-03-02 09:44:33 10HmbA-0005vi-00 => alternate F= R=all T=dump 1999-03-02 09:44:33 10HmbA-0005vi-00 Completed 1999-03-02 09:44:33 End queue run: pid=pppp +1999-03-02 09:44:33 using queue '' +1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local-smtp S=sss for normal@test.ex +1999-03-02 09:44:33 using queue 'alternate' +1999-03-02 09:44:33 10HmbC-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local-smtp S=sss Q=alternate for alternate@test.ex +1999-03-02 09:44:33 10HmbB-0005vi-00 moved from input, msglog to (third) input, msglog +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 ******** SERVER ******** 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, -qGlowpri/3s, not listening for SMTP diff --git a/test/runtest b/test/runtest index 0d6bcd1d7..db855baf9 100755 --- a/test/runtest +++ b/test/runtest @@ -2546,9 +2546,24 @@ elsif (/^((?i:[A-Z\d_]+=\S+\s+)+)?(\d+)?\s*(sudo(?:\s+-u\s+(\w+))?\s+)?exim(_\S+ if ($args =~ /\$msg/) { - my @listcmd = ("$parm_cwd/eximdir/exim", '-bp', + my($queuespec); + if ($args =~ /-qG\w+/) { $queuespec = $&; } + + my @listcmd; + + if (defined $queuespec) + { + @listcmd = ("$parm_cwd/eximdir/exim", '-bp', + $queuespec, "-DEXIM_PATH=$parm_cwd/eximdir/exim", -C => "$parm_cwd/test-config"); + } + else + { + @listcmd = ("$parm_cwd/eximdir/exim", '-bp', + "-DEXIM_PATH=$parm_cwd/eximdir/exim", + -C => "$parm_cwd/test-config"); + } print ">> Getting queue list from:\n>> @listcmd\n" if $debug; # We need the message ids sorted in ascending order. # Message id is: --. On some systems (*BSD) the diff --git a/test/scripts/0000-Basic/0576 b/test/scripts/0000-Basic/0576 index dedc73d23..becd16056 100644 --- a/test/scripts/0000-Basic/0576 +++ b/test/scripts/0000-Basic/0576 @@ -72,4 +72,44 @@ sudo mv DIR/spool/alternate/input/* DIR/spool/input/ exim -q **** # +# +# Native queue transfer +exim -bs +MAIL FROM: +RCPT TO: +DATA +Subject: test + +foo +. +RSET +MAIL FROM: +RCPT TO: +DATA +Subject: test + +foo +. +QUIT +**** +exim -bp +**** +exim -bp -qGalternate +**** +# +exim -MG third $msg1 +**** +exim -qGalternate -MG third $msg1 +**** +exim -bp -qGthird +**** +exim -qGthird -MG '' $msg1 $msg2 +**** +exim -bp +**** +exim -bp -qGalternate +**** +exim -bp -qGthird +**** +# no_stderr_check diff --git a/test/stdout/0576 b/test/stdout/0576 index a15ecdd5d..91c57a20d 100644 --- a/test/stdout/0576 +++ b/test/stdout/0576 @@ -29,6 +29,35 @@ 354 Enter message, ending with "." on a line by itself 250 OK id=10HmbA-0005vi-00 221 the.local.host.name closing connection +220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250 OK +250 Accepted +354 Enter message, ending with "." on a line by itself +250 OK id=10HmbB-0005vi-00 +250 Reset OK +250 OK +250 Accepted +354 Enter message, ending with "." on a line by itself +250 OK id=10HmbC-0005vi-00 +221 the.local.host.name closing connection + 0m sss 10HmbB-0005vi-00 + normal@test.ex + + 0m sss 10HmbC-0005vi-00 + alternate@test.ex + +Message 10HmbB-0005vi-00 Message 10HmbC-0005vi-00 0m 323 10HmbB-0005vi-00 + normal@test.ex + + 0m sss 10HmbC-0005vi-00 + alternate@test.ex + +Message 10HmbB-0005vi-00 Message 10HmbC-0005vi-00 0m 323 10HmbB-0005vi-00 + normal@test.ex + + 0m sss 10HmbC-0005vi-00 + alternate@test.ex + ******** SERVER ******** ### default q -- cgit v1.2.3