summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2019-10-13 15:50:46 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2019-10-13 15:54:14 +0100
commit7ef88aa0c4c0608ee54ed2ff90b4b34c518d9bb5 (patch)
tree7531d24b669902a9ee2311106b70b517fa31aed2 /test
parentfa2a928fc8a0d1031cc93e03d9ec9125ff9751b5 (diff)
SRS: native implementation. Bug 1649
Diffstat (limited to 'test')
-rw-r--r--test/confs/462087
-rw-r--r--test/log/462016
-rw-r--r--test/mail/4620.CALLER56
-rw-r--r--test/scripts/4620-SRS/462016
-rw-r--r--test/scripts/4620-SRS/REQUIRES2
5 files changed, 177 insertions, 0 deletions
diff --git a/test/confs/4620 b/test/confs/4620
new file mode 100644
index 000000000..5b1175a53
--- /dev/null
+++ b/test/confs/4620
@@ -0,0 +1,87 @@
+# Exim test configuration 4620
+
+.include DIR/aux-var/std_conf_prefix
+
+SRS_SECRET = mysecret
+
+# ----- Main settings -----
+
+acl_smtp_rcpt = accept
+
+domainlist local_domains = test.ex
+domainlist remotesite_domains = remote.ex
+
+log_selector = +all_parents +received_recipients
+queue_only
+
+# ----- Routers -----
+
+begin routers
+
+remote_bouncer:
+ driver = redirect
+ condition = ${if eq {$sender_host_address}{127.0.0.1}}
+ data = :fail: account disabled
+ allow_fail
+
+external:
+ driver = manualroute
+ domains = !+local_domains
+ route_list = remote.ex 127.0.0.1::PORT_S
+ self = send
+ transport = ${if eq {$local_part@$domain} {$original_local_part@$original_domain} \
+ {to_external} {forwarded_external}}
+
+inbound_srs:
+ driver = redirect
+ senders = :
+ domains = +local_domains
+ # detect inbound bounces which are SRS'd, and decode them
+ condition = ${if inbound_srs {$local_part} {SRS_SECRET}}
+ data = $srs_recipient
+
+inbound_srs_failure:
+ driver = redirect
+ senders = :
+ domains = +local_domains
+ # detect inbound bounces which look SRS'd but are invalid
+ condition = ${if inbound_srs {$local_part} {}}
+ allow_fail
+ data = :fail: Invalid SRS recipient address
+
+
+local_redirect:
+ driver = redirect
+ local_parts = redirect
+ data = remote_user@remote.ex
+
+local:
+ driver = accept
+ transport = appendfile
+
+
+# ----- Transports -----
+
+begin transports
+
+to_external:
+ driver = smtp
+
+forwarded_external:
+ driver = smtp
+ max_rcpt = 1
+ return_path = ${srs_encode {SRS_SECRET} {$return_path} {$original_domain}}
+
+
+appendfile:
+ driver = appendfile
+ file = DIR/test-mail/$local_part
+ user = CALLER
+
+# ----- Retry -----
+
+begin retry
+
+* * F,5d,1d
+
+# End
diff --git a/test/log/4620 b/test/log/4620
new file mode 100644
index 000000000..0a98c2712
--- /dev/null
+++ b/test/log/4620
@@ -0,0 +1,16 @@
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for redirect@test.ex
+1999-03-02 09:44:33 10HmaX-0005vi-00 => remote_user@remote.ex <redirect@test.ex> R=external T=forwarded_external H=127.0.0.1 [127.0.0.1] C="250 OK id=10HmaY-0005vi-00"
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaY-0005vi-00 ** remote_user@remote.ex R=remote_bouncer: account disabled
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= <> R=10HmaY-0005vi-00 U=EXIMUSER P=local S=sss for SRS0=12a1=yg=the.local.host.name=CALLER@test.ex
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+1999-03-02 09:44:33 Start queue run: pid=pppp
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => CALLER <SRS0=12a1=yg=the.local.host.name=CALLER@test.ex> R=local T=appendfile
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 End queue run: pid=pppp
+
+******** SERVER ********
+1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on [127.0.0.1]:PORT_S
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= SRS0=12a1=yg=the.local.host.name=CALLER@test.ex H=localhost (the.local.host.name) [127.0.0.1] P=esmtp S=sss id=E10HmaX-0005vi-00@the.local.host.name for remote_user@remote.ex
diff --git a/test/mail/4620.CALLER b/test/mail/4620.CALLER
new file mode 100644
index 000000000..b0a1372da
--- /dev/null
+++ b/test/mail/4620.CALLER
@@ -0,0 +1,56 @@
+From MAILER-DAEMON Tue Mar 02 09:44:33 1999
+Received: from EXIMUSER by the.local.host.name with local (Exim x.yz)
+ id 10HmaZ-0005vi-00
+ for SRS0=12a1=yg=the.local.host.name=CALLER@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+X-Failed-Recipients: remote_user@remote.ex
+Auto-Submitted: auto-replied
+From: Mail Delivery System <Mailer-Daemon@the.local.host.name>
+To: SRS0=12a1=yg=the.local.host.name=CALLER@test.ex
+References: <E10HmaX-0005vi-00@the.local.host.name>
+Content-Type: multipart/report; report-type=delivery-status; boundary=NNNNNNNNNN-eximdsn-MMMMMMMMMM
+MIME-Version: 1.0
+Subject: Mail delivery failed: returning message to sender
+Message-Id: <E10HmaZ-0005vi-00@the.local.host.name>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+--NNNNNNNNNN-eximdsn-MMMMMMMMMM
+Content-type: text/plain; charset=us-ascii
+
+This message was created automatically by mail delivery software.
+
+A message that you sent could not be delivered to one or more of its
+recipients. This is a permanent error. The following address(es) failed:
+
+ remote_user@remote.ex
+ account disabled
+
+--NNNNNNNNNN-eximdsn-MMMMMMMMMM
+Content-type: message/delivery-status
+
+Reporting-MTA: dns; the.local.host.name
+
+Action: failed
+Final-Recipient: rfc822;remote_user@remote.ex
+Status: 5.0.0
+
+--NNNNNNNNNN-eximdsn-MMMMMMMMMM
+Content-type: message/rfc822
+
+Return-path: <SRS0=12a1=yg=the.local.host.name=CALLER@test.ex>
+Received: from localhost ([127.0.0.1] helo=the.local.host.name)
+ by the.local.host.name with esmtp (Exim x.yz)
+ (envelope-from <SRS0=12a1=yg=the.local.host.name=CALLER@test.ex>)
+ id 10HmaY-0005vi-00
+ for remote_user@remote.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Received: from CALLER by the.local.host.name with local (Exim x.yz)
+ (envelope-from <CALLER@the.local.host.name>)
+ id 10HmaX-0005vi-00
+ for redirect@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Message-Id: <E10HmaX-0005vi-00@the.local.host.name>
+From: CALLER_NAME <CALLER@the.local.host.name>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+Message body
+
+--NNNNNNNNNN-eximdsn-MMMMMMMMMM--
+
diff --git a/test/scripts/4620-SRS/4620 b/test/scripts/4620-SRS/4620
new file mode 100644
index 000000000..4a126b8b9
--- /dev/null
+++ b/test/scripts/4620-SRS/4620
@@ -0,0 +1,16 @@
+# SRS native implementation
+#
+exim -bd -DSERVER=server -oX 127.0.0.1:PORT_S
+****
+# Inject a message; will be passed on to remote and queued there
+exim -odi redirect@test.ex
+Message body
+****
+# Run the queue for the remote, will generate bounce which is queued
+exim -q
+****
+# Run the queue for the remote, will send bounce to origin
+exim -q
+****
+#
+killdaemon
diff --git a/test/scripts/4620-SRS/REQUIRES b/test/scripts/4620-SRS/REQUIRES
new file mode 100644
index 000000000..7286713d6
--- /dev/null
+++ b/test/scripts/4620-SRS/REQUIRES
@@ -0,0 +1,2 @@
+support Experimental_SRS
+feature _HAVE_NATIVE_SRS