![]() Then install the ClamAV perl library as follows: Install the perl-cpanplus-dist-arch package. Install and setup clamd as described in ClamAV.įollow one of the above instructions to call SpamAssassin from within your mail system. Txrep_factory Mail::SpamAssassin::SQLBasedAddrList sql files if needed.Ĭreate the tables for user preferences, Bayesian filter data and TxRep, respectively:īayes_store_module Mail::SpamAssassin::BayesStore::MySQL Note that TYPE has been replaced by ENGINE in recent MySQL versions, so replace it accordingly in the used. Under the sql/ directory you will find the required files to create the database tables. Note: Since TxRep plugin is a newer and enhanced replacement for Auto-Welcomelist and Auto-Whitelist, this is the covered implementation in this article MySQL This is specially helpful for a virtual user mail setup, where users do not have a $HOME/.spamassassin directory with their SpamAssassin data. SpamAssassin can load user preferences, Bayesian filter data and auto-whitelist from a SQL database. ![]() ![]() etc/mail/spamassassin/nf # spamc global configuration file You can modify it: create the spamc configuration file. The default maximum size for scanning is 500 KB (see spamc(1p)). Now you can start and enable spamassassin-update.timer. etc/systemd/system/spamassassin-update.timer Then create the timer, which will execute the previous service daily: #ExecStart=/usr/bin/vendor_perl/sa-learn -spam # and specify the path to the mailbox that contains spam email(s) # uncomment the following ExecStart line to train SA's bayes filter etc/systemd/system/rvice ĭescription=spamassassin housekeeping stuffĮxecStart=/usr/bin/vendor_perl/sa-compileĮxecStart=!/usr/bin/systemctl -q -no-block try-restart rvice You will want to run this periodically, the best way to do so is by setting up a systemd timer.Ĭreate the following service, which will run these commands: ![]() # sudo -u spamd /usr/bin/vendor_perl/sa-update & sudo -u spamd /usr/bin/vendor_perl/sa-compile Update the SpamAssassin matching patterns and compile them: Go over /etc/mail/spamassassin/local.cf and configure it to your needs. # chmod 700 /etc/mail/spamassassin/sa-update-keys # chown spamd:spamd /etc/mail/spamassassin/sa-update-keys # mkdir /etc/mail/spamassassin/sa-update-keys SpamAssassin is a mail filter to identify spam.Ĭreate a sa-update-keys directory in /etc/mail/spamassassin and change the owner and group: ![]()
0 Comments
Leave a Reply. |