On Mon, Feb 16, 2004 at 12:53:42PM -0500, Jon Nathan wrote:
>This is my filter rule:
>
># SpamAssassin - allow hammy messages through
>headers '^X-Spam-Level:\s\*{0,2}' ok
>
>Somehow TMDA's allowing messages with 4 asterisks through though:
>
>X-Spam-Level: ****
[...]
>What am I doing wrong?A message with four asterisks matches because it has the two asterisks you're looking for--it just happens to have more after that. The X-Spam-Level header is most easily used to detect spam levels of N or higher, where N is some whole number you select. >After a little poking, I decided to just do this through procmail, >negating a match on asterisks: > ># let hammy msg through >:0: >* ! ^X-Spam-Level:.(\*) >$HOME/mail/mbox On my system, I set SA's Ham limit where I want it in the .spamassassin/user_prefs file like so: required_hits 2 I can set it to a fraction if I want, and I can find it in .procmailrc easily: :0 * ^X-Spam-Status: No $HOME/mail/mbox Then in TMDA's incoming filter, I have all my white/black list stuff first, and this at the end: # 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 headers 'X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*' hold So: * Ham under SA's required_hits is delivered directly. * What SA calls spam can still be delivered via TMDA's whitelist. * What SA calls really bad spam is held without challenge. * What SA calls spam and TMDA doesn't like either, gets a challenge. -- Kyle Hasselbacher 1/2 == 0 [EMAIL PROTECTED] (For sufficiently large values of 2).
pgp00000.pgp
Description: PGP signature
_____________________________________________ tmda-users mailing list ([EMAIL PROTECTED]) http://tmda.net/lists/listinfo/tmda-users
