#12027: EmailField validation is incorrect, trailing dots fail -------------------------------------+------------------------------------- Reporter: Klas H | Owner: nobody Type: | Status: reopened Uncategorized | Component: Core (Other) Milestone: | Severity: Normal Version: SVN | Keywords: email, regular Resolution: | expression, validation Triage Stage: | Has patch: 1 Unreviewed | Needs tests: 0 Needs documentation: 0 | Easy pickings: 0 Patch needs improvement: 0 | UI/UX: 0 | -------------------------------------+------------------------------------- Changes (by Josh C):
* status: closed => reopened * severity: => Normal * cc: joshcartme@… (added) * resolution: invalid => * easy: => 0 * ui_ux: => 0 * type: => Uncategorized Comment: I'm not convinced this should be closed. Although DNS should correctly resolve a domain with a trailing dot according to the specification (documented at the beginning of page 7 here http://www.ietf.org/rfc/rfc1034.txt) sending emails to addresses that end with a dot fails at least in my case. For example I tried sending an email to and from a google apps address of mine using thunderbird. I was sent back a Delivery Status Notification (Failure). When trying to use EmailMultiAlternatives with a email address of this form, m...@domain.com. as an example, msg.send() breaks with the following error: SMTPRecipientsRefused: {'m...@domain.com.': (501, '<tedlitt...@aol.com.>: domain missing or malformed')} Here is a quote from RFC 5321 section 2.3.5 (http://tools.ietf.org/html/rfc5321#section-2.3.5): "A domain name (or often just a "domain") consists of one or more components, separated by dots if more than one appears." I think the important word is separated, it does not say terminated therefore an email address should not be terminated by a dot. More discussion on that here: http://tech.groups.yahoo.com/group/postfix- users/message/244166. At the very least I think this needs to be revisited and properly discussed. Emails with dots at the end do not send so why should they be validated by Django? -- Ticket URL: <https://code.djangoproject.com/ticket/12027#comment:2> 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 post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.