Byteplant Forum

Home » CleanMail Support » CleanMail SpamAssassin Filter » Whitelisting via next in subject line
Whitelisting via next in subject line [message #518] Thu, 29 September 2005 08:27
InforMed Direct
Messages: 59
Registered: May 2004
Member
Is it possible to whitelist using a string in the subject line? I subscribe to a couple of email lists and the latest version of Spam Assassin is a lot better at detection and is flagging a lot of them as spam. However, adding the individual email addresses is not practical - I'd prefer to say "Always let emails through where the subject like starts with [mec_camra]".

Is this a tweak to the SA config file? If so, could somebody please guide me as I've not done anything like this before.

Thanks, Rob.

Re: Whitelisting via next in subject line [message #519 is a reply to message #518] Thu, 29 September 2005 09:58 Go to previous message
InforMed Direct
Messages: 59
Registered: May 2004
Member
PS. Subject should have read "Whitelist via Text in subject".
Re: Whitelisting via next in subject line [message #520 is a reply to message #518] Thu, 29 September 2005 13:45 Go to previous message
support
Messages: 918
Registered: April 2004
Senior Member
InforMed Direct wrote:

> Is it possible to whitelist using a string in the subject line?
> I subscribe to a couple of email lists and the latest version
> of Spam Assassin is a lot better at detection and is flagging a
> lot of them as spam. However, adding the individual email
> addresses is not practical - I'd prefer to say "Always let
> emails through where the subject like starts with [mec_camra]".
>
> Is this a tweak to the SA config file? If so, could somebody
> please guide me as I've not done anything like this before.

To whitelist certain subjects, a separate rule with a score of -100 has to be
added in the local.cf file, e.g.

header SUBJ_HELLO Subject =~ /Hello/i
describe SUBJ_HELLO Subject contains "Hello"
score SUBJ_HELLO -100



Customer Support
Byteplant GmbH
Re: Whitelisting via next in subject line [message #521 is a reply to message #520] Thu, 29 September 2005 13:55 Go to previous message
InforMed Direct
Messages: 59
Registered: May 2004
Member
>header SUBJ_HELLO Subject =~ /Hello/i
>describe SUBJ_HELLO Subject contains "Hello"
>score SUBJ_HELLO -100

Thanks for the response. Would you mind explaining, out of interest, what the above lines do Smile I can guess what the score line does and also the describe line. But why are there two lines to define "Hello", i.e. what's the purpose of header and describe keywords.

Thanks, Rob
Re: Whitelisting via next in subject line [message #522 is a reply to message #518] Sun, 02 October 2005 19:32 Go to previous message
Heidner
Messages: 121
Registered: February 2005
Senior Member
>header SUBJ_HELLO Subject =~ /Hello/i

The above rule ends with a regular expression "/Hello/i" which is told by the "=~" to try to match the pattern "Hello" anywhere in the subject string. So if you are receiving mail from a news group called "NASA" then you would want /NASA/i as the regular expression to look for.


describe SUBJ_HELLO Subject contains "Hello"

The above line is used as part of the header re-writting process. It lets spamassassin annotate your e-mail with the reason why the e-mail was scored.


>score SUBJ_HELLO -100

The score that will be assigned.


Note that "SUBJ_HELLO" is used for all three lines. It is the "rule" name, the first line defines the rule, the second line defines the english annotation IF the rule succeeds and the third line defines the score IF the rule succeeds.

The >header portion of the rule defnintion declares that the rule should be applied to the e-mail headers and not the body. the "Subject" narrows the rule to only the subject line.

There is quite a bit more documentation for spamasssisn in the \program files\no spam today!\sa\doc directory

See conf.html for explanations of rules.
Re: Whitelisting via next in subject line [message #523 is a reply to message #522] Mon, 03 October 2005 14:04 Go to previous message
InforMed Direct
Messages: 59
Registered: May 2004
Member
Heidner wrote:

> >header SUBJ_HELLO Subject =~ /Hello/i
>

Thanks for the explanation - appreciated.

Regards, Rob.

Re: Whitelisting via next in subject line [message #524 is a reply to message #520] Mon, 03 October 2005 19:08 Go to previous message
InforMed Direct
Messages: 59
Registered: May 2004
Member
> header SUBJ_HELLO Subject =~ /Hello/i
> describe SUBJ_HELLO Subject contains "Hello"
> score SUBJ_HELLO -100

Hmm, I added the above lines to the bottom of Local.cnf and I'm pretty sure NST stopped trapping any spam, i.e. it let anything through. I made the change at about 12:30 today and then started noticing more spam in my inbox that normal. When I looked in my NST folder, the last spam was 12:22. I then took out the change I'd made and since 17:33, six spams have been detected.

Should I enter the above at the top or bottom of local.cnf?

Cheers, Rob.

Re: Whitelisting via next in subject line [message #525 is a reply to message #524] Tue, 04 October 2005 11:28 Go to previous message
support
Messages: 918
Registered: April 2004
Senior Member
InforMed Direct wrote:

> > header SUBJ_HELLO Subject =~ /Hello/i
> > describe SUBJ_HELLO Subject contains "Hello"
> > score SUBJ_HELLO -100
>
> Hmm, I added the above lines to the bottom of Local.cnf and I'm
> pretty sure NST stopped trapping any spam, i.e. it let anything
> through. I made the change at about 12:30 today and then
> started noticing more spam in my inbox that normal. When I
> looked in my NST folder, the last spam was 12:22. I then took
> out the change I'd made and since 17:33, six spams have been
> detected.
>
> Should I enter the above at the top or bottom of local.cnf?

Please send your local.cf and nospamtoday.cf files to nstsupport@byteplant.com.



Customer Support
Byteplant GmbH
Previous Topic: One of my computers is generating spam
Next Topic: Testing out SA
Goto Forum:
  


Current Time: Sun Sep 25 12:35:46 CEST 2016