On Wed, 2014-05-07 at 03:31:13 +0000, Viktor Dukhovni wrote: > On Tue, May 06, 2014 at 10:49:20PM -0400, Sahil Tandon wrote: > > > We are experiencing a problem that seems to manifest *only* when > > delivering to MXs that exhibit the SSL problem described by Viktor[1] > > AND connection caching is enabled on demand. > > That is when TLS handshakes fail and cleartext connections are made > to deliver the mail. Such connections may be cached.
Right. > Have you tried disabling TLS, but not the demand caching? Not yet, but that is being discussed with the other postmasters; will probably give it a shot in a few hours. > Does the problem *only* lead to erroneous connection re-use via relays > that are the result of a cleartext fallback? I cannot say definitively without more complete log analysis, but that is my hunch. And, the issue does not seem to occur as a result of the initial cleartext fallback, but later ... once on-demand caching has kicked in. > > [...] > > This is 2.12-20140109. > > On what platform (FreeBSD per chance)? Sorry, yes it is FreeBSD 11.0-CURRENT, r265336. > > I am still reviewing the > > logs to understand this, but at first glance, it appears that we try to > > deliver mail to MXs that (in DNS) are not associated with the > > destination domain, e.g.: > > > > May 6 12:00:04 mx2 postfix/smtp[26171]: SSL_connect error to > > iron1-mx.tops.gwu.edu[128.164.127.227]:25: -1 > > May 6 12:00:04 mx2 postfix/smtp[26171]: warning: TLS library problem: > > error:1407741A:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert decode > > > > error:/usr/src/secure/lib/libssl/../../../crypto/openssl/ssl/s23_clnt.c:762: > > May 6 12:00:04 mx2 postfix/smtp[26171]: 4416951CD: Cannot start TLS: > > handshake failure > > ... > > Where are the rest of the logs for smtpd[26171] that show the > retried cleartext delivery? Here are the next two lines logged by that process: May 6 12:00:04 mx2 postfix/smtp[26171]: Host offered STARTTLS: [iron1-mx.tops.gwu.edu] May 6 12:00:05 mx2 postfix/smtp[26171]: 4416951CD: to=<[email protected]>, relay=iron1-mx.tops.gwu.edu[128.164.127.227]:25, delay=3, delays=0.1/1.8/0.64/0.46, dsn=2.0.0, status=sent (250 ok: Message 606874687 accepted) > The metadata for the cached connection from scache(8) indeed seems > inconsistent with the expected request. You may need to enable "-v" > in scache, to observe requests and responses. Hm, OK. > > May 6 10:31:44 mx2 postfix/smtp[6133]: SSL_connect error to > > smtp.citrix.com[66.165.176.89]:25: -1 > > May 6 10:31:44 mx2 postfix/smtp[6133]: warning: TLS library problem: > > error:1407741A:SSL > > routines:SSL23_GET_SERVER_HELLO:tlsv1 alert decode > > > > error:/usr/src/secure/lib/libssl/../../../crypto/openssl/ssl/s23_clnt.c:762: > > May 6 10:31:44 mx2 postfix/smtp[6133]: 59013110C: Cannot start TLS: > > handshake failure > > ... > > Once again, where is the rest of the that delivery? Sure, the next two lines logged by that process: May 6 10:31:45 mx2 postfix/smtp[6133]: Host offered STARTTLS: [smtp.citrix.com] May 6 10:31:46 mx2 postfix/smtp[6133]: 59013110C: to=<[email protected]>, relay=smtp.citrix.com[66.165.176.89]:25, delay=63, delays=0.11/59/1.6/1.4, dsn=2.0.0, status=sent (250 ok: Message 128162365 accepted) > There seems to be corruption in the scache client or server. Hmm. -- Sahil Tandon
