[RFC] Add extra ehlo() and starttls() for gmail smtp
Harald Meland
harald.meland at usit.uio.no
Wed Sep 5 18:26:34 BST 2007
[Aaron Bentley]
> Harald Meland wrote:
>> [Keir Mierle]
>> An SMTP client shouldn't try to do STARTTLS until after EHLO has
>> succeeded (and indicated that STARTTLS indeed is among the extensions
>> that the server supports). The client should also fall back to HELO
>> if EHLO fails, and verify whether HELO fails.
>
> This looks like a nice improvement. There's just one thing I wonder about:
>
>> + (code, message) = self._connection.starttls()
>> + if (200 <= code <= 299):
>
> This seems to mean that if starttls fails, we'll use unencrypted
> SMTP.
Well, we will at least *try* to use unencrypted SMTP. :-)
> I'm not sure whether we should fail in this situation, give a
> warning, or silently continue.
Hmmm. Maybe a separate config setting, e.g.
smtp_tls = required | preferred | off
?
A somewhat related question is whether we ought to support SSL
(typically found on port 465), and not just STARTTLS-initiated TLS
(typically found on port 25 and/or 587).
> It seems like if people expect their privacy to be protected and
> it's not, that's a violation of trust. But OTOH, I don't know
> whether people would expect privacy here.
I used "smtp_server = smtp.gmail.com:587" when testing this change,
and as I know that that SMTP server won't allow SMTP AUTH until after
STARTTLS has succeeded, I wouldn't want Bazaar to spew my credentials
over an unencrypted connection just to see the server reject the
authentication attempt.
However, for servers that allow SMTP AUTH pre-STARTTLS, the issue
isn't as clear-cut.
--
Harald
More information about the bazaar
mailing list