Thread: [Qmail-scanner-general] Qmail-Scanner 2.08 with Maildrop 2.3.0
AV/content filter for Qmail
Brought to you by:
jhaar
|
From: Archives <ar...@gr...> - 2010-02-14 02:57:09
|
Using maildrop v2.3+ causes qmail-scanner to break with "Unknown
character set: ANSI_X3.4-1968". Reverting to 2.2 causes the errors to
go away.
Running the reformime commands manually (both from 2.2 and 2.4) produces
no errors, which leads me to suspect the issue isn't a problem with
maildrop , but instead something that qmail-scanner was using in a
broken state which reformime is now using correctly.
It looks like only one other person has reported my exact issue (as far
as google can find), and it's both in japanese, and without resolution.
UPDATE: My assumption above was correct, qmail-scanner sets
$ENV{'LC_ALL'}= $ENV{'LANG'} = $ENV{'LANGUAGE'} = 'C';
POSIX::setlocale(&POSIX::LC_ALL,'C');
Which is why reformime breaks. Setting it to:
$ENV{'LC_ALL'}= $ENV{'LANG'} = $ENV{'LANGUAGE'} = 'en_US.UTF-8';
POSIX::setlocale(&POSIX::LC_ALL,'en_US.UTF-8');
Results in a perfectly working, unbroken system. (On my machine $LANG=
'en_US.UTF-8')
I am posting this result just in case someone else comes along wondering
why it's suddenly not working.
|
|
From: Jason H. <Jas...@tr...> - 2010-02-14 03:16:57
|
On 02/14/2010 03:55 PM, Archives wrote:
> Which is why reformime breaks. Setting it to:
>
> $ENV{'LC_ALL'}= $ENV{'LANG'} = $ENV{'LANGUAGE'} = 'en_US.UTF-8';
> POSIX::setlocale(&POSIX::LC_ALL,'en_US.UTF-8');
>
> Results in a perfectly working, unbroken system. (On my machine $LANG=
> 'en_US.UTF-8')
>
> I am posting this result just in case someone else comes along wondering
> why it's suddenly not working.
>
>
Eww - not as easy as that I'm afraid. If you read the CHANGES file,
you'll find a section from 10/Apr/2004
* The locale is forced to "C" (English) at the beginning of Q-S. That
will standardize the output of localized apps (such as AVs) so that
the string regexes will work more reliably. Note that this has
nothing to do with the normal Q-S language support
So forcing the locale to "C" (which is English) is critical for the AV
string matches to work. As your host is en.* already, your change does
no harm - but it would break non-en hosts.
I'll have to take a look at a newer maildrop - obviously something has
changed there... Thanks for the heads-up
--
Cheers
Jason Haar
Information Security Manager, Trimble Navigation Ltd.
Phone: +64 3 9635 377 Fax: +64 3 9635 417
PGP Fingerprint: 7A2E 0407 C9A6 CAF6 2B9F 8422 C063 5EBB FE1D 66D1
|
|
From: Archives <ar...@gr...> - 2010-02-14 03:36:45
|
On 2/13/2010 7:16 PM, Jason Haar wrote:
> On 02/14/2010 03:55 PM, Archives wrote:
>
>> Which is why reformime breaks. Setting it to:
>>
>> $ENV{'LC_ALL'}= $ENV{'LANG'} = $ENV{'LANGUAGE'} = 'en_US.UTF-8';
>> POSIX::setlocale(&POSIX::LC_ALL,'en_US.UTF-8');
>>
>> Results in a perfectly working, unbroken system. (On my machine $LANG=
>> 'en_US.UTF-8')
>>
>> I am posting this result just in case someone else comes along wondering
>> why it's suddenly not working.
>>
>>
>>
> Eww - not as easy as that I'm afraid. If you read the CHANGES file,
> you'll find a section from 10/Apr/2004
>
> * The locale is forced to "C" (English) at the beginning of Q-S. That
> will standardize the output of localized apps (such as AVs) so that
> the string regexes will work more reliably. Note that this has
> nothing to do with the normal Q-S language support
>
> So forcing the locale to "C" (which is English) is critical for the AV
> string matches to work. As your host is en.* already, your change does
> no harm - but it would break non-en hosts.
>
> I'll have to take a look at a newer maildrop - obviously something has
> changed there... Thanks for the heads-up
>
>
>
According to the guy who developed reformime (who i talked to today),
reformime inherits $LANG from it's parent process, it might be as simple
as putting in a special case where $LANG is set before calling
reformime... but I didn't have confidence in my ability to hack up Q-S.
Now there's at least a record of a workaround out there. When i started
looking 3 weeks ago, there was only 1 reported case of this bug - in
japanese, with no solution posted.
Regards,
Aaron.
|
|
From: Jason H. <Jas...@tr...> - 2010-02-14 18:37:32
|
On 02/14/2010 04:35 PM, Archives wrote: > > According to the guy who developed reformime (who i talked to today), > reformime inherits $LANG from it's parent process, it might be as simple > as putting in a special case where $LANG is set before calling > reformime... but I didn't have confidence in my ability to hack up Q-S. > > I've also just heard back from the author of maildrop and he says it's a bug. He's looking into it -- Cheers Jason Haar Information Security Manager, Trimble Navigation Ltd. Phone: +64 3 9635 377 Fax: +64 3 9635 417 PGP Fingerprint: 7A2E 0407 C9A6 CAF6 2B9F 8422 C063 5EBB FE1D 66D1 |