Joel,

> I have set up Postfix/Amavis on openSuSE 11.2 with the SQL schema from
> http://www.ijs.si/software/amavisd/README.sql-mysql.txt. I'd like to
> include the X-Spam headers in all of my e-mail, at least initially while
> I test things. I created a new policy with spam_tag_level=-999,
> spam_tag2_level=3, and nothing in spam_subject_tag (so it takes the
> default of NULL), and I get this on a mail sent with subject "test":
> 
> X-Spam-Flag: NO
> X-Spam-Score: -1.975
> X-Spam-Level:
> X-Spam-Status: No, score=-1.975 tagged_above=-999 required=3
>       tests=[AM:BOOST=-4.155, AWL=-0.719, TVD_SPACE_RATIO=2.899]
>       autolearn=no
> X-Amavis-PenPals: age 6 14:47:14
> Subject: ***SPAM*** test
> 
> This seems rather odd to me. It looks like I can make the subject
> rewrite go away by changing spam_subject_tag to an empty string, but why
> doesn't NULL do the same thing? And where is that '***SPAM*** ' prepend
> coming from? I can't find that string anywhere in my amavisd.conf or
> /etc/spamassassin/* (I've set $sa_spam_subject_tag to some other string,
> but it does not appear to be used). If a NULL result from the SQL query
> means "use the default found at X" I'm ok with that, but I'd like to
> know where I should define that default.

It is odd. Which version of amavisd? A log at level 5 would explain what
is going on.

The NULL in a SQL table means: this (sql) lookup table does not have an
answer, continue lookups with a next lookup table in the corresponding
@*_maps list of lookup tables. Effectively, a NULL means that static
lookup tables will provide a result.

Unlike a NULL, an empty string is a definite answer, a search stops
there, the result of a lookup is an empty string, no remaining statical
lookup tables are consulted.

> It looks like I can make the subject
> rewrite go away by changing spam_subject_tag to an empty string,
> but why doesn't NULL do the same thing?

The 'spam_subject_tag' SQL field is an implicit first entry in a list
of lookup tables @spam_subject_tag_maps. By default its only remaining
element is $sa_spam_subject_tag1. Note a mismatch in names: for historical
(upward compatibility) reasons this is a default:

  @spam_subject_tag_maps  = ( \$sa_spam_subject_tag1 );
  @spam_subject_tag2_maps = ( \$sa_spam_subject_tag );

So perhaps your $sa_spam_subject_tag1 is set to '***SPAM*** ' ?
There is no ***SPAM*** string in the amavisd program itself,
so it must be coming from your config files or SQL/LDAP lookups.

Btw, the SQL field 'spam_subject_tag2' is the one usually used
(it applies at tag2_level), not the 'spam_subject_tag' which
applies at $tag_level.

  Mark

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to