You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Justin Mason <jm...@jmason.org> on 2004/02/13 07:07:47 UTC

Re: one question

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Eugene M. Zheganin writes:
>Hi.
>
>Sorry to bother you.
>But I have one question 'bout future (and maybe present) of 
>Spamassassin, and it seems that noone knows an answer to it in the 
>maillists.
>
>I use SA for a half-year maybe... And now there's a problem that never 
>appeared.
>I live in Russia, and now the number of spam written in russian has 
>greatly increased.
>SA can't filter it 'cause there's no russian spam patterns in its 
>disrtibutive. But surely, that's not a problem- I wrote many of them by 
>myself. And the absence of charset-tables support is not a problem too, 
>I found a way to solve that.
>
>But the absence of 'use locale;' statement in SA *.pm's IS a real 
>problem. Cause without that statement the case-insensitive match does 
>not work, and the 'i' flag in regexes is useless.
>
>I tried to put that statement in *.pm's, but modified modules don't 
>work. I'm not great in perl, so I don't know why.
>
>I still can't filter russian spam, and I think that's the common problem 
>of all users, receiving mail in national charsets.
>
>So I finally wanna ask- will be 'use locale;' supported in future 
>versions of SA ?

Hi Eugene --

that's a problem I hadn't foreseen!

Unfortunately, there's an issue with just adding "use locale;" to
the .pm files -- since we have two locales:

	- the locale the .pms are running in.
	
	- the *user's* locale. 
	
We don't know for sure that $ENV{LC_CTYPE} etc. are set correctly
in the first locale, to handle the collation rules etc of the
second locale -- ie. spamd could be running in one locale
while the user prefers another.

Suggestions, anyone?

- --j.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Exmh CVS

iD8DBQFALGmzQTcbUG5Y7woRAqEqAJ9K80nC6Xxj5CtQYtTm0XBRKubdwACgo31K
DO4PfKadhZrvp4/4zP2y2K0=
=CRFv
-----END PGP SIGNATURE-----


Re: one question

Posted by Daniel Quinlan <qu...@pathname.com>.
jm@jmason.org (Justin Mason) writes:

> Unfortunately, there's an issue with just adding "use locale;" to
> the .pm files -- since we have two locales:

I think each test needs to have a defined locale in the .cf file.

Locales should not be a part of the environment or command line options
and all pms should run with the same boring locale, only on a per-test
basis should we be doing something else.

We may need some more lightweight way to handle locales if it is too
expensive to switch to Russian and other locales for 5-10% of the tests.

Daniel

-- 
Daniel Quinlan                     anti-spam (SpamAssassin), Linux,
http://www.pathname.com/~quinlan/    and open source consulting