Problem
Mail sent from gmail to accounts on my mail servers never got through and the sender got an error message saying:
Technical details of permanent failure:
TEMP_FAILURE: The recipient server did not accept our requests to connect. Learn more at http://mail.google.com/support/bin/answer.py?answer=7720
This was a bit confusing as mail from everyone else got through without problems.
Cause
I had to use tcpdump to finally figure out why no mail from gmail was getting through to my mail server.
After trying myself while looking at the actual communication I could see that the connection actually got started correctly but all packets from the Gmail server had a tcp window of 90 bytes and, that if the first packet from my server didn’t include the CRLF (because it was too long) then the next packet from the Gmail server wasn’t an ack, but an rst in response to a resent packet, indicating the Gmail server dropped the connection without closing it, possibly because the connecting process died.
I confirmed the diagnosis by reconfiguring my mail server to start with a shorter greeting after which Gmail got through without any problems.
Note here that a limit of 88 characters for the “220 ” greeting is very far from the 512 bytes RFC2882 requires a standard compliant application to accept, so I’m considering this posting to be a bug report on a problem that’s likely to affect many, but is likely to be hard to solve for most because of the misleading error message.
Solution (temporary)
I reconfigured sendmail on the servers to use a shorter greeting by adding the following line to the .mc file:
define(`confSMTP_LOGIN_MSG', `$j Sendmail $b')
Solution (permanent)
The permanent solution would be to get Google to fix their mail servers, but so far I haven’t been able to figure out how to get in touch with the actual tech people at Gmail.
My mail server is Postfix, how can i solve the problem?
Thanks.