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 e7dad63a7cf22cfbbf00ae2f716b6d78b8101100..ba4acc29f2b18cb93a933dbfb09a70926d65e7f5 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 6b45d9b738ca60716182e3999f906a302f7150e1..6642e4f68798b744efdf27a49d43a317bddd2381 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 3b6bde52aa308973e799fa2dffe76161cf8877bf..6cc3901e643599c120bcfc6840b67ae02eb3b98e 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 4b2a9a61144cb3dc08d459a6519995e1e89af1b9..77c1db2159a6bbe0525d603f7b1e8bb4437007f7 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 a16696f2568aa44cdfc3781eefd93d1dc7cbcf89..8da182d51964d006768c3a3574d678acf24fbec2 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