Erwin Zavala wrote:
Could some explain to me what each of these line says.  If you are
going to refer me to the manual,  please save it.  I am asking this
question because I cannot understand the syntax from the manual.



The manual is actually not very difficult to read, but since you asked, here is a try (If I'm wrong, I hope I'll be soon corrected).

clear_headers

by default, SA will add some headers. when you want to customize these headers, use clear_headers. now, SA won't add default headers, so we need to configure new onces, which is done next.

add_header all Flag _YESNOCAPS_

To all messages (both spam and ham), add a header "X-Spam-Flag", and put YES or NO in its value, depending on whether it is spam or ham.

An example header would be:
        X-Spam-Flag: YES

you can change the header name, but it always start with X-Spam-. to use a header of X-Spam-Erwin, just use "add_header all Erwin ...". also, the value field may be customized. there are some "magical" strings that have special meaning. Here _YESNOCAPS_ means either "YES" or "NO" (fully capitalized. if you prefer "Yes" or "No", use _YESNO_ instead).

add_header spam Level _STARS(*)_

if the message is spam, add a header named "X-Spam-Level", and in its value, put N '*' where N is the (rounded to int) spam score. to avoid too long headers, N <= 50.

An example header would be:
        X-Spam-Level: **********


if you prefer other characters, you can for instance use _STARS(s)_, this way you'll get "sssss" instead of "*****". use this if you want to filter this header in MDAs and MUAs and don't like having to deal with the fact that '*' is a special char (in most MDAs, you'll need to escape it. in MUAs, that's no certain...).


fold_headers 1
This is the default. It means SA headers will be "folded", that is, multi-line (with the rfc-mandated whitespace in continuation lines of course).

If you prefer a very long header on one line, then use '0' instead of '1'. but this is rarely justifiable.

add_header all Summary Score _HITS_ (Spam threshold is _REQD_);
>>    Tests: _TESTSSCORES(, )_

[the above is all on one line. I've wrapped to make sure a MUA won't wrap it wrong;-]

To all messages, add a header of the form:

X-Spam-Summary: core _HITS_ (Spam threshold is _REQD_); Tests: ...

where
- _HITS_ is the score of the message
- _REQD_ is the configured threshold (above which a message is considered spam). - _TESTSCORES(,)_ is the list of matched tests together with their score. as the manual says, an example would be "AWL=-3.0,...".




Reply via email to