From Atomicorp Wiki
Jump to: navigation, search


[edit] Overview

qmail-scanner is a qmail addon that can tie spamassassin, clamav and other tools into qmail to scan incoming and outgoing email for spam, viruses, phishing scams, and so on.

[edit] Installing qmail-scanner

Run this command as root:

 yum install qmail-scanner

[edit] Implementation Considerations

Scanning email for spam and viruses, no matter what method you use, is CPU intensive. If you have a high volume of email, the amount of resources your system will need to use will increase. Because its difficult if not impossible to control the amount of email that come into a system, even if its just the legitmate email, its also difficult to ensure that when large amounts of email come in that this will not slow the system down.

It is therefore standard practice to do virus and spam scanning on a dedicated system just for the purpose. This ensures that when large batches of email have to be processed, that this will not slow down other processes on the system, such as websites or databases, nor will those websites and other processes potentially slow down incoming mail.

Therefore, we recommend you setup a dedicated systems for this purpose, and that you use our Project Gamera package which will setup your system to act as spam/virus firewall for your mail servers. Please see the Project Gamera wiki page fore details and installation instructions.

[edit] Updating qmail-scanner

Changes made to qmail-scanner-queue.pl go into effect immediately, no restarts are required.

[edit] Adding disclaimers to mail

You can do it, it involves creating a text, or html file with the disclaimer text, and a regular expression for the domains to apply it to. Note: Altering email bodies like this is considered not very nice, and can break some peoples clients. You have been warned!

1) make sure altermime is installed

yum install altermime

2) Run qmail-scanner-reconfigure, this detects altermime and enables it


3) Create disclaimer files in /var/spool/qscan


3) Edit /var/qmail/bin/qmail-scanner-queue.pl change the following entries for your regex, and disclaimer text and/or html files

my $altermime_text='text_disclaimer.txt';
my $altermime_html='html_disclaimer.html';
my $disclaimer_regex = 'exampledomain.com';

[edit] uninstalling qmail-scanner

Run this command as root:

 yum remove qmail-scanner
Personal tools