diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/aux-fixed/event-logger-acl | 6 | ||||
-rw-r--r-- | test/confs/3418 | 8 | ||||
-rw-r--r-- | test/confs/3419 | 65 | ||||
-rw-r--r-- | test/log/3418 | 4 | ||||
-rw-r--r-- | test/log/3419 | 24 | ||||
-rw-r--r-- | test/rejectlog/3418 | 4 | ||||
-rw-r--r-- | test/scripts/3418-plaintext-event/3419 | 21 | ||||
-rw-r--r-- | test/stdout/3419 | 18 |
8 files changed, 142 insertions, 8 deletions
diff --git a/test/aux-fixed/event-logger-acl b/test/aux-fixed/event-logger-acl index cc18c0692..3959304a2 100644 --- a/test/aux-fixed/event-logger-acl +++ b/test/aux-fixed/event-logger-acl @@ -88,6 +88,6 @@ ev_auth: logger: warn logwrite = event $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 + accept condition = ${if inlist{$acl_m1}{tcp:smtp:msg:auth}} + acl = ev_$acl_m1 + accept logwrite = UNEXPECTED $event_name diff --git a/test/confs/3418 b/test/confs/3418 index 42413b4e4..887f2184d 100644 --- a/test/confs/3418 +++ b/test/confs/3418 @@ -11,7 +11,7 @@ domainlist local_domains = test.ex : *.test.ex auth_advertise_hosts = 10.0.0.5 trusted_users = CALLER -event_action = ${acl {logger}} +event_action = ${acl {auth_event}} # ----- ACL ----- @@ -19,6 +19,12 @@ begin acl .include DIR/aux-fixed/event-logger-acl +auth_event: + warn acl = logger + accept condition = ${if eq {$event_name}{auth:fail}} + message = custom-message: $sender_host_authenticated authenticator failed \ + H=$sender_fullhost [$sender_host_address] $event_data $authenticated_fail_id + # ----- Authentication ----- diff --git a/test/confs/3419 b/test/confs/3419 new file mode 100644 index 000000000..b98db16e6 --- /dev/null +++ b/test/confs/3419 @@ -0,0 +1,65 @@ +# Exim test configuration 3419 + +.include DIR/aux-var/std_conf_prefix + +log_selector = +smtp_mailauth +primary_hostname = myhost.test.ex + +# ----- Main settings ----- + +acl_smtp_rcpt = accept + + +# ----- ACL ----- + +begin acl + +.include DIR/aux-fixed/event-logger-acl + +auth_event: + warn acl = logger + accept condition = ${if eq {$event_name}{auth:fail}} + message = custom-message: $sender_host_authenticated authenticator failed H=$host [$host_address] $event_data + +# ----- Authentication ----- + +begin authenticators + +login: + driver = plaintext + public_name = LOGIN + client_send = : userx : secret + client_set_id = userx + +# ----- Routers ----- + +begin routers + +force: + driver = manualroute + route_list = domain.com 127.0.0.1 byname + self = send + transport = smtp_force + errors_to = "" + +# ----- Transports ----- + +begin transports + +smtp_force: + driver = smtp + port = PORT_S + hosts_try_fastopen = : + hosts_require_auth = * + event_action = ${acl {auth_event}} + + +# ----- Retry ----- + + +begin retry + +* auth_failed +* * F,1h,10m + +# End diff --git a/test/log/3418 b/test/log/3418 index 2de0ec655..5f817f43d 100644 --- a/test/log/3418 +++ b/test/log/3418 @@ -1,6 +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 custom-message: testname authenticator failed H=(testing.testing) [10.0.0.5] [10.0.0.5] 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 <501 Invalid base64 data> sender_host_authenticated <testname> authenticated_fail_id <> +1999-03-02 09:44:33 custom-message: testname authenticator failed H=(testing.testing) [10.0.0.5] [10.0.0.5] 501 Invalid base64 data diff --git a/test/log/3419 b/test/log/3419 new file mode 100644 index 000000000..5567854d2 --- /dev/null +++ b/test/log/3419 @@ -0,0 +1,24 @@ +1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmaX-0005vi-00 event tcp:connect +1999-03-02 09:44:33 10HmaX-0005vi-00 . [127.0.0.1]:1111 +1999-03-02 09:44:33 10HmaX-0005vi-00 event smtp:connect +1999-03-02 09:44:33 10HmaX-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:PORT_S +1999-03-02 09:44:33 10HmaX-0005vi-00 . banner <220 ESMTP> +1999-03-02 09:44:33 10HmaX-0005vi-00 event smtp:ehlo +1999-03-02 09:44:33 10HmaX-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:PORT_S +1999-03-02 09:44:33 10HmaX-0005vi-00 . ehlo-resp <250-OK\n250-HELP\n250 AUTH LOGIN> +1999-03-02 09:44:33 10HmaX-0005vi-00 event auth:fail +1999-03-02 09:44:33 10HmaX-0005vi-00 . "auth fail" event_data <599 no way, man> sender_host_authenticated <login> authenticated_fail_id <> +1999-03-02 09:44:33 10HmaX-0005vi-00 custom-message: login authenticator failed H=127.0.0.1 [127.0.0.1] 599 no way, man +1999-03-02 09:44:33 10HmaX-0005vi-00 event tcp:close +1999-03-02 09:44:33 10HmaX-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:PORT_S +1999-03-02 09:44:33 10HmaX-0005vi-00 event msg:host:defer +1999-03-02 09:44:33 10HmaX-0005vi-00 . host deferral ip <127.0.0.1> port <1224> fqdn <127.0.0.1> local_part <userx> domain <domain.com> errno <-42> errstr <authentication required but authentication attempt(s) failed> router <force> transport <smtp_force> +1999-03-02 09:44:33 10HmaX-0005vi-00 event msg:defer +1999-03-02 09:44:33 10HmaX-0005vi-00 . message deferral ip <127.0.0.1> port <1224> fqdn <127.0.0.1> local_part <userx> domain <domain.com> errno <-42> errstr <authentication required but authentication attempt(s) failed> router <force> transport <smtp_force> +1999-03-02 09:44:33 10HmaX-0005vi-00 == userx@domain.com R=force T=smtp_force defer (-42): authentication required but authentication attempt(s) failed +1999-03-02 09:44:33 10HmaX-0005vi-00 ** userx@domain.com: retry timeout exceeded +1999-03-02 09:44:33 10HmaX-0005vi-00 event msg:fail:delivery +1999-03-02 09:44:33 10HmaX-0005vi-00 . refused by fdqn <> local_part <userx> domain <domain.com> errstr <authentication required but authentication attempt(s) failed: retry timeout exceeded> +1999-03-02 09:44:33 10HmaX-0005vi-00 userx@domain.com: error ignored +1999-03-02 09:44:33 10HmaX-0005vi-00 Completed diff --git a/test/rejectlog/3418 b/test/rejectlog/3418 index dca36042e..53ca36096 100644 --- a/test/rejectlog/3418 +++ b/test/rejectlog/3418 @@ -1,2 +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 +1999-03-02 09:44:33 custom-message: testname authenticator failed H=(testing.testing) [10.0.0.5] [10.0.0.5] 535 Incorrect authentication data (set_id=rx secret) +1999-03-02 09:44:33 custom-message: testname authenticator failed H=(testing.testing) [10.0.0.5] [10.0.0.5] 501 Invalid base64 data diff --git a/test/scripts/3418-plaintext-event/3419 b/test/scripts/3418-plaintext-event/3419 new file mode 100644 index 000000000..6f4594382 --- /dev/null +++ b/test/scripts/3418-plaintext-event/3419 @@ -0,0 +1,21 @@ +# plaintext client fail event +need_ipv4 +# +server PORT_S +220 ESMTP +EHLO +250-OK +250-HELP +250 AUTH LOGIN +AUTH LOGIN +334 VXNlciBOYW1l +dXNlcng +334 UGFzc3dvcmQ= +c2VjcmV0 +599 no way, man +QUIT +250 OK +**** +exim -odi userx@domain.com +. +no_msglog_check diff --git a/test/stdout/3419 b/test/stdout/3419 new file mode 100644 index 000000000..a0c8deb59 --- /dev/null +++ b/test/stdout/3419 @@ -0,0 +1,18 @@ + +******** SERVER ******** +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 ESMTP +EHLO myhost.test.ex +250-OK +250-HELP +250 AUTH LOGIN +AUTH LOGIN +334 VXNlciBOYW1l +dXNlcng= +334 UGFzc3dvcmQ= +c2VjcmV0 +599 no way, man +QUIT +250 OK +End of script |