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
Reports with umlauts in the subject line #14313
Comments
This should be the perfect bug for me to reproduce:
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) |
Could you both take a look at the subject header? To work everywhere it should look like this To do this in PHP is really simply: $subject = "=?UTF-8?Q?" . quoted_printable_encode($subject) . "?="; If this is not in Matomo, it should be added. (There are a lot more complex methods to do this, see https://stackoverflow.com/a/27648245/7849268 for more info) |
Looks good to me.
phpmail, with sendmail: $ grep -i sendmail /etc/php72/user/matomo/php.ini
sendmail_path=/usr/sbin/sendmail -t -i |
My setup:
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. |
I mean: What is the difference between German and English when sending e-mails from Matomo? |
With this header, the error should never appear. So this is strange. Could you try sending a mail from your Matomo host via CLI using the correctly encoded header? |
This works: $ mail -s "=?utf-8?Q?Bericht=20B=C3=A4rentatze=20-=20Mittwoch,=203.=20April=202019?=" markus@example.com < /dev/null
mail: Null message body; hope that's ok Found out something interesting: I saved the mail locally instead of sending it to see if I could see a difference. $ grep -i sendmail /etc/php72/user/matomo/php.ini
sendmail_path=/usr/local/vzscripts/stdintotmp
$ cat /usr/local/vzscripts/stdintotmp
#!/bin/sh
cat < /dev/stdin > $(/bin/mktemp --tmpdir=${HOME}/tmp/ mail.$(date +%Y-%m-%d_%H-%M-%S).XXX.eml) 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 mail.2019-04-04_16-23-42.Apl.txt |
Hi everyone, I have been moving this discussion to the forum as in my opinion it is far more useful for quick discussions and troubleshooting than GitHub where every response is sent to more than 400 people. If a specific bug in Matomo is found, a new GitHub issue with the description can be opened. I want to try in the future to pay more attention (and add more documentation for users) on when to use the forum and when to open a github issue. |
Hi, 22.04.2020 - i now have the same problem and i can not find a solution in this thread. my local postfix becomes statusmails with utf8 chars in header and can not send the mails to extern mailservers:
i think the problem starts after moving my webserver/matomo from an old debian to a new debian9 server. How can i fix this?
What can i do? best regards, |
@xenDE I see two solutions/workarounds:
$ cat /etc/postfix/main.cf | grep smtputf8_enable
smtputf8_enable = no The second one works for me. For me it is not clear whether this is a configuration problem or a Matomo problem. On the one hand it can be fixed with a postfix configuration change, on the other hand the problem only occurs if Matomo is set to German. |
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:
(Note: The Postfix option
smtputf8_enable
is only available from Postfix 3.x on)I can reproduce the problem with a newly installed version (Standard installation with ZIP from matomo.org). Interestingly, the problem only occurs if the interface is set to deutsch. If the interface is in English, it works without problems.
Step to reproduce:
smtputf8_enable
(default Debian 8)äöü
as website nameThe text was updated successfully, but these errors were encountered: