![]() |
Mailbox Spam Folder / Spam Training / Spam Filter / Mark as Junk - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Contributions Area (/forum-40.html) +--- Forum: Howtos (/forum-41.html) +--- Thread: Mailbox Spam Folder / Spam Training / Spam Filter / Mark as Junk (/thread-15977.html) |
Mailbox Spam Folder / Spam Training / Spam Filter / Mark as Junk - NewtonPasqualini - 04-13-2012 06:11 AM Hi there ![]() So it is a How To make it all together with the STOCK ispCP 1.0.6 I did not update to 1.0.7 yet by problems in ispCP 1.0.7 over RHEL 5 setup. So, I am using CentOS 5.8, be sure to have installed RPMForge Repo. First of all, install maildrop, we need to replace the virtual_transport at postfix from virtual to maildrop! Portfix "virtual" process donnot support filters, thats why we are moving to maildrop virtual transport. To install maildrop, first of all do: Code: yum install -y pcre pcre-devel After that, download maildrop at: http://sourceforge.net/projects/courier/files/maildrop/2.5.5/maildrop-2.5.5.tar.bz2/download then: Code: tar xjvf maildrop* Create the file /etc/maildroprc with the contents: Code: # commands and variables for making the mail directories All done with maildrop! Now you should take Amavis-New, Clamav and SpamAssassin running. Just update the virus database before running: Code: freshclam Code: service spamassassin start To run amavis and spamassassin in postfix check in the /etc/postfix/master.cf if this exists: Code: amavis unix - - n - 2 lmtp So you need this in /etc/postfix/master.cf if you donnot have yet. Again you need amavis as your mailfilter to score and tag the spam/virus messages, check now at /etc/postfix/main.cf: Code: content_filter = amavis:[127.0.0.1]:10024 Remove the "virtual_transport" directive at /etc/postfix/main.cf and place this: Code: maildrop_destination_recipient_limit = 1 Ok, now you can restart postfix process: Code: service postfix restart All done! If you are using "Roundcube Webmail", there is a plugin named "markasjunk", enable that plugin and setup SpamAssassin Bayes. First create some cronjobs like: Code: 0 */1 * * * /usr/bin/sa-learn --ham /var/mail/virtual/*/*/cur/* &> /dev/null Then add to your /etc/mail/spamassassin/local.cf: Code: use_bayes 1 Now you have a strong SPAM filter that learn what is SPAM with user reports!!! |