Scott Gifford wrote:
It looks like Google's STARTTLS command requires an EHLO to be sent first, which is a someqhat unusual requirement. I don't think stunnel does that. Port 465 will start talking SSL directly, without requiring SMTP commands first.
I've just checked the source code of stunnel-4.26 and it does send EHLO - unfortunately it sends "EHLO localhost"
I bet Gmail is rejecting that connection as "localhost" isn't a valid hostname. I think it should use the current hostname instead - that would tend to be more valid, and if not, is fixable by the host owner.