summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2013-05-22 18:49:49 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2013-05-22 20:09:54 +0100
commitda45993f49e890de3642db3f4c8bddbdb5302277 (patch)
tree6443d27f483d878f2a1966abf9e6a79e740242d7 /test
parentfef3814077e59e3245892b5a7bf5b0f4354c5989 (diff)
parentb4a2b536841292bde7e8e6dc6ef25d97a11641a3 (diff)
Merge branch 'callout_auth'
Diffstat (limited to 'test')
-rw-r--r--test/confs/056870
-rw-r--r--test/scripts/0000-Basic/056876
-rw-r--r--test/stderr/03981
-rw-r--r--test/stderr/04322
-rw-r--r--test/stderr/54103
-rw-r--r--test/stderr/54203
-rw-r--r--test/stdout/056882
7 files changed, 237 insertions, 0 deletions
diff --git a/test/confs/0568 b/test/confs/0568
new file mode 100644
index 000000000..dec5b0dbc
--- /dev/null
+++ b/test/confs/0568
@@ -0,0 +1,70 @@
+# Exim test configuration 0568
+# Recipient callout with AUTH
+
+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 -----
+
+acl_smtp_rcpt = check_rcpt
+
+queue_only
+
+
+# ----- Authentication -----
+
+begin authenticators
+
+plain:
+ driver = plaintext
+ public_name = PLAIN
+ client_send = ^userx^secret
+ server_advertise_condition = yes
+ server_prompts = :
+ server_condition = yes
+ server_set_id = $auth2
+
+
+# ----- ACLs -----
+
+begin acl
+
+check_rcpt:
+ accept verify = recipient/callout
+
+
+# ----- Routers -----
+
+begin routers
+
+r1:
+ driver = accept
+ transport = ${if eq{force}{$domain} {t2}{t1}}
+
+
+# ----- Transports -----
+
+begin transports
+
+t1:
+ driver = smtp
+ hosts = 127.0.0.1
+ port = PORT_S
+ allow_localhost
+ hosts_try_auth = *
+
+t2:
+ driver = smtp
+ hosts = 127.0.0.1
+ port = PORT_S
+ allow_localhost
+ hosts_try_auth = *
+ authenticated_sender= brian
+
+# End
diff --git a/test/scripts/0000-Basic/0568 b/test/scripts/0000-Basic/0568
new file mode 100644
index 000000000..2aa86f45d
--- /dev/null
+++ b/test/scripts/0000-Basic/0568
@@ -0,0 +1,76 @@
+# Recipient callout with AUTH
+need_ipv4
+#
+# Variant 1: using authenticated_sender on the transport.
+server PORT_S 1
+220 Welcome
+EHLO
+250-wotcher mate
+250-AUTH PLAIN
+250 Hi
+AUTH
+250 Oh alright then
+MAIL FROM
+250 OK
+RCPT TO
+250 OK
+QUIT
+250 OK
+****
+exim -odq -bs
+EHLO the.client
+mail from:<>
+RCPT TO:<abc@force>
+quit
+****
+#
+#
+# Variant 2: Passing through an authenticated_sender from the MAIL FROM:
+server PORT_S 1
+220 Welcome
+EHLO
+250-wotcher mate
+250-AUTH PLAIN
+250 Hi
+AUTH
+250 Oh alright then
+MAIL FROM
+250 OK
+RCPT TO
+250 OK
+QUIT
+250 OK
+****
+exim -odq -bs
+EHLO the.client
+AUTH PLAIN AHVzZXJ4AHNlY3JldA==
+mail from:<> AUTH=freddy
+RCPT TO:<abc@normal>
+quit
+****
+#
+#
+# Variant 3: An authenticated_sender option on the transport should override
+# a value set by the MAIL FROM:
+server PORT_S 1
+220 Welcome
+EHLO
+250-wotcher mate
+250-AUTH PLAIN
+250 Hi
+AUTH
+250 Oh alright then
+MAIL FROM
+250 OK
+RCPT TO
+250 OK
+QUIT
+250 OK
+****
+exim -odq -bs
+EHLO the.client
+AUTH PLAIN AHVzZXJ4AHNlY3JldA==
+mail from:<> AUTH=freddy
+RCPT TO:<def@force>
+quit
+****
diff --git a/test/stderr/0398 b/test/stderr/0398
index 4e97f4e00..0ad911345 100644
--- a/test/stderr/0398
+++ b/test/stderr/0398
@@ -129,6 +129,7 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected
127.0.0.1 in hosts_avoid_esmtp? no (option unset)
SMTP>> EHLO mail.test.ex
SMTP<< 250 OK
+127.0.0.1 in hosts_require_auth? no (option unset)
SMTP>> MAIL FROM:<>
SMTP<< 250 OK
SMTP>> RCPT TO:<qq@remote>
diff --git a/test/stderr/0432 b/test/stderr/0432
index 33e1b9892..759c9a819 100644
--- a/test/stderr/0432
+++ b/test/stderr/0432
@@ -92,6 +92,7 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected
127.0.0.1 in hosts_avoid_esmtp? no (option unset)
SMTP>> EHLO myhost.test.ex
SMTP<< 250 OK
+127.0.0.1 in hosts_require_auth? no (option unset)
SMTP>> MAIL FROM:<>
SMTP<< 250 OK
SMTP>> RCPT TO:<x@y>
@@ -246,6 +247,7 @@ MUNGED: ::1 will be omitted in what follows
>>> 127.0.0.1 in hosts_avoid_esmtp? no (option unset)
>>> SMTP>> EHLO myhost.test.ex
>>> SMTP<< 250 OK
+>>> 127.0.0.1 in hosts_require_auth? no (option unset)
>>> SMTP>> MAIL FROM:<>
>>> SMTP<< 250 OK
>>> SMTP>> RCPT TO:<a@b>
diff --git a/test/stderr/5410 b/test/stderr/5410
index f8b31a750..40ef77c4a 100644
--- a/test/stderr/5410
+++ b/test/stderr/5410
@@ -86,6 +86,7 @@ expanding: ${if eq {$address_data}{userz}{*}{:}}
250-8BITMIME
250-PIPELINING
250 HELP
+127.0.0.1 in hosts_require_auth? no (option unset)
SMTP>> MAIL FROM:<CALLER@myhost.test.ex>
SMTP<< 250 OK
SMTP>> RCPT TO:<userx@domain.com>
@@ -218,6 +219,7 @@ skipping: result is not used
expanding: ${if eq {$address_data}{usery}{*}{:}}
result: *
127.0.0.1 in hosts_avoid_tls? yes (matched "*")
+127.0.0.1 in hosts_require_auth? no (option unset)
SMTP>> MAIL FROM:<CALLER@myhost.test.ex>
SMTP<< 250 OK
SMTP>> RCPT TO:<usery@domain.com>
@@ -350,6 +352,7 @@ skipping: result is not used
expanding: ${if eq {$address_data}{usery}{*}{:}}
result: *
127.0.0.1 in hosts_avoid_tls? yes (matched "*")
+127.0.0.1 in hosts_require_auth? no (option unset)
SMTP>> MAIL FROM:<CALLER@myhost.test.ex>
SMTP<< 250 OK
SMTP>> RCPT TO:<usery@domain.com>
diff --git a/test/stderr/5420 b/test/stderr/5420
index e711184f5..1e4de9688 100644
--- a/test/stderr/5420
+++ b/test/stderr/5420
@@ -86,6 +86,7 @@ expanding: ${if eq {$address_data}{userz}{*}{:}}
250-8BITMIME
250-PIPELINING
250 HELP
+127.0.0.1 in hosts_require_auth? no (option unset)
SMTP>> MAIL FROM:<CALLER@myhost.test.ex>
SMTP<< 250 OK
SMTP>> RCPT TO:<userx@domain.com>
@@ -218,6 +219,7 @@ skipping: result is not used
expanding: ${if eq {$address_data}{usery}{*}{:}}
result: *
127.0.0.1 in hosts_avoid_tls? yes (matched "*")
+127.0.0.1 in hosts_require_auth? no (option unset)
SMTP>> MAIL FROM:<CALLER@myhost.test.ex>
SMTP<< 250 OK
SMTP>> RCPT TO:<usery@domain.com>
@@ -350,6 +352,7 @@ skipping: result is not used
expanding: ${if eq {$address_data}{usery}{*}{:}}
result: *
127.0.0.1 in hosts_avoid_tls? yes (matched "*")
+127.0.0.1 in hosts_require_auth? no (option unset)
SMTP>> MAIL FROM:<CALLER@myhost.test.ex>
SMTP<< 250 OK
SMTP>> RCPT TO:<usery@domain.com>
diff --git a/test/stdout/0568 b/test/stdout/0568
new file mode 100644
index 000000000..671998a86
--- /dev/null
+++ b/test/stdout/0568
@@ -0,0 +1,82 @@
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250-myhost.test.ex Hello CALLER at the.client
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250-AUTH PLAIN
+250 HELP
+250 OK
+250 Accepted
+221 myhost.test.ex closing connection
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250-myhost.test.ex Hello CALLER at the.client
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250-AUTH PLAIN
+250 HELP
+235 Authentication succeeded
+250 OK
+250 Accepted
+221 myhost.test.ex closing connection
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250-myhost.test.ex Hello CALLER at the.client
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250-AUTH PLAIN
+250 HELP
+235 Authentication succeeded
+250 OK
+250 Accepted
+221 myhost.test.ex closing connection
+
+******** SERVER ********
+Listening on port 1224 ...
+Connection request from [127.0.0.1]
+220 Welcome
+EHLO myhost.test.ex
+250-wotcher mate
+250-AUTH PLAIN
+250 Hi
+AUTH PLAIN AHVzZXJ4AHNlY3JldA==
+250 Oh alright then
+MAIL FROM:<> AUTH=brian
+250 OK
+RCPT TO:<abc@force>
+250 OK
+QUIT
+250 OK
+End of script
+Listening on port 1224 ...
+Connection request from [127.0.0.1]
+220 Welcome
+EHLO myhost.test.ex
+250-wotcher mate
+250-AUTH PLAIN
+250 Hi
+AUTH PLAIN AHVzZXJ4AHNlY3JldA==
+250 Oh alright then
+MAIL FROM:<> AUTH=freddy
+250 OK
+RCPT TO:<abc@normal>
+250 OK
+QUIT
+250 OK
+End of script
+Listening on port 1224 ...
+Connection request from [127.0.0.1]
+220 Welcome
+EHLO myhost.test.ex
+250-wotcher mate
+250-AUTH PLAIN
+250 Hi
+AUTH PLAIN AHVzZXJ4AHNlY3JldA==
+250 Oh alright then
+MAIL FROM:<> AUTH=brian
+250 OK
+RCPT TO:<def@force>
+250 OK
+QUIT
+250 OK
+End of script