diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2019-10-03 20:57:40 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2019-10-04 10:26:36 +0100 |
commit | 8e78571a8b7a823a439710720a407820ab662451 (patch) | |
tree | 0a89cb53a03dd035001ee8c38af065731d057f15 /test | |
parent | 2f6c7b1aa0bf4a675d0ec95646b27f5c71bf06c2 (diff) |
Events: Add smtp:ehlo event
Diffstat (limited to 'test')
-rw-r--r-- | test/aux-fixed/event-logger-acl | 12 | ||||
-rw-r--r-- | test/confs/5710 | 2 | ||||
-rw-r--r-- | test/confs/5720 | 2 | ||||
-rw-r--r-- | test/log/5700 | 12 | ||||
-rw-r--r-- | test/log/5702 | 3 | ||||
-rw-r--r-- | test/log/5703 | 3 | ||||
-rw-r--r-- | test/log/5710 | 4 | ||||
-rw-r--r-- | test/log/5720 | 4 |
8 files changed, 40 insertions, 2 deletions
diff --git a/test/aux-fixed/event-logger-acl b/test/aux-fixed/event-logger-acl index 62cba32d6..980d47f11 100644 --- a/test/aux-fixed/event-logger-acl +++ b/test/aux-fixed/event-logger-acl @@ -4,13 +4,17 @@ ev_tcp: accept condition = ${if eq {$event_name}{tcp:close}} logwrite = . [$sending_ip_address] -> \ [$host_address]:$host_port - accept + accept logwrite = UNEXPECTED $event_name ev_smtp: - accept + warn logwrite = . [$sending_ip_address] -> \ [$host_address]:$host_port + accept condition = ${if eq {$event_name}{smtp:connect}} logwrite = . banner <$event_data> + accept condition = ${if eq {$event_name}{smtp:ehlo}} + logwrite = . ehlo-resp <$event_data> + accept logwrite = UNEXPECTED $event_name ev_msg_fail: accept condition = ${if eq {$event_name}{msg:fail:delivery}} @@ -64,6 +68,9 @@ ev_msg: "err <$event_defer_errno>:<$acl_m_ev_lkup:$acl_m_ev_code> \ errstr <$event_data>" + accept condition = ${if eq {$event_name}{msg:rcpt:host:defer}} + accept logwrite = UNEXPECTED $event_name + logger: warn logwrite = event $event_name accept condition = ${if eq {tcp} {${listextract{1}{$event_name}}}} @@ -72,3 +79,4 @@ logger: acl = ev_smtp accept condition = ${if eq {msg} {${listextract{1}{$event_name}}}} acl = ev_msg + accept logwrite = UNEXPECTED $event_name diff --git a/test/confs/5710 b/test/confs/5710 index e61fadc5e..6ab64f4ec 100644 --- a/test/confs/5710 +++ b/test/confs/5710 @@ -69,6 +69,8 @@ logger: acl = ev_msg $event_name $acl_arg2 accept condition = ${if eq {tls} {${listextract{1}{$event_name}}}} message = ${acl {ev_tls}} + accept condition = ${if eq {smtp:ehlo}{$event_name}} + logwrite = $tls_out_cipher smtp:ehlo $event_data accept # ----- Routers ----- diff --git a/test/confs/5720 b/test/confs/5720 index 2de47bd82..030434973 100644 --- a/test/confs/5720 +++ b/test/confs/5720 @@ -69,6 +69,8 @@ logger: acl = ev_msg $event_name $acl_arg2 accept condition = ${if eq {tls} {${listextract{1}{$event_name}}}} message = ${acl {ev_tls}} + accept condition = ${if eq {smtp:ehlo}{$event_name}} + logwrite = $tls_out_cipher smtp:ehlo $event_data accept # ----- Routers ----- diff --git a/test/log/5700 b/test/log/5700 index 7f810e438..d50c67cd1 100644 --- a/test/log/5700 +++ b/test/log/5700 @@ -5,6 +5,9 @@ 1999-03-02 09:44:33 10HmaY-0005vi-00 event smtp:connect 1999-03-02 09:44:33 10HmaY-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:PORT_S 1999-03-02 09:44:33 10HmaY-0005vi-00 . banner <220 ESMTP> +1999-03-02 09:44:33 10HmaY-0005vi-00 event smtp:ehlo +1999-03-02 09:44:33 10HmaY-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:PORT_S +1999-03-02 09:44:33 10HmaY-0005vi-00 . ehlo-resp <250-OK\n250 HELP> 1999-03-02 09:44:33 10HmaY-0005vi-00 event tcp:close 1999-03-02 09:44:33 10HmaY-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:PORT_S 1999-03-02 09:44:33 10HmaY-0005vi-00 => userx@domain1 R=others T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK" @@ -21,6 +24,9 @@ 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> 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 => userx@expansionfail R=others T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK" @@ -57,6 +63,9 @@ 1999-03-02 09:44:33 10HmbA-0005vi-00 event smtp:connect 1999-03-02 09:44:33 10HmbA-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:PORT_S 1999-03-02 09:44:33 10HmbA-0005vi-00 . banner <220 ESMTP> +1999-03-02 09:44:33 10HmbA-0005vi-00 event smtp:ehlo +1999-03-02 09:44:33 10HmbA-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:PORT_S +1999-03-02 09:44:33 10HmbA-0005vi-00 . ehlo-resp <250-OK\n250 HELP> 1999-03-02 09:44:33 10HmbA-0005vi-00 event msg:rcpt:host:defer 1999-03-02 09:44:33 10HmbA-0005vi-00 event msg:rcpt:defer 1999-03-02 09:44:33 10HmbA-0005vi-00 . rcpt deferral ip <127.0.0.1> port <1224> fqdn <127.0.0.1> local_part <userx> domain <domain1> err <12865>:<A:450> errstr <SMTP error from remote mail server after RCPT TO:<userx@domain1>: 450 NOT RIGHT NOW> router <others> transport <smtp> @@ -78,6 +87,9 @@ 1999-03-02 09:44:33 10HmbB-0005vi-00 event smtp:connect 1999-03-02 09:44:33 10HmbB-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:PORT_S 1999-03-02 09:44:33 10HmbB-0005vi-00 . banner <220 ESMTP> +1999-03-02 09:44:33 10HmbB-0005vi-00 event smtp:ehlo +1999-03-02 09:44:33 10HmbB-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:PORT_S +1999-03-02 09:44:33 10HmbB-0005vi-00 . ehlo-resp <250-OK\n250 HELP> 1999-03-02 09:44:33 10HmbB-0005vi-00 event tcp:close 1999-03-02 09:44:33 10HmbB-0005vi-00 . [127.0.0.1] -> [127.0.0.1]:PORT_S 1999-03-02 09:44:33 10HmbB-0005vi-00 ** userx@domain1 R=others T=smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:<userx@domain1>: 550 GO AWAY diff --git a/test/log/5702 b/test/log/5702 index 45f517bf5..5d494eee0 100644 --- a/test/log/5702 +++ b/test/log/5702 @@ -5,6 +5,9 @@ 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> 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 => userx@domain1 R=route_smtp T=smtp H=127.0.0.1 [127.0.0.1] C="250 OK" diff --git a/test/log/5703 b/test/log/5703 index 0ce0f133f..ac98fc9d9 100644 --- a/test/log/5703 +++ b/test/log/5703 @@ -5,6 +5,9 @@ 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> 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:fail:delivery diff --git a/test/log/5710 b/test/log/5710 index 4c92928b9..72bba14e6 100644 --- a/test/log/5710 +++ b/test/log/5710 @@ -1,6 +1,7 @@ 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 10HmaY-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss 1999-03-02 09:44:33 Start queue run: pid=pppp -qf +1999-03-02 09:44:33 10HmaX-0005vi-00 smtp:ehlo 250-myhost.test.ex Hello localhost [127.0.0.1]\n250-SIZE 52428800\n250-8BITMIME\n250-PIPELINING\n250-STARTTLS\n250 HELP 1999-03-02 09:44:33 10HmaX-0005vi-00 tls:cert depth=0 <CN=server1.example.com> 1999-03-02 09:44:33 10HmaX-0005vi-00 msg:host:defer bad 1999-03-02 09:44:33 10HmaX-0005vi-00 NO CLIENT CERT presented @@ -17,12 +18,15 @@ 1999-03-02 09:44:33 10HmaX-0005vi-00 SAN <DNS=alternatename.server1.example.com\nDNS=alternatename2.server1.example.com\nDNS=*.test.ex\nDNS=server1.example.com> 1999-03-02 09:44:33 10HmaX-0005vi-00 CRU <http://crl.example.com/latest.crl> 1999-03-02 09:44:33 10HmaX-0005vi-00 TLS session: (certificate verification failed): certificate invalid: delivering unencrypted to H=127.0.0.1 [127.0.0.1] (not in hosts_require_tls) +1999-03-02 09:44:33 10HmaX-0005vi-00 smtp:ehlo 250-myhost.test.ex Hello localhost [127.0.0.1]\n250-SIZE 52428800\n250-8BITMIME\n250-PIPELINING\n250-STARTTLS\n250 HELP 1999-03-02 09:44:33 10HmaX-0005vi-00 => bad@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1] C="250 OK id=10HmaZ-0005vi-00" 1999-03-02 09:44:33 10HmaX-0005vi-00 msg:delivery bad 1999-03-02 09:44:33 10HmaX-0005vi-00 NO CLIENT CERT presented 1999-03-02 09:44:33 10HmaX-0005vi-00 No Peer cert 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed +1999-03-02 09:44:33 10HmaY-0005vi-00 smtp:ehlo 250-myhost.test.ex Hello localhost [127.0.0.1]\n250-SIZE 52428800\n250-8BITMIME\n250-PIPELINING\n250-STARTTLS\n250 HELP 1999-03-02 09:44:33 10HmaY-0005vi-00 tls:cert depth=0 <CN=server1.example.com> +1999-03-02 09:44:33 10HmaY-0005vi-00 TLS1.x:ke-RSA-AES256-SHAnnn:xxx smtp:ehlo 250-myhost.test.ex Hello localhost [127.0.0.1]\n250-SIZE 52428800\n250-8BITMIME\n250-PIPELINING\n250 HELP 1999-03-02 09:44:33 10HmaY-0005vi-00 => good@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes DN="CN=server1.example.com" C="250 OK id=10HmbA-0005vi-00" 1999-03-02 09:44:33 10HmaY-0005vi-00 msg:delivery good 1999-03-02 09:44:33 10HmaY-0005vi-00 Our cert SN: CN=server2.example.com diff --git a/test/log/5720 b/test/log/5720 index 154d09d64..066f7fb35 100644 --- a/test/log/5720 +++ b/test/log/5720 @@ -1,6 +1,7 @@ 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 10HmaY-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss 1999-03-02 09:44:33 Start queue run: pid=pppp -qf +1999-03-02 09:44:33 10HmaX-0005vi-00 smtp:ehlo 250-myhost.test.ex Hello localhost [127.0.0.1]\n250-SIZE 52428800\n250-8BITMIME\n250-PIPELINING\n250-STARTTLS\n250 HELP 1999-03-02 09:44:33 10HmaX-0005vi-00 [127.0.0.1] SSL verify error: depth=2 error=self signed certificate in certificate chain cert=/O=example.com/CN=clica CA rsa 1999-03-02 09:44:33 10HmaX-0005vi-00 msg:host:defer bad 1999-03-02 09:44:33 10HmaX-0005vi-00 NO CLIENT CERT presented @@ -18,14 +19,17 @@ 1999-03-02 09:44:33 10HmaX-0005vi-00 (no OCU) 1999-03-02 09:44:33 10HmaX-0005vi-00 (no CRU) 1999-03-02 09:44:33 10HmaX-0005vi-00 TLS session: (SSL_connect): error: <<detail omitted>> +1999-03-02 09:44:33 10HmaX-0005vi-00 smtp:ehlo 250-myhost.test.ex Hello localhost [127.0.0.1]\n250-SIZE 52428800\n250-8BITMIME\n250-PIPELINING\n250-STARTTLS\n250 HELP 1999-03-02 09:44:33 10HmaX-0005vi-00 => bad@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1] C="250 OK id=10HmaZ-0005vi-00" 1999-03-02 09:44:33 10HmaX-0005vi-00 msg:delivery bad 1999-03-02 09:44:33 10HmaX-0005vi-00 NO CLIENT CERT presented 1999-03-02 09:44:33 10HmaX-0005vi-00 No Peer cert 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed +1999-03-02 09:44:33 10HmaY-0005vi-00 smtp:ehlo 250-myhost.test.ex Hello localhost [127.0.0.1]\n250-SIZE 52428800\n250-8BITMIME\n250-PIPELINING\n250-STARTTLS\n250 HELP 1999-03-02 09:44:33 10HmaY-0005vi-00 tls:cert depth=2 <CN=clica CA rsa,O=example.com> 1999-03-02 09:44:33 10HmaY-0005vi-00 tls:cert depth=1 <CN=clica Signing Cert rsa,O=example.com> 1999-03-02 09:44:33 10HmaY-0005vi-00 tls:cert depth=0 <CN=server1.example.com> +1999-03-02 09:44:33 10HmaY-0005vi-00 TLS1.x:ke-RSA-AES256-SHAnnn:xxx smtp:ehlo 250-myhost.test.ex Hello localhost [127.0.0.1]\n250-SIZE 52428800\n250-8BITMIME\n250-PIPELINING\n250 HELP 1999-03-02 09:44:33 10HmaY-0005vi-00 => good@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1] X=TLS1.x:ke-RSA-AES256-SHAnnn:xxx CV=yes DN="/CN=server1.example.com" C="250 OK id=10HmbA-0005vi-00" 1999-03-02 09:44:33 10HmaY-0005vi-00 msg:delivery good 1999-03-02 09:44:33 10HmaY-0005vi-00 Our cert SN: CN=server2.example.com |