[issue37492] should email.utils.parseaddr treat a@b. as invalid email ?

2019-07-13 Thread jpic
jpic added the comment: Thanks for the heads up. There is still one last case where maybe parseaddr should return a tuple of empty strings, currently: >>> parseaddr('a@') ('', 'a@') Is this worth changing ? -- ___ Python tracker

[issue37492] should email.utils.parseaddr treat a@b. as invalid email ?

2019-07-13 Thread R. David Murray
R. David Murray added the comment: Right, those absolutely are valid addresses. A resolver will normally look up a name with an internal dot first as if it were an FQDN, but if it does so and does not get an answer it will then look it up again as a "local" address (appending in turn the st

[issue37492] should email.utils.parseaddr treat a@b. as invalid email ?

2019-07-03 Thread jpic
jpic added the comment: Thanks a heap Eric, I feel a bit silly I missed it. Closing the issue as not a bug, please feel free to reopen if necessary. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue37492] should email.utils.parseaddr treat a@b. as invalid email ?

2019-07-03 Thread Eric V. Smith
Eric V. Smith added the comment: Counterpoint: I just sent an email to "info@info.", and Thunderbird and my MTA (postfix) and my mail relay all accepted it. I guess it's possible that a TLD (especially one of the newer ones) could accept email addresses in the TLD itself. It turns out that

[issue37492] should email.utils.parseaddr treat a@b. as invalid email ?

2019-07-03 Thread Eric V. Smith
Eric V. Smith added the comment: RFC 1034 defines absolute domain names as ending with dot: When a user needs to type a domain name, the length of each label is omitted and the labels are separated by dots ("."). Since a complete domain name ends with the root label, this leads

[issue37492] should email.utils.parseaddr treat a@b. as invalid email ?

2019-07-03 Thread jpic
New submission from jpic : Following up bpo-34155[0] PR#13079[1], which changes: >>> parseaddr('a@malicious@good') >From returning: ('', 'a@malicious') To return: ('', '') As such, parseaddr behaves more like documented: email.utils.parseaddr(address) Parse address – which shou