Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transcode non-ASCII headers using MIME encoding #1434

Open
pacien opened this issue Sep 12, 2019 · 2 comments
Open

Transcode non-ASCII headers using MIME encoding #1434

pacien opened this issue Sep 12, 2019 · 2 comments
Labels

Comments

@pacien
Copy link
Contributor

pacien commented Sep 12, 2019

Is your feature request related to a problem? Please describe.

Messages composed with alot may be rejected by some mail servers if headers contain non-ASCII characters.

  linux-kernel@vger.kernel.org
    host vger.kernel.org [209.132.180.67]
    SMTP error from remote mail server after end of data:
    550 5.7.1 Content-Policy reject msg: Message headers can not have 8-bit non-ASCII characters in it; Use MIME encodings if such are needed!

Describe the solution you'd like

The user should be warned before sending such message and be offered the possibility to have those headers automatically transcoded. An option to do that automatically could also be added.

Describe alternatives you've considered

Normalising those characters to ASCII manually. I always forget to do that before it's too late.

Additional context

#1 was supposed to handle this encoding issue, which still seems to exist in alot 0.8.

@pazz
Copy link
Owner

pazz commented Nov 3, 2019

wow, you've found #1 :D
These things are actually handled by pythons email module, so I doubt that the messages are not RFC compliant. But I'd be open to adding some config setting to enforce more strict encodings than what is considered default in 2019, by tweaking the calls to the email module where appropriate.

@pazz pazz added the feature label Nov 3, 2019
@pacien
Copy link
Contributor Author

pacien commented Nov 24, 2019

Migrating to Python 3.6's email.message.EmailMessage (issue #1409) will probably solve this as a nice side effect:

email.header: Internationalized headers
[…] In the current API encoding and decoding of headers is handled transparently by the dictionary-like API of the EmailMessage class. […]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants