From f7fd3850601c141d3a8d5b9cc6e6403f623923ae Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Thu, 20 Apr 2006 14:11:29 +0000 Subject: Make batch delivery work for files and pipes set up by redirection. --- test/confs/0534 | 50 ++++++++++++++++++++++++++++++++++++++++++++ test/log/0411 | 2 +- test/log/0534 | 9 ++++++++ test/mail/0411.afolder | 9 -------- test/mail/0534.mbox | 12 +++++++++++ test/mail/0534.mbox2 | 12 +++++++++++ test/runtest | 4 ++-- test/scripts/0000-Basic/0411 | 2 +- test/scripts/0000-Basic/0534 | 10 +++++++++ 9 files changed, 97 insertions(+), 13 deletions(-) create mode 100644 test/confs/0534 create mode 100644 test/log/0534 create mode 100644 test/mail/0534.mbox create mode 100644 test/mail/0534.mbox2 create mode 100644 test/scripts/0000-Basic/0534 (limited to 'test') diff --git a/test/confs/0534 b/test/confs/0534 new file mode 100644 index 000000000..5e83476fb --- /dev/null +++ b/test/confs/0534 @@ -0,0 +1,50 @@ +# Exim test configuration 0534 + +exim_path = EXIM_PATH +host_lookup_order = bydns +primary_hostname = myhost.test.ex +rfc1413_query_timeout = 0s +spool_directory = DIR/spool +log_file_path = DIR/spool/log/%slog +gecos_pattern = "" +gecos_name = CALLER_NAME + +# ----- Main settings ----- + + + +# ----- Routers ----- + +begin routers + +r1: + driver = redirect + local_part_prefix = file- + local_part_suffix = =* + data = DIR/test-mail/${substr_1:$local_part_suffix} + file_transport = t1 + +r2: + driver = redirect + local_part_prefix = pipe- + local_part_suffix = =* + data = |${substr_1:$local_part_suffix} + pipe_transport = t2 + + +# ----- Transports ----- + +begin transports + +t1: + driver = appendfile + envelope_to_add + user = CALLER + batch_max = 10 + +t2: + driver = pipe + user = CALLER + batch_max = 10 + +# End diff --git a/test/log/0411 b/test/log/0411 index 70c8c8838..8cf2f6097 100644 --- a/test/log/0411 +++ b/test/log/0411 @@ -3,7 +3,7 @@ 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed 1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss 1999-03-02 09:44:33 10HmaY-0005vi-00 => TESTSUITE/test-mail/afolder R=r1 T=t1 -1999-03-02 09:44:33 10HmaY-0005vi-00 => TESTSUITE/test-mail/afolder R=r1 T=t1 +1999-03-02 09:44:33 10HmaY-0005vi-00 -> TESTSUITE/test-mail/afolder R=r1 T=t1 1999-03-02 09:44:33 10HmaY-0005vi-00 Completed 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss 1999-03-02 09:44:33 10HmaZ-0005vi-00 == save bfolder R=r2 T=t2 defer (-21): appendfile: file or directory name "bfolder" is not absolute diff --git a/test/log/0534 b/test/log/0534 new file mode 100644 index 000000000..c59e48e5c --- /dev/null +++ b/test/log/0534 @@ -0,0 +1,9 @@ +1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmaX-0005vi-00 => |TESTSUITE/bin/../bin/iefbr14 R=r2 T=t2 +1999-03-02 09:44:33 10HmaX-0005vi-00 => |TESTSUITE/bin/iefbr14 R=r2 T=t2 +1999-03-02 09:44:33 10HmaX-0005vi-00 -> |TESTSUITE/bin/iefbr14 R=r2 T=t2 +1999-03-02 09:44:33 10HmaX-0005vi-00 => TESTSUITE/test-mail/mbox2 R=r1 T=t1 +1999-03-02 09:44:33 10HmaX-0005vi-00 -> TESTSUITE/test-mail/mbox2 R=r1 T=t1 +1999-03-02 09:44:33 10HmaX-0005vi-00 => TESTSUITE/test-mail/mbox R=r1 T=t1 +1999-03-02 09:44:33 10HmaX-0005vi-00 -> TESTSUITE/test-mail/mbox R=r1 T=t1 +1999-03-02 09:44:33 10HmaX-0005vi-00 Completed diff --git a/test/mail/0411.afolder b/test/mail/0411.afolder index 3810e1196..96b94a189 100644 --- a/test/mail/0411.afolder +++ b/test/mail/0411.afolder @@ -17,12 +17,3 @@ From: CALLER_NAME Date: Tue, 2 Mar 1999 09:44:33 +0000 -From CALLER@test.ex Tue Mar 02 09:44:33 1999 -Received: from CALLER by mail.test.ex with local (Exim x.yz) - (envelope-from ) - id 10HmaY-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000 -Message-Id: -From: CALLER_NAME -Date: Tue, 2 Mar 1999 09:44:33 +0000 - - diff --git a/test/mail/0534.mbox b/test/mail/0534.mbox new file mode 100644 index 000000000..26716f507 --- /dev/null +++ b/test/mail/0534.mbox @@ -0,0 +1,12 @@ +From CALLER@myhost.test.ex Tue Mar 02 09:44:33 1999 +Envelope-to: file-usery=mbox@test.ex, + file-userx=mbox@test.ex +Received: from CALLER by myhost.test.ex with local (Exim x.yz) + (envelope-from ) + id 10HmaX-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: +From: CALLER_NAME +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +A test message. + diff --git a/test/mail/0534.mbox2 b/test/mail/0534.mbox2 new file mode 100644 index 000000000..4d2c7548b --- /dev/null +++ b/test/mail/0534.mbox2 @@ -0,0 +1,12 @@ +From CALLER@myhost.test.ex Tue Mar 02 09:44:33 1999 +Envelope-to: file-usera=mbox2@test.ex, + file-userz=mbox2@test.ex +Received: from CALLER by myhost.test.ex with local (Exim x.yz) + (envelope-from ) + id 10HmaX-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000 +Message-Id: +From: CALLER_NAME +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +A test message. + diff --git a/test/runtest b/test/runtest index 76cc4b99b..2e0c72417 100755 --- a/test/runtest +++ b/test/runtest @@ -1,6 +1,6 @@ #! /usr/bin/perl -w -# $Cambridge: exim/test/runtest,v 1.6 2006/03/17 16:51:45 ph10 Exp $ +# $Cambridge: exim/test/runtest,v 1.7 2006/04/20 14:11:29 ph10 Exp $ ############################################################################### # This is the controlling script for the "new" test suite for Exim. It should # @@ -23,7 +23,7 @@ use Socket; # Start by initializing some global variables -$testversion = "4.61 (06-Feb-06)"; +$testversion = "4.62 (20-Apr-06)"; $cf = "bin/cf"; $cr = "\r"; diff --git a/test/scripts/0000-Basic/0411 b/test/scripts/0000-Basic/0411 index 7bd1ff9d4..012d4e3e6 100644 --- a/test/scripts/0000-Basic/0411 +++ b/test/scripts/0000-Basic/0411 @@ -1,7 +1,7 @@ # use of file= in appendfile with filter setting the folder exim -odi t1 **** -# Batched multiple deliveries (it doesn't batch) +# Batched multiple deliveries (since 4.62 it does batch) exim -odi t11 t12 **** # Error message for failure before full path is set diff --git a/test/scripts/0000-Basic/0534 b/test/scripts/0000-Basic/0534 new file mode 100644 index 000000000..0e039601c --- /dev/null +++ b/test/scripts/0000-Basic/0534 @@ -0,0 +1,10 @@ +# Batch_max when redirecting to a mailbox or a pipe +exim -odi file-userx=mbox@test.ex \ + file-usery=mbox@test.ex \ + file-userz=mbox2@test.ex \ + file-usera=mbox2@test.ex \ + pipe-userx=DIR/bin/iefbr14@test.ex \ + pipe-usery=DIR/bin/iefbr14@test.ex \ + pipe-userz=DIR/bin/../bin/iefbr14@test.ex +A test message. +**** -- cgit v1.2.3