[Twisted-Python] SMTP authentication

Itamar Turner-Trauring itamar at futurefoundries.com
Tue Jul 24 10:40:46 EDT 2012

On Tue, Jul 24, 2012 at 10:16 AM, Sarah Addis <sarahaddis3 at gmail.com> wrote:

> Ok.. so I have found this piece of code in my smtp.py file:
>     def _registerAuthenticators(self):
>         # Register Authenticator in order from most secure to least secure
> self.registerAuthenticator(CramMD5ClientAuthenticator(self.username))
>         self.registerAuthenticator(LOGINAuthenticator(self.username))
>         self.registerAuthenticator(PLAINAuthenticator(self.username))
> so if I switch the order around to put PLAINAuthenticator first will this
> hopefully work?

Yes, or just remove CRAMMD5 altogether. Unfortunately, this involves a
bunch of copy/pasting to recreate sendmail() or ESMTPSenderFactory with an
ESMTPClient that doesn't have that line, or editing Twisted code, but it
should solve it hopefully.

The fix Phil suggested (falling back if CRAM-MD5 fails) would solve this
long term, as would some way to specify which authenticators you want as
part of the high-level sendmail() API.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20120724/1fd04060/attachment.htm 

More information about the Twisted-Python mailing list