[Twisted-Python] SMTP authentication

Sarah Addis sarahaddis3 at gmail.com
Tue Jul 24 08:16:37 MDT 2012


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?

On 24 July 2012 14:54, Phil Mayers <p.mayers at imperial.ac.uk> wrote:

> On 24/07/12 14:29, Itamar Turner-Trauring wrote:
>
> >  3. The SMTP server's CRAM-MD5 implementation is buggy.
>
> If I understand the issue correctly, this is the case. The server
> incorrectly advertises CRAM-MD5, but it never succeeds since the server
> lacks the relevant secret.
>
> Obviously this is bad, but apparently many GUI clients handle such
> broken servers, by falling back to PLAIN auth. I can't say I've ever
> seen it in the wild though.
>
>
> Although I haven't used it in a while, my recollection was that
> Twisted's SMTPClient implementation did a similar thing, and tried the
> auth methods it was supplied "in order".
>
> It may be that the OP is using some wrapper API or local code that is
> mis-using this functionality, or of course that I am mis-remembering it.
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20120724/ba40b8b1/attachment.html>


More information about the Twisted-Python mailing list