In this post I'll show you how to install an anti-spam smart host relay server, based on Ubuntu 12.04 LTS, that will include:
Postfix w/Bayesian Filtering and Anti-Backscatter (Relay Recipients via look-ahead), Apache2, Mysql, Dnsmasq, MailScanner (Spamassassin, ClamAV, Pyzor, Razor, DCC-Client), Baruwa, SPF Checks, FuzzyOcr, Sanesecurity Signatures, PostGrey, KAM, Scamnailer, FireHOL (Iptables Firewall) and Relay Recipients Script.
Continue reading for the instructions.
Showing posts with label mailscanner. Show all posts
Showing posts with label mailscanner. Show all posts
Tuesday, 4 September 2012
Anti-Spam Email server
Labels:
baruwa,
email,
firehole,
Linux,
mailscanner,
Postfix,
PostGrey,
spamassassin,
Ubuntu
Possibly Related Posts
Thursday, 29 March 2012
Baruwa - Quarantine Release and Preview not Working
If you can't preview or release messages from the baruwa GUI, and allways get an error message saying "Failed: Message not found in the quarantine" in the logs, you might have one of the following problems:
Bad hostname:
Check the hostname listed in "Received by: " which is the hostname field in the messages
table in the DB and see if it corresponds to the host name where the message should be stored and also make sure you can resolve that host name.
The "Received by: " hostname comes from mailscanner which gets the server's hostname at startup so if you change your machine's hostmane you'll have to restart malscanner for it to take effect.
MailScanner Spool folders permissions:
Check the users you are using for the quarantine folder in your MalScanner.conf.
Quarantine user should not be root.
MailScanner Quick.Peek:
check the path for the Quick.Peek executable:
Also, in settings.py check the provided path for the MalSacnner.conf file.
Bad hostname:
Check the hostname listed in "Received by: " which is the hostname field in the messages
table in the DB and see if it corresponds to the host name where the message should be stored and also make sure you can resolve that host name.
The "Received by: " hostname comes from mailscanner which gets the server's hostname at startup so if you change your machine's hostmane you'll have to restart malscanner for it to take effect.
MailScanner Spool folders permissions:
Check the users you are using for the quarantine folder in your MalScanner.conf.
Quarantine user should not be root.
Quarantine User = postfixAnd check the permissions of your spool folders:
Quarantine Group = celeryd
Quarantine Permissions = 0660
Quarantine Whole Message = yes
Quarantine Whole Messages As Queue Files = no
/var/spool/
drwxr-xr-x 5 postfix postfix 4096 Aug 21 03:04 MailScanner
/var/spool/MailScannerAlso, your webserver's user should have access to the quarantine folder, you can add it to the celeryd group in this case.
drwxr-xr-x 10 postfix postfix 4096 Sep 24 19:26 incoming
drwxr-xr-x 10 postfix celeryd 4096 Sep 24 00:00 quarantine
MailScanner Quick.Peek:
check the path for the Quick.Peek executable:
which Quick.Peekand make sure it is correct in the Baruwa's settings.py file.
/usr/sbin/Quick.Peek
Also, in settings.py check the provided path for the MalSacnner.conf file.
Labels:
baruwa,
email,
Linux,
mailscanner
Possibly Related Posts
Thursday, 14 July 2011
How to disable Mailscanner for outgoing email only
You need to use a rules file. If you haven't already got one, modify MailScanner.conf so that
The key here is using To: instead of FromOrTo: to prevent outgoing email from being scanned for spam.
Stop and restart MailScanner after making any changes.
Spam Checks = %rules-dir%/spam.scanning.rulesThen create a file in the rules subdirectory called spam.scanning.rules and add the domains as follows:
To: *@mydomain.com yesThe last one is a catchall to not scan domains that are not listed.
To: *@myotherdomain.com yes
FromOrTo: default no
The key here is using To: instead of FromOrTo: to prevent outgoing email from being scanned for spam.
Stop and restart MailScanner after making any changes.
Labels:
email,
Linux,
mailscanner
Possibly Related Posts
Subscribe to:
Comments (Atom)