Django

Code

Ticket #9488 (closed: wontfix)

Opened 8 months ago

Last modified 4 months ago

Add setting to force plain SMTP authentication

Reported by: jdemoor Assigned to: nobody
Milestone: Component: django.core.mail
Version: 1.0 Keywords: authentication email smtp
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

A wrongly configured SMTP server that requires authentication can advertise CRAM-MD5 as an accepted authentication method but fail when the client tries to use it. Most email clients would try other methods after the failure, but Python's smtplib just raises SMTPAuthException. This makes sending emails from Django with such servers impossible.

The attached patch adds the EMAIL_FORCE_PLAIN_AUTH setting which, if True, forces the use of the PLAIN method in django.core.mail.SMTPConnection.open().

Attachments

plain_auth.diff (2.2 kB) - added by jdemoor on 10/31/08 13:22:57.

Change History

10/31/08 13:22:57 changed by jdemoor

  • attachment plain_auth.diff added.

02/26/09 14:43:20 changed by jacob

  • status changed from new to closed.
  • needs_better_patch changed.
  • resolution set to wontfix.
  • needs_tests changed.
  • needs_docs changed.

I don't like adding more code to Django just to work around other broken behavior; we can't be responsible for all the problems in other people's code. In this case, we're talking *both* a misconfigured SMTP server *and* a problem with smtplib.


Add/Change #9488 (Add setting to force plain SMTP authentication)




Change Properties
Action