Testsuite: for queuefile transport, avoid using named-queues as part of test
authorJeremy Harris <jgh146exb@wizmail.org>
Sat, 15 Oct 2016 17:56:16 +0000 (18:56 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Sat, 15 Oct 2016 17:56:16 +0000 (18:56 +0100)
Also avoid using aux-var as a testing temporary area

test/confs/5902
test/log/5902
test/mail/5902.user1 [moved from test/mail/5902.user1.5902 with 55% similarity]
test/scripts/5900-queuefile-transport/5902
test/stdout/5902

index e7dad63..ba4acc2 100644 (file)
@@ -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
index 6b45d9b..6642e4f 100644 (file)
@@ -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 <normal@test.ex> R=local T=local_delivery
+1999-03-02 09:44:33 10HmaX-0005vi-00 => user1 <user1@test.ex> 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 <user1@test.ex> 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 <user1@test.ex> 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 <user1@test.ex> 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
similarity index 55%
rename from test/mail/5902.user1.5902
rename to test/mail/5902.user1
index 3b6bde5..6cc3901 100644 (file)
@@ -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 <CALLER@test.ex>)
-       id 10HmaY-0005vi-00
+       id 10HmaX-0005vi-00
        for user1@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
-Subject: test
-Message-Id: <E10HmaY-0005vi-00@the.local.host.name>
+Message-Id: <E10HmaX-0005vi-00@the.local.host.name>
 From: CALLER_NAME <CALLER@test.ex>
 Date: Tue, 2 Mar 1999 09:44:33 +0000
 
-foo
 
index 4b2a9a6..77c1db2 100644 (file)
@@ -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:<CALLER@myhost.test.ex>
-RCPT TO: <user1@test.ex>
-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
index a16696f..8da182d 100644 (file)
@@ -1,8 +1,2 @@
-220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
-250 OK\r
-250 Accepted\r
-354 Enter message, ending with "." on a line by itself\r
-250 OK id=10HmaY-0005vi-00\r
-221 the.local.host.name closing connection\r
-10HmaY-0005vi-00-D
-10HmaY-0005vi-00-H
+10HmaX-0005vi-00-D
+10HmaX-0005vi-00-H