Showing posts with label mailscanner. Show all posts
Showing posts with label mailscanner. Show all posts

Tuesday, 4 September 2012

Anti-Spam Email server

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.

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.
Quarantine User = postfix
Quarantine Group = celeryd
Quarantine Permissions = 0660
Quarantine Whole Message = yes
Quarantine Whole Messages As Queue Files = no
And check the permissions of your spool folders:
/var/spool/
drwxr-xr-x 5 postfix postfix 4096 Aug 21 03:04 MailScanner
/var/spool/MailScanner
drwxr-xr-x 10 postfix postfix 4096 Sep 24 19:26 incoming
drwxr-xr-x 10 postfix celeryd 4096 Sep 24 00:00 quarantine
Also, your webserver's user should have access to the quarantine folder, you can add it to the celeryd group in this case.

MailScanner Quick.Peek:

check the path for the Quick.Peek executable:
which Quick.Peek
/usr/sbin/Quick.Peek
and make sure it is correct in the Baruwa's settings.py file.
Also, in settings.py check the provided path for the MalSacnner.conf file.

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
Spam Checks = %rules-dir%/spam.scanning.rules
Then create a file in the rules subdirectory called spam.scanning.rules and add the domains as follows:
To: *@mydomain.com yes
To: *@myotherdomain.com yes
FromOrTo: default no
The last one is a catchall to not scan domains that are not listed.

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.

Possibly Related Posts