# Whitelist, Blacklist .. a spam mail smart package

## eltech

Hello All..

I recently started supporting a spam detection package over windows for businesses and it has a feature that i was curious to find out if there are any qmail addins to make it similar to it.

 It has Blacklist, WhiteList and Quarantine folders.. the obvious is how it operates. drop an email into the blacklist and all mail starts going into that folder.. drop in the white; mail from the sender never gets scored or viwed as potential spam..  there is also an option to set certain rules to _add weight_ to a message giving it weight by having certain instances say of the subject or body text. i know spamassassin right now kind of does this, but all of the percentages are sort of self defined.

Im currently running spamassassin/qmailscanner/qmail/clamdscan/vpopmail(no mysql) and im not sure this is available or if there is a feature similar.

If so; id love to hear about it..

thanks in advance.

----------

## eltech

another question is will i have to configure dcc is i install it.. or will it work similar to the way razor 'just worked' ?

----------

## eltech

bump

figured it all out.. dcc is working..

but i'd love to know how the sa_learn works..

----------

## eltech

bump ..

----------

## eltech

another try .. bump!

----------

## TheRAt

 *eltech wrote:*   

> but i'd love to know how the sa_learn works..

 

Silly question, but have you looked at the man page for sa-learn... it is fairly descriptive and rather self explanatory, i think..

----------

## eltech

Ive taken a look at this option, but at the same time.. i havent seen a clear example of what it will do after it has learned X amount of messages ..

furthermore.. whats the best way to configure sa-learn for all of my boxes under my vpopmail install?

i did run the spam scan successfully

```

pcns cur # sa-learn --spam /var/vpopmail/domains/mydomain.com/leon/.maildir/.Spam/cur 

Learned tokens from 3 message(s) (21 message(s) examined)

```

but how do i know it works?

qmail-scanner already does a great job at scanning and catching most spam .. spamassassin works great ..

to add below is my local.cf

```

required_hits           3.0

trusted_networks        192.168.2.      127.0.0.1

rewrite_header Subject  [SPAM]

report_safe             1

ok_languages            all

use_dcc                 1

use_pyzor               1

use_razor2              1

skip_rbl_checks         0

dns_available           yes

use_bayes               1

use_bayes_rules         1

bayes_auto_learn        1

allow_user_rules        1

ok_locales              all

bayes_auto_learn_threshold_nonspam 0.1

bayes_auto_learn_threshold_spam 12.0

```

----------

## ticho

 *eltech wrote:*   

> but how do i know it works?

 Check X-Spam-Status header in received mails. A list of applied tests should be in there. If you're getting tests starting with "BAYES_", then your bayesian filtering works.

Note that it takes certain number of learned spam and non-spam messages for the bayes db to kick in. That number is configurable 200 by default, I think. Check the spamassassin documentation.

----------

## eltech

 *ticho wrote:*   

>  *eltech wrote:*   but how do i know it works? Check X-Spam-Status header in received mails. A list of applied tests should be in there. If you're getting tests starting with "BAYES_", then your bayesian filtering works.
> 
> Note that it takes certain number of learned spam and non-spam messages for the bayes db to kick in. That number is configurable 200 by default, I think. Check the spamassassin documentation.

 No, none of that yet in the headers..

i have what i have always had..

 *Quote:*   

> 
> 
> X-Spam-Status: Yes, hits=6.1 required=3.0
> 
> X-Spam-Level: ++++++
> ...

 

Also.. with the virtual domains how can i set this up for all vpopmail .Spam and .maildir/cur mail folders?

```
sa-learn --ham  /var/vpopmail/domains/mydomain.com/*/.maildir/cur
```

where do i set the cronjobs? in crontab or as a cronjob in like cron.hourly or something?

i have read man sa-learn. but again.. it doesnt quite explain how it behaves when it learns X amount of messages as Spam or Ham..

----------

## eltech

hmm .. just notice this..

mail-filter/spambayes [ Masked ]

      Latest version available: 1.0.4

      Latest version installed: [ Not Installed ]

      Size of downloaded files: 681 kB

      Homepage:    http://spambayes.sourceforge.net

      Description: An anti-spam filter using on Bayesian filtering

      License:     PSF-2.2

maybe this is why sa-learn is useless without this emerged?

----------

## ticho

No, that's a package completely unrelated to spamassassin. It's just another implementation of bayesian filtering, such as spamprobe or bogofilter.

----------

## eltech

 *ticho wrote:*   

> No, that's a package completely unrelated to spamassassin. It's just another implementation of bayesian filtering, such as spamprobe or bogofilter.

 ok .. well i set the cronjob to scan my domain .Spam and .maildir/cur folders for spam/ham .. lets see how long it takes for this to start working; if its supposed to ..

Is my local.cf file setup properly for this learning to begin when enough messages are fed to sa-learn? from what i have read, it should be..

thanks in advance..

----------

