#30512: Update mail backend to use modern standard library parsing approach.
-------------------------------------+-------------------------------------
     Reporter:  Joachim Jablon       |                    Owner:  Joachim
         Type:                       |  Jablon
  Cleanup/optimization               |                   Status:  closed
    Component:  Core (Mail)          |                  Version:  master
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Ready for
                                     |  checkin
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Carlton Gibson <carlton@…>):

 In [changeset:"1564e42ad397021093585147875a21dae1a3b3fc" 1564e42a]:
 {{{
 #!CommitTicketReference repository=""
 revision="1564e42ad397021093585147875a21dae1a3b3fc"
 Refs #30512, #15042 -- Added local-only address to sanitize_email() tests
 cases.

 email.headerregistry.parser.get_mailbox() returns a token with a
 `token_type` attribute.

 If `token_type` is `’invalid-mailbox’` then RFC violations have been
 detected. Emails with only the local part, and no domain,  are correctly
 parsed but are marked as `’invalid-mailbox’`.

 As per #15042, local-only are supported, to enable sending to addresses on
 localhost.

 sanitize_email() does not currently check `token_type`. This test is added
 to avoid a regression in case this is revisited in the future.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30512#comment:9>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.4bb2820920fbebf2b171ceda4a6b2d35%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to