linercargo.blogg.se

Spamassassin postfix
Spamassassin postfix




spamassassin postfix

$ sudo sa-learn -ham -u spamd -dir ~/Maildir/.INBOX/* -D SpamAssassin sample procmailrc Pipe the mail through spamassassin (replace spamassassin with spamc if you use the spamc/spamd combination) The condition line ensures that only messages smaller than 500 kB (500 1024 512000 bytes) are processed by SpamAssassin. To train with non-spam content, use the following command (-ham): $ sudo sa-learn -spam -u spamd -dir ~/Maildir/.Junk/* -D The following command will train spam-assassin with spam contents (-spam): You can train spam-assassin's Bayesian classifier to get more accurate spam detections. Basically, it checks the content of the e-mail and determines the score based on content. Spam-assassin works with a Bayesian classifier to classify e-mails as spam or not spam. If given e-mail scores below the configured threshold, then it passes the filter without any modification otherwise, spam-assassin adds a spam header to the e-mail. Postfix will pass all e-mails through this pipe, which will be then scanned through spam-assassin to determine the spam score. We have created a new Unix pipe which will be used to filter e-mails. Spam filtering works with the help of a piping mechanism provided by Postfix. You can check spam-assassin and mail logs to verify that spam-assassin is working properly:

spamassassin postfix

OPTIONS="-create-prefs -max-children 5 -username spamd -helper-home-dir $įinally, restart spam-assassin and Postfix: Open /etc/default/spamassassin and update the following lines:

spamassassin postfix

$ sudo useradd -g spamd -s /usr/bin/nologin \Ĭhange the default settings for the spam daemon. $ sudo apt-get install spamassassin spamcĬreate a user account and group for spam-assassin: Install spam-assassin with the following command: You need to have Postfix installed and working.įollow these steps to filter mail with spam-assassin: You will need access to a root account or an account with sudo privileges.

SPAMASSASSIN POSTFIX HOW TO

In this recipe, we will learn how to install and set up a well-known e-mail filtering program, spam-assassin.






Spamassassin postfix