Opened 5 years ago

Closed 5 years ago

#16166 closed Bug (fixed)

EmailField? does not comply with SMTP standard

Reported by: qqq1one@… Owned by: nobody
Component: Core (Mail) Version: master
Severity: Normal Keywords: EmailField SMTP compliance
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Email addresses in the literal form (where the square brackets are included):


are indicated as invalid by EmailField.

But the literal form is valid as per section 4.1.3 of the SMTP standard:

Sometimes a host is not known to the domain name system and
communication (and, in particular, communication to report and repair
the error) is blocked. To bypass this barrier a special literal form
of the address is allowed as an alternative to a domain name. For
IPv4 addresses, this form uses four small decimal integers separated
by dots and enclosed by brackets such as [], which
indicates an (IPv4) Internet Address in sequence-of-octets form.


Also referred to in

5.2.17 Domain Literals: RFC-822 Section 6.2.3

A mailer MUST be able to accept and parse an Internet domain
literal whose content ("dtext"; see RFC-822) is a dotted-
decimal host address. This satisfies the requirement of
Section 2.1 for the case of mail.

An SMTP MUST accept and recognize a domain literal for any of
its own IP addresses.

Attachments (1)

ticket_16166_for_r16342.diff (1.6 KB) - added by samufuentes 5 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 5 years ago by melinath

  • Component changed from Uncategorized to Core (Mail)
  • Needs documentation unset
  • Needs tests set
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted
  • Version changed from 1.3 to SVN

Changed 5 years ago by samufuentes

comment:2 Changed 5 years ago by samufuentes

  • Has patch set
  • Needs tests unset
  • UI/UX unset

comment:3 Changed 5 years ago by trez

  • Triage Stage changed from Accepted to Ready for checkin

Tests are ok.

comment:4 Changed 5 years ago by lukeplant

  • Resolution set to fixed
  • Status changed from new to closed

In [16355]:

Fixed #16166 - EmailField does not comply with SMTP standard

Thanks to qqq1one@… for the report, and samufuentes for the patch.

Note: See TracTickets for help on using tickets.
Back to Top