-
Notifications
You must be signed in to change notification settings - Fork 58
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
No-ASCII character in email header #626
Comments
Thank you for submitting your first issue to MailScanner! We will respond to you soon! |
We probably need to override the locale in this perl
|
Preparing PR |
@bukowski12 Can you try this PR? |
Doesnt work, still czech day in datestamp. I have version 5.3.3 but it doesnt matter i hope. |
That must mean that |
@bukowski12 I made an adjustment to the PR, please try again and restart msmilter. |
Same problem. |
Yeah, same here, it is like it is completely ignored. Tried multiple different functions. |
I may have to build our own or find a similar non-localized function. |
Okay, I may have one, going to redo the PR and rebase. |
@bukowski12 This one uses DateTime, which, according to the perl docs, defaults to en_US. Give it a try. |
Problem, msmilter doesnt work: DateTime::now('DateTime', 'time_zone', undef) called at /usr/sbin/MSMilter line 285 Problem with $tz variable?
|
Apologies, I'm probably going to have to define $tz inside the callback. Fixing. |
@bukowski12 I moved the $tz into the header_callback in the PR, that should resolve the issue. Since these are callbacks the global variable didn't get set. |
It works! Thanks. |
Some servers which use Amavis denied emails from my server wit error
amavis[838601]: (838601-16) check_header: 2, Non-encoded non-ASCII data (and not UTF-8) (char E1 hex): Received: Header encoded (all-ASCII): X-Amavis-Alert: BAD HEADER SECTION, Non-encoded non-ASCII data (and not UTF-8)
I found that header in email contain non-ASCII characters and specifically is it czech day in date (Pá, Čt...)
Received: from mail.example.cz ([192.168.16.10] [192.168.16.10]) (no client certificate requested) by mail.example.cz (MailScanner Milter) with SMTP id 3F1D43402B2 for test@volny.cz; Pá, 18 lis 2022 13:17:30 +0100 (CET)
Its this code in MSMilter:
sub header_callback
{
...
my $datestring = strftime "%a, %e %b %Y %T %z (%Z)", localtime;
...
}
What is best solution?
The text was updated successfully, but these errors were encountered: