In today’s digital age, spam and virus emails are a common source of problems for individuals and organizations alike. Fortunately, tools like Spamav.com can help mitigate these issues. In this blog post, we will discuss how to turn on spam and virus scanning, how procmail works with spam and virus filtering, and how to reduce CPU load with Clamd.
Turning On Spam and Virus Scanning
To enable filtering for a new or existing virtual server, you need to select the Spam filtering enabled? and Virus filtering enabled? checkboxes in the features section of the Create or Edit Virtual Server page. If they do not appear, ensure that these features are enabled globally on your system. This can be done by logging in as root, opening the System Settings category on the left menu, and clicking on Features and Plugins. Next, check the boxes next to Spam filtering and Virus filtering. Click Save, and if you see any error messages about SpamAssassin or ClamAV not being installed, install their packages on your system first.
Spam and Virus Filtering and Procmail
Virtualmin internally creates a /etc/procmailrc file that runs a Procmail include file under /etc/webmin/virtual-server/procmail, depending on the domain to which each email received is delivered. The spamassassin and clamscan commands are then executed, and the output determines whether or not email should be delivered to a specific folder or deleted. SpamAssassin is run with command-line parameters that tell it to use configuration files under /etc/webmin/virtual-server/spam, which can be different for each domain. This way, domain owners can customize their SpamAssassin rules, spam levels, and message modification settings.
Reducing CPU Load with Clamd
In the default Virtualmin configuration, each email received is processed with the clamscan command to check if it contains viruses. Unfortunately, this can take a lot of time and CPU resources, particularly on VPS systems that have limited IO bandwidth or CPU resources. To reduce CPU load with Clamd, you need to follow some steps. Firstly, login to Virtualmin as root and open the Email Messages category on the left menu, and click on Spam and Virus Scanning. At the bottom of the page, you should see a button labeled Enable ClamAV Server, click it. If the button isn’t visible, this means that Virtualmin doesn’t know how to configure clamd on your operating system, and you will need to do it manually. After clicking, check the messages that appear to ensure no errors were reported. If all went well, return to the Spam and Virus Scanning page. Change the Virus scanning program to Server scanner (clamdscan), and click Save. Virtualmin will check if clamd and clamdscan are working correctly, and if so, configure all virtual servers to use it for virus classification from now on.
We hope this blog post has helped you understand how to turn on spam and virus scanning, how procmail works with spam and virus filtering, and how to reduce CPU load with Clamd. By implementing these measures, you can ensure your emails are secure and free from spam and viruses.