The umlauts end up in the subject of e-mail reports
Sending is done with Postfix 2.11x (default on debian 8)
Webserver: nginx/1.14.2
PHP Version: 7.2.16
The problem is now: The e-mail server (here postfix) does not accept e-mail headers that are not correctly encoded. In this case, the subject.
Reason for bounce:
Reporting-MTA: dns; ****
X-Postfix-Queue-ID: 71E9F40059
X-Postfix-Sender: rfc822; postmaster@***
Arrival-Date: Mon, 18 Mar 2019 10:19:37 +0100 (CET)
Final-Recipient: rfc822; ***@***
Original-Recipient: rfc822;***@***
Action: failed
Status: 5.6.7
Diagnostic-Code: X-Postfix; SMTPUTF8 is required, but was not offered by host
(Note: The Postfix option smtputf8_enable is only available from Postfix 3.x on)
Interestingly, the problem only occurs on this one Matomo installation. All other Matomo installations that use the same mail gateway and the same environment (even on the same server) do not have this problem.
Are there any settings on Matomo’s part that can be made to deal with the correct encoding of email?
This should be the perfect bug for me to reproduce:
I am using Debian 9 with the default postfix (3.1.9)
smtputf8_enable seems to be disabled (I never changed anything in the config)
➜ /etc/postfix grep -r "smtputf8_enable"
main.cf:smtputf8_enable = no
my Matomo is set to German
I have a website that has an “ö” in the title
I have just created a new report for this website and clicked on Bericht jetzt senden
But unlike in your case, for me the email is sent normally and I get it with the umlaut in the title of the mail.
As the only difference seems to be the the debian (and therefore postfix) version, I think that this isn’t necessarily a bug in Matomo, but maybe rather something odd in your setup.
Are you using SMTP or phpmail in Matomo? (I quickly switched to SMTP, but the result stayed the same)
The e-mail is rejected by the outgoing mail relay. Seems as if the problem does not exist with newer Postfix versions. I will update the Mailrelay in the near future, then the problem has probably been solved.
Just found it strange that the problem only occurs when the interface is set to “Deutsch”… Hhm.
The Mail in English is stored as UTF-8, the German as ASCII only:
# english
$ file mail.2019-04-04_16-23-10.Hw9.eml
mail.2019-04-04_16-23-10.Hw9.eml: HTML document, UTF-8 Unicode text
# german
$ file mail.2019-04-04_16-23-42.Apl.eml
mail.2019-04-04_16-23-42.Apl.eml: HTML document, ASCII text