[Dovecot] require SSL certs only for encrypted connections?

Florin Andrei florin at andrei.myip.org
Fri Aug 21 04:30:47 EEST 2009


# 1.1.11: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.28-14-server x86_64 Ubuntu 9.04

Here's the situation:
I have several local clients (Thunderbird) which do not use TLS at all. 
It's plaintext completely, on port 143, because the connection is local 
and there are no unauthorized users on this network (it's a home 
network). I want to keep it that way to keep things simple.

Tools / Account Settings / Server Settings:
Use Secure Connection: Never
Use Secure Authentication: unchecked

Until now, this has worked very well. No problems so far.

But now I am also setting up IMAPS for remote iPhone clients, with 
client/server certificates. This is how I generated the certs:

http://impetus.us/~rjmooney/projects/misc/clientcertauth.html

On the iPhone I uploaded the client.crt file (couldn't import client.p12 
for some reason). For Dovecot I am using ca.crt, server.crt and server.key.

ssl_listen: *:993
ssl_disable: no
ssl_ca_file: /blah/ca.crt
ssl_cert_file: /blah/server.crt
ssl_key_file: /blah/server.key
ssl_key_password:
ssl_parameters_regenerate: 168
ssl_cipher_list: ALL:!LOW:!SSLv2
ssl_cert_username_field: commonName
ssl_verify_client_cert: yes
disable_plaintext_auth: no
auth default:
   mechanisms: plain login
   ssl_require_client_cert: no
   ssl_username_from_cert: no

I analyzed the connection on 993 with Wireshark and apparently all is 
good: it's encrypted, I see the certificate exchanges taking place.

But I am worried about authenticating the connections from the iPhone 
and I would like to configure "ssl_require_client_cert: yes" so that a 
valid certificate is always required. But if I do that then Thunderbird 
fails to login because it's required a certificate.

This is puzzling. I thought that setting would only influence SSL 
connections. But apparently it also affects plaintext logins from 
Thunderbird.

Is there a way to require a cert from the iPhone TLS connections on port 
993, but do not require it from clients connecting to port 143?

-- 
Florin Andrei

http://florin.myip.org/


More information about the dovecot mailing list