diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/aux-fixed/event-logger-acl | 21 | ||||
-rw-r--r-- | test/confs/3418 | 38 | ||||
-rw-r--r-- | test/log/3418 | 6 | ||||
-rw-r--r-- | test/rejectlog/3418 | 2 | ||||
-rw-r--r-- | test/scripts/3418-plaintext-event/3418 | 17 | ||||
-rw-r--r-- | test/scripts/3418-plaintext-event/REQUIRES | 2 | ||||
-rw-r--r-- | test/stdout/3418 | 18 |
7 files changed, 97 insertions, 7 deletions
diff --git a/test/aux-fixed/event-logger-acl b/test/aux-fixed/event-logger-acl index 15321724e..cc18c0692 100644 --- a/test/aux-fixed/event-logger-acl +++ b/test/aux-fixed/event-logger-acl @@ -75,12 +75,19 @@ ev_msg: accept condition = ${if eq {$event_name}{msg:rcpt:host:defer}} accept logwrite = UNEXPECTED $event_name +ev_auth: + accept condition = ${if eq {$event_name}{auth:fail}} + logwrite = . \ + "auth fail" \ + event_data <$event_data> \ + sender_host_authenticated <$sender_host_authenticated> \ + authenticated_fail_id <$authenticated_fail_id> + + accept logwrite = UNEXPECTED $event_name + logger: warn logwrite = event $event_name - accept condition = ${if eq {tcp} {${listextract{1}{$event_name}}}} - acl = ev_tcp - accept condition = ${if eq {smtp} {${listextract{1}{$event_name}}}} - acl = ev_smtp - accept condition = ${if eq {msg} {${listextract{1}{$event_name}}}} - acl = ev_msg - accept logwrite = UNEXPECTED $event_name + set acl_m1 = ${listextract{1}{$event_name}} + accept condition = ${if !inlist{$acl_m1}{tcp:smtp:msg:auth}} + logwrite = UNEXPECTED $event_name + accept acl = ev_$acl_m1 diff --git a/test/confs/3418 b/test/confs/3418 new file mode 100644 index 000000000..42413b4e4 --- /dev/null +++ b/test/confs/3418 @@ -0,0 +1,38 @@ +# Exim test configuration 3418 + +.include DIR/aux-var/std_conf_prefix + +primary_hostname = myhost.test.ex + +# ----- Main settings ----- + +domainlist local_domains = test.ex : *.test.ex + +auth_advertise_hosts = 10.0.0.5 +trusted_users = CALLER + +event_action = ${acl {logger}} + +# ----- ACL ----- + +begin acl + +.include DIR/aux-fixed/event-logger-acl + + + +# ----- Authentication ----- + +begin authenticators + +testname: + driver = plaintext + public_name = mylogin + server_debug_print = +++MYLOGIN \$1="$1" \$2=\"$2" \$3="$3" + server_condition = "\ + ${if match{$1}{^(\\\\S+)\\\\s+(\\\\S+)\\$}\ + {${if and {{eq{$1}{userx}}{eq{$2}{secret}}}{yes}{no}}}{no}}" + server_set_id = $auth1 + + +# End diff --git a/test/log/3418 b/test/log/3418 new file mode 100644 index 000000000..2de0ec655 --- /dev/null +++ b/test/log/3418 @@ -0,0 +1,6 @@ +1999-03-02 09:44:33 testname authenticator failed for (testing.testing) [10.0.0.5] U=CALLER: 535 Incorrect authentication data (set_id=rx secret) +1999-03-02 09:44:33 event auth:fail +1999-03-02 09:44:33 . "auth fail" event_data <535 Incorrect authentication data> sender_host_authenticated <testname> authenticated_fail_id < (set_id=rx secret)> +1999-03-02 09:44:33 testname authenticator failed for (testing.testing) [10.0.0.5] U=CALLER: 501 Invalid base64 data +1999-03-02 09:44:33 event auth:fail +1999-03-02 09:44:33 . "auth fail" event_data <501 Invalid base64 data> sender_host_authenticated <testname> authenticated_fail_id <> diff --git a/test/rejectlog/3418 b/test/rejectlog/3418 new file mode 100644 index 000000000..dca36042e --- /dev/null +++ b/test/rejectlog/3418 @@ -0,0 +1,2 @@ +1999-03-02 09:44:33 testname authenticator failed for (testing.testing) [10.0.0.5] U=CALLER: 535 Incorrect authentication data (set_id=rx secret) +1999-03-02 09:44:33 testname authenticator failed for (testing.testing) [10.0.0.5] U=CALLER: 501 Invalid base64 data diff --git a/test/scripts/3418-plaintext-event/3418 b/test/scripts/3418-plaintext-event/3418 new file mode 100644 index 000000000..2df7dd3ce --- /dev/null +++ b/test/scripts/3418-plaintext-event/3418 @@ -0,0 +1,17 @@ +# plaintext server fail event +# +# Incorrect auth +exim -odi -bs -oMa 10.0.0.5 +ehlo testing.testing +auth mylogin cnggc2VjcmV0 +quit +**** +# +# Bad base64 +exim -odi -bs -oMa 10.0.0.5 +ehlo testing.testing +auth mylogin XNlcnggc2VjcmV0 +quit +**** +# +no_msglog_check diff --git a/test/scripts/3418-plaintext-event/REQUIRES b/test/scripts/3418-plaintext-event/REQUIRES new file mode 100644 index 000000000..2c5eb3f1c --- /dev/null +++ b/test/scripts/3418-plaintext-event/REQUIRES @@ -0,0 +1,2 @@ +authenticator plaintext +support Event diff --git a/test/stdout/3418 b/test/stdout/3418 new file mode 100644 index 000000000..0ed179c33 --- /dev/null +++ b/test/stdout/3418 @@ -0,0 +1,18 @@ +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250-myhost.test.ex Hello CALLER at testing.testing [10.0.0.5]
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250-AUTH MYLOGIN
+250 HELP
+535 Incorrect authentication data
+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 testing.testing [10.0.0.5]
+250-SIZE 52428800
+250-8BITMIME
+250-PIPELINING
+250-AUTH MYLOGIN
+250 HELP
+501 Invalid base64 data
+221 myhost.test.ex closing connection
|