diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2020-01-23 15:29:31 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2020-01-23 16:48:23 +0000 |
commit | 7d2f2d360f5a8ac6e0055074db813c3c3cfbeeb4 (patch) | |
tree | 1b6b968f17c03a8cce44ca7959e33fc521c77c47 /test | |
parent | e4a04f2a8de013abe125d9d04219343b0a32662e (diff) |
Dovecot auth: inet socket. Bug 2280
Diffstat (limited to 'test')
-rw-r--r-- | test/confs/3901 | 67 | ||||
-rw-r--r-- | test/confs/9350 | 2 | ||||
-rw-r--r-- | test/log/3901 | 7 | ||||
-rw-r--r-- | test/scripts/3900-Dovecot/3901 | 38 | ||||
-rw-r--r-- | test/scripts/3900-Dovecot/REQUIRES | 1 |
5 files changed, 114 insertions, 1 deletions
diff --git a/test/confs/3901 b/test/confs/3901 new file mode 100644 index 000000000..5c7e7298a --- /dev/null +++ b/test/confs/3901 @@ -0,0 +1,67 @@ +# Exim test configuration 9351 + +SERVER= + +.include DIR/aux-var/std_conf_prefix + +primary_hostname = myhost.test.ex + +# ----- Main settings ----- + +acl_smtp_rcpt = check_recipient + +tls_certificate = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail} +tls_privatekey = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail} + +tls_verify_hosts = HOSTIPV4 +tls_verify_certificates = ${if eq {SERVER}{server}{DIR/aux-fixed/cert2}fail} + +queue_only + +# ----- ACL ----- + +begin acl + +check_recipient: + deny message = authentication required + !authenticated = * + accept + + +# ----- Route ----- + +begin routers + +all: + driver = accept + transport = server + errors_to = + +begin transports + +server: + driver = smtp + hosts = 127.0.0.1 + allow_localhost + port = PORT_D + hosts_require_auth = * + +# ----- Authentication ----- + +begin authenticators + +dovecot: + driver = dovecot + public_name = PLAIN + server_socket = 127.0.0.1 PORT_S +.ifdef TRUSTED + server_tls = true +.endif + server_set_id = $auth1 + +client: + driver = plaintext + public_name = PLAIN + client_send = ^username^mysecret + +# End diff --git a/test/confs/9350 b/test/confs/9350 index 1ac5ebe5f..290fadc6d 100644 --- a/test/confs/9350 +++ b/test/confs/9350 @@ -1,4 +1,4 @@ -# Exim test configuration 3650 +# Exim test configuration 9350 SERVER= diff --git a/test/log/3901 b/test/log/3901 new file mode 100644 index 000000000..e9cef9837 --- /dev/null +++ b/test/log/3901 @@ -0,0 +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 10HmaX-0005vi-00 => a@test.ex R=all T=server H=127.0.0.1 [127.0.0.1] A=client C="250 OK id=10HmaY-0005vi-00" +1999-03-02 09:44:33 10HmaX-0005vi-00 Completed + +******** SERVER ******** +1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port PORT_D +1999-03-02 09:44:33 10HmaY-0005vi-00 <= <> H=localhost (myhost.test.ex) [127.0.0.1] P=esmtpa A=dovecot:goodman S=sss id=E10HmaX-0005vi-00@myhost.test.ex diff --git a/test/scripts/3900-Dovecot/3901 b/test/scripts/3900-Dovecot/3901 new file mode 100644 index 000000000..1fc50017f --- /dev/null +++ b/test/scripts/3900-Dovecot/3901 @@ -0,0 +1,38 @@ +# dovecot server, inet, PLAIN method +# +# This uses a script emulating dovecot so has potential to be wrong. +# We could do with an independent testcase against a real Dovecot, +# but that needs to be conditioned on finding that on the test +# platform and configuring it to match the testcase. +# See 9350 for a start. +# +exim -bd -DSERVER=server -oX PORT_D +**** +server PORT_S +>LF>VERSION\x091\x090 +>LF>MECH\x09PLAIN +>LF>DONE +<<VERSION\x091\x090 +<CPID +<AUTH\x091\x09PLAIN\x09service=smtp +>LF>OK\x091\x09user=goodman +*eof +**** +# +exim -odi a@test.ex +**** +# +killdaemon +# +#exim -d+all -bd -DSERVER=server -DTRUSTED -oX PORT_D +#**** +#background +#perl -e "system('socat OPENSSL-LISTEN:PORT_S,reuseaddr,fork,cert=DIR/aux-fixed/cert1,verify=0 EXEC:\'/bin/echo VERSION\\t1\\t0\\nAUTH\\t1\\tPLAIN\\tservice=smtp\'');" +#**** +## +#exim -odi a@test.ex +#**** +## +#killdaemon +no_stdout_check +no_msglog_check diff --git a/test/scripts/3900-Dovecot/REQUIRES b/test/scripts/3900-Dovecot/REQUIRES new file mode 100644 index 000000000..575bc6b6b --- /dev/null +++ b/test/scripts/3900-Dovecot/REQUIRES @@ -0,0 +1 @@ +authenticator dovecot |