Proper encoding for email headers
Hi,
we found a issue with the way fider handels encoding in mail headers. In our testings we used the Invitations feature to test this.
Steps to reproduce:
- Send invitaion to User
- Use non-ASCII characters in the "Subject" field
- Send the invite
After sending a test invite with the subject "Test ä ö ü", i've checked the mail on our test server (Postfix/Dovecot/rspamd/amavis). Here is an example:
Subject: [Fider] ÖoorwerASD Ääööas
MIME-version: 1.0
Content-Type: text/html; charset="UTF-8"
Which is fine, as it gets displayed correctly when viewed directly on the mail server. However this is not according to spec. Subjects with non-ASCII characters should be encoded as described in RFC 1342 e.g. =?charset?encoding?encoded-text?=
Although fider uses SMTPUTF8 if the server prodivdes it this is not an option for most people. SMTPUTF8 is not supported in some software, and can lead to issues with downstream SMTP Servers that don't support it.
Is there a way you could implement a Subject encoding like this as described here:
func cSubject(subject string) string {
return "=?utf-8?q?" + subject + "?="
}
Some further information can be found here.
Any thoughts?
Hi, I have SMTPUTF8 error on my Postifx host with Fider running in docker (same host as postfix).
dsn=5.6.7, status=bounced (SMTPUTF8 is required, but was not offered by host
Disabling smtputf8 on postfix fix the problem.
The problem is in fider smtp client ? or encoding ?
PS: other containers on same host doesn't have this smtputf8 problem.
We have exactly the same problem, even worse Polish locale uses non-ASCII characters in login email subject - 'Zaloguj się' meaning some of our clients can't even log-in.