Wrong e-mail address in `From` field with non-ascii characters
See original GitHub issueDescription
I set the
notif_from: "%(app)s üzenet <sz-matrix@example.com>"
and I end up with:
From: "Matrix üzenet <sz-matrix@example.com>"@maildomain.example.com
The weird thing is that the:
Return-Path: <sz-matrix@example.com>
is correct.
Steps to reproduce
- set the
notif_from:
to something like in the documentation - restart synapse
- post message and wait for the e-mail notification
I expect to see Matrix üzenet <sz-matrix@example.com>
in the From field of the incoming mail.
Version information
- Homeserver: Synapse 1.35.1
If not matrix.org:
-
Version:
-
Install method:
- Platform:
Issue Analytics
- State:
- Created 2 years ago
- Comments:21 (13 by maintainers)
Top Results From Across the Web
Error: There are non-ASCII characters in the local part of the ...
To check for this, open the On My Mac account (on macOS) or Local Folders account (on Windows), then navigate to the Outbox....
Read more >Can an email address contain international (non-english ...
I would assume yes since a number of top level domains already allow non ascii characters for domains and since the domain ...
Read more >What are valid and invalid email address characters - TechNet
Hi The format of email addresses is local-part@domain where the local-part may be up to 64 characters long and the domain name may...
Read more >Sending email to addresses where the local part is non ASCII ...
Sends a non quoted string to the smtp server in the To: header 3. Actual Results: BAD HEADER SECTION, Non-encoded 8-bit data (char...
Read more >Sending email to non-ASCII character email address
The RFC 6530 protocol allowing addresses with non-Latin and accented Latin characters was released in 2012. However, nothing has been changed ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve looked into this issue, and it looks like when Synapse does UTF8 encoding it does it on the whole
john doe <jdoe@example.com>
string (rather than justjohn doe
), so it’s also converting the<
/>
surrounding the address as well as@
/.
/etc in the address. So from the SMTP server’s pov theFrom
header doesn’t have an address.@clokep pointed out that https://docs.python.org/3/library/email.headerregistry.html#email.headerregistry.AddressHeader and
email.utils.formataddr
might be interesting to consider in order to fix this bug.