From: Jeremy Harris Date: Sat, 15 Oct 2016 17:56:16 +0000 (+0100) Subject: Testsuite: for queuefile transport, avoid using named-queues as part of test X-Git-Tag: exim-4_88_RC3~34 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=80bbefb8dbd9a7fc548d9beeb8d9f236c00a51a0;p=exim.git Testsuite: for queuefile transport, avoid using named-queues as part of test Also avoid using aux-var as a testing temporary area --- diff --git a/test/confs/5902 b/test/confs/5902 index e7dad63a7..ba4acc29f 100644 --- a/test/confs/5902 +++ b/test/confs/5902 @@ -1,35 +1,26 @@ # Exim test configuration 5902 +OPT= + .include DIR/aux-var/std_conf_prefix # ----- Main settings ----- qualify_domain = test.ex -acl_smtp_rcpt = rcpt - -# ----- ACLs ----- - -begin acl - -rcpt: - accept - queue = ${if eq {normal}{$local_part} {} {$local_part}} - logwrite = using queue '$queue_name' # ----- Routers ----- begin routers -local: - driver = accept - transport = local_delivery - condition = ${if eq {}{$queue_name} {1}{0}} - scan: driver = accept + condition = ${if eq {OPT}{scan} {y}} transport = scan +local: + driver = accept + transport = local_delivery # ----- Transports ----- @@ -37,18 +28,11 @@ begin transports scan: driver = queuefile - directory = DIR/aux-fixed/5902/outbound + directory = DIR/scanner local_delivery: driver = appendfile file = DIR/test-mail/$local_part user = CALLER -# ----- Retry ----- - -begin retry - -* * F,10m,2d - - # End diff --git a/test/log/5902 b/test/log/5902 index 6b45d9b73..6642e4f68 100644 --- a/test/log/5902 +++ b/test/log/5902 @@ -1,11 +1,7 @@ 1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmaX-0005vi-00 => normal R=local T=local_delivery +1999-03-02 09:44:33 10HmaX-0005vi-00 => user1 R=scan T=scan 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed -1999-03-02 09:44:33 using queue 'user1' -1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@test.ex U=CALLER P=local-smtp S=sss Q=user1 -1999-03-02 09:44:33 10HmaY-0005vi-00 => user1 Q=user1 R=scan T=scan -1999-03-02 09:44:33 10HmaY-0005vi-00 Completed 1999-03-02 09:44:33 Start queue run: pid=pppp -1999-03-02 09:44:33 10HmaY-0005vi-00 => user1 R=local T=local_delivery -1999-03-02 09:44:33 10HmaY-0005vi-00 Completed +1999-03-02 09:44:33 10HmaX-0005vi-00 => user1 R=local T=local_delivery +1999-03-02 09:44:33 10HmaX-0005vi-00 Completed 1999-03-02 09:44:33 End queue run: pid=pppp diff --git a/test/mail/5902.user1.5902 b/test/mail/5902.user1 similarity index 55% rename from test/mail/5902.user1.5902 rename to test/mail/5902.user1 index 3b6bde52a..6cc3901e6 100644 --- a/test/mail/5902.user1.5902 +++ b/test/mail/5902.user1 @@ -1,12 +1,10 @@ From CALLER@test.ex Tue Mar 02 09:44:33 1999 -Received: from CALLER by the.local.host.name with local-smtp (Exim x.yz) +Received: from CALLER by the.local.host.name with local (Exim x.yz) (envelope-from ) - id 10HmaY-0005vi-00 + id 10HmaX-0005vi-00 for user1@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 -Subject: test -Message-Id: +Message-Id: From: CALLER_NAME Date: Tue, 2 Mar 1999 09:44:33 +0000 -foo diff --git a/test/scripts/5900-queuefile-transport/5902 b/test/scripts/5900-queuefile-transport/5902 index 4b2a9a611..77c1db215 100644 --- a/test/scripts/5900-queuefile-transport/5902 +++ b/test/scripts/5900-queuefile-transport/5902 @@ -1,22 +1,23 @@ # queuefile transport test delivery -sudo chown EXIMUSER:EXIMGROUP DIR/aux-fixed/5902/outbound -exim -odi normal -**** -sleep 5 # -exim -bs -MAIL FROM: -RCPT TO: -DATA -Subject: test - -foo -. -QUIT +# make a scanner dir for the transport to write into +mkdir -p DIR/scanner +sudo chown EXIMUSER:EXIMGROUP DIR/scanner +# +# this message should be placed by the queuefile transport in the scanner directory +exim -DOPT=scan user1 **** -sleep 5 +sleep 1 # -ls DIR/aux-fixed/5902/outbound -sudo mv DIR/aux-fixed/5902/outbound/1* DIR/spool/input/ +# check it is there +ls DIR/scanner +# +# then re-inject "after scanning" to the default queue and see it gets found +# it should get an appendfile delivery becase it is from the default queue +sudo mv DIR/scanner/* DIR/spool/input/ exim -q +**** +# +# tidy up +sudo rm -fr DIR/scanner no_msglog_check diff --git a/test/stdout/5902 b/test/stdout/5902 index a16696f25..8da182d51 100644 --- a/test/stdout/5902 +++ b/test/stdout/5902 @@ -1,8 +1,2 @@ -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=10HmaY-0005vi-00 -221 the.local.host.name closing connection -10HmaY-0005vi-00-D -10HmaY-0005vi-00-H +10HmaX-0005vi-00-D +10HmaX-0005vi-00-H