[ Bcc'd to a contact Microsoft, who should be able to help get the
  issue addressed on that end at some point. The problem is a TLS
  stack at outlook.com that is poorly suited to opportunistic TLS.
  However, it is possible to work around this in Postfix, mostly
  by sticking to default settings, plus some care in one's own
  certificate chain configuration. ]

On Fri, Jul 24, 2015 at 10:20:49AM +0200, Moritz Schmitt wrote:

> My server serving.schmi.tt is experiencing problems with mails coming in
> from outlook.com. This is what I found in my logs (many times actually):
> 
> -----
> Jul 24 09:28:16 serving postfix/smtpd[4577]: initializing the server-side TLS 
> engine
> Jul 24 09:28:16 serving postfix/smtpd[4577]: connect from 
> mail-am1on0067.outbound.protection.outlook.com[157.56.112.67]
> Jul 24 09:28:16 serving postfix/smtpd[4577]: setting up TLS connection from 
> mail-am1on0067.outbound.protection.outlook.com[157.56.112.67]
> Jul 24 09:28:16 serving postfix/smtpd[4577]: 
> mail-am1on0067.outbound.protection.outlook.com[157.56.112.67]: TLS cipher 
> list "aNULL:-aNULL:ALL:+RC4:@STRENGTH"
> Jul 24 09:28:16 serving postfix/smtpd[4577]: SSL_accept:before/accept 
> initialization
> Jul 24 09:28:16 serving postfix/smtpd[4577]: SSL_accept:SSLv3 read client 
> hello A
> Jul 24 09:28:16 serving postfix/smtpd[4577]: SSL_accept:SSLv3 write server 
> hello A
> Jul 24 09:28:16 serving postfix/smtpd[4577]: SSL_accept:SSLv3 write 
> certificate A
> Jul 24 09:28:16 serving postfix/smtpd[4577]: SSL_accept:SSLv3 write key 
> exchange A
> Jul 24 09:28:16 serving postfix/smtpd[4577]: SSL_accept:SSLv3 write server 
> done A
> Jul 24 09:28:16 serving postfix/smtpd[4577]: SSL_accept:SSLv3 flush data
> Jul 24 09:28:16 serving postfix/smtpd[4577]: SSL_accept:failed in SSLv3 read 
> client certificate A
> Jul 24 09:28:16 serving postfix/smtpd[4577]: SSL_accept error from 
> mail-am1on0067.outbound.protection.outlook.com[157.56.112.67]: lost connection

This is closely related to:

    http://thread.gmane.org/gmane.mail.postfix.user/250484/focus=250556

your server certificate chain is:

    $ (sleep 2; printf "quit\r\n") |
        openssl s_client -showcerts -starttls smtp -connect serving.schmi.tt:25 
2>&1 |
        openssl crl2pkcs7 -nocrl -certfile /dev/stdin |
        openssl pkcs7 -print_certs -noout
    subject=/CN=serving.schmi.tt
    issuer=/O=Root CA/OU=http://www.cacert.org/CN=CA Cert Signing 
Authority/emailAddress=supp...@cacert.org

    subject=/O=Root CA/OU=http://www.cacert.org/CN=CA Cert Signing 
Authority/emailAddress=supp...@cacert.org
    issuer=/O=Root CA/OU=http://www.cacert.org/CN=CA Cert Signing 
Authority/emailAddress=supp...@cacert.org

The root CA in question is using MD5 (this SHOULD be harmless) for
its self-signature, but the outlook.com SMTP servers are allergic
to MD5, even in self-signed root certificates.  To avoid the
interoperability problem:

        1.  Set:

                # Don't let OpenSSL augment your server certificate chain
                # with "missing" certificates.  Instead, place just the required
                # certificates in smtpd_tls_cert_file.
                #
                smtpd_tls_CAfile = 
                smtpd_tls_CApath = 
                smtpd_tls_ask_ccert = no

                # With the problem solved, a less verbose log level is saner!
                smtpd_tls_loglevel = 1

        2.  The certificate chain file configured via smtpd_tls_cert_file
            MUST NOT contain the "CA Cert" root certificate, delete
            that certificate from the file it if is present.  The
            file should have only the content below my signature
            (the leaf certificate, and not the issuing root
            certificate).

Once that's done, Microsoft will be able to send you email.

-- 
        Viktor.

subject: /CN=serving.schmi.tt
issuer: /O=Root CA/OU=http://www.cacert.org/CN=CA Cert Signing 
Authority/emailAddress=supp...@cacert.org
-----BEGIN CERTIFICATE-----
MIIGDjCCA/agAwIBAgIDEMoeMA0GCSqGSIb3DQEBCwUAMHkxEDAOBgNVBAoTB1Jv
b3QgQ0ExHjAcBgNVBAsTFWh0dHA6Ly93d3cuY2FjZXJ0Lm9yZzEiMCAGA1UEAxMZ
Q0EgQ2VydCBTaWduaW5nIEF1dGhvcml0eTEhMB8GCSqGSIb3DQEJARYSc3VwcG9y
dEBjYWNlcnQub3JnMB4XDTE1MDYxNTIyNTEyNloXDTE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