Open tsabi opened 4 years ago
I got a similar error tonight: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 2515: invalid continuation byte
. The rought cause in the logfile appears to be an issue with an invalid domain name.
postfix/trivial-rewrite[49231]: warning: midna_domain_to_ascii_create: Problem translating domain [...] to ASCII form: UIDNA_ERROR_DISALLOWED
I don't think opening logfiles as latin1 is the correct fix, but the logparser should handle unicode exceptions.
If you use postfix internationally, you will hit this error. I believe this is the right fix, because those log files are NOT utf-8 encoded, so you should not read it as utf-8, but with the real encoding of that file.
Fixes: https://github.com/modoboa/modoboa/issues/1788, https://github.com/modoboa/modoboa-stats/issues/55, https://github.com/modoboa/modoboa-stats/issues/38,