Versions (on both hosts): Postfix 2.5.6 Linked against OpenSSL 0.9.8c (debian etch with security-fixes backported) as well as OpenSSL 0.9.8j (makes no difference) Configured with Command: (the OpenSSL 0.9.8j variant, the first one used the openssl installed in /usr/) make makefiles CCARGS='-DHAS_PCRE -DUSE_TLS -I/opt/openssl/include -I/usr/local/include' OPT='-O' DEBUG='' 'AUXLIBS=-L/usr/local/lib -lpcre -L/opt/openssl/lib -lssl -lcrypto -L/usr/local/lib'
Setup: 1. Smarthost with TLS Certificate User auth (for relaying) ("wurzel") 2. Mailrelay (TLS Client) with Client-Certificate authenticating through TLS. (dynamic hosts...) Because the CRLs are not accessible online i put the crl.pem-files into the ssl-subdir together with the certificates and c_rehash symlinked them correctly. Postfix does not access them, however. With my old PKI and certificates (soon to expire!) it worked flawlessly. However it uses potentially insecure algorithms and far too short keysizes (1024). So i just set up a new PKI using the momentarily recommended Algorithms and keysizes (4096 bit RSA, SHA256 digest) as well als the current BCP and RFC recommendations for the Certificates and generated new certificates for both Mailservers, but the mailserver bails out with the folowing error messages. (New PKI structure is: RootCA -signed-> PubCA -signed-> both MTA's certs. Both CA certs are in the respective ssl directories (strace confirmed accessibility) and c_hashed.) I forced IPv4 for sake of log readability. IPv6 connects show the same problem. Using the new certificates on both sides: Feb 7 22:57:31 wurzel postfix/smtpd[28735]: connect from ppp-82-135-84-112.dyna mic.mnet-online.de[82.135.84.112] Feb 7 22:57:31 wurzel postfix/smtpd[28735]: setting up TLS connection from ppp- 82-135-84-112.dynamic.mnet-online.de[82.135.84.112] Feb 7 22:57:31 wurzel postfix/smtpd[28735]: certificate verification failed for ppp-82-135-84-112.dynamic.mnet-online.de[82.135.84.112]: untrusted issuer /C=DE /ST=Bavaria/L=Munich/O=Jor's Net/OU=PKI/CN=Jor's Net Root CA/emailaddress...@jor s.net Feb 7 22:57:31 wurzel postfix/smtpd[28735]: SSL_accept error from ppp-82-135-84 -112.dynamic.mnet-online.de[82.135.84.112]: -1 Feb 7 22:57:31 wurzel postfix/smtpd[28735]: warning: TLS library problem: 28735 :error:0D0C50A1:asn1 encoding routines:ASN1_item_verify:unknown message digest a lgorithm:a_verify.c:146: Feb 7 22:57:31 wurzel postfix/smtpd[28735]: warning: TLS library problem: 28735 :error:0D0C50A1:asn1 encoding routines:ASN1_item_verify:unknown message digest a lgorithm:a_verify.c:146: Feb 7 22:57:31 wurzel postfix/smtpd[28735]: lost connection after STARTTLS from ppp-82-135-84-112.dynamic.mnet-online.de[82.135.84.112] Feb 7 22:57:31 wurzel postfix/smtpd[28735]: disconnect from ppp-82-135-84-112.d ynamic.mnet-online.de[82.135.84.112] Switching back to the old certs (both CA and client/server cert) on both MTAs: Feb 7 22:57:58 wurzel postfix/smtpd[28735]: setting up TLS connection from ppp- 82-135-84-112.dynamic.mnet-online.de[82.135.84.112] Feb 7 22:57:58 wurzel postfix/smtpd[28735]: ppp-82-135-84-112.dynamic.mnet-onli ne.de[82.135.84.112]: Trusted: subject_CN=hal.m.jors.net, issuer=Jors.net CA, fi ngerprint=3A:E2:AF:C5:ED:3E:12:FE:89:B3:6D:66:76:0B:91:78:43:EE:E1:95 Feb 7 22:57:58 wurzel postfix/smtpd[28735]: Trusted TLS connection established from ppp-82-135-84-112.dynamic.mnet-online.de[82.135.84.112]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits) Relevant configuration: (/etc/postfix/ssl is symlinked to /usr/lib/ssl) relay_clientcerts = hash:/etc/postfix/relay_clientcerts smtpd_use_tls = yes smtpd_tls_loglevel = 1 smtpd_tls_ask_ccert = yes smtpd_tls_security_level = may smtpd_tls_auth_only = yes smtpd_tls_received_header = yes smtpd_tls_cert_file = /etc/postfix/ssl/rm.pem smtpd_tls_key_file = $smtpd_tls_cert_file smtpd_tls_CApath = /etc/postfix/ssl/ smtpd_tls_scert_verifydepth = 2 smtpd_tls_exclude_ciphers = aNULL smtpd_tls_mandatory_exclude_ciphers = RC4 smtp_use_tls = yes smtp_tls_enforce_peername = yes smtp_tls_loglevel = 1 smtp_tls_security_level = may smtp_tls_policy_maps = hash:/etc/postfix/tls_policy smtp_tls_note_starttls_offer = yes smtp_tls_cert_file = /etc/postfix/ssl/rm.pem smtp_tls_key_file = $smtp_tls_cert_file smtp_tls_CApath = /etc/postfix/ssl/ smtp_tls_scert_verifydepth = 2 smtp_tls_exclude_ciphers = aNULL smtp_tls_mandatory_exclude_ciphers = RC4 (config is the same on both MTAsl, only the cert_file path points to the correct file of course, which contains both Cert and Key.) On the Client: # cat tls_policy [rm.jors.net] secure ciphers=high match=rm.jors.net:hostname On the Server: # cat tls_policy [hal.m.jors.net] secure ciphers=high match=hal.m.jors.net:hostname [hal.home.jors.net] secure ciphers=high match=hal.m.jors.net:hostname Since the Certfiles are a lot of data, i put them on my Webserver: http://jors.net/postfix/ (in the subdir new/ and old/ respectively). I also tried using a test CA with SHA1 as signature hash Algorithm (with 2048bit RSA keys) and siginign the certs using SHA1 only, but that made no difference (I erased the test CA and certs after the unsucessfull attempts) Systems are of course NTP-time synched, all other use-cases for the new Certificates (HTTPS, 802.1X WPA2 WLAN, S/MIME) work without any Problems. (https://rw.jors.net/, the CRL is not yet online due to DNS glitches) Juergen -- Juergen Meier