![]() Postfix processes the email as necessary and delivers the mail to recipient.MailScanner re queues the email and hands it over back to Postfix.MailScanner swoops in and scans the email in queue.As instructed, Postfix holds the mail upon receipt.Mar 8 03:12:22 centos postfix/qmgr: 0FA2E139C: removed Mar 8 03:12:22 centos MailScanner: Deleted 1 messages from processing-database Mar 8 03:12:22 centos MailScanner: Uninfected: Delivered 1 messages Mar 8 03:12:16 centos MailScanner: Virus and Content Scanning: Starting Mar 8 03:12:16 centos MailScanner: New Batch: Scanning 1 messages, 668 bytes The following log snippet shows the sample activities while a mail is processed by Postfix. # MailScanner -lintĪfter MailScanner has been deployed, the events that take place behind the scenes can be viewed in /var/log/maillog. We can initialize the service.ĭebug MailScanner stats before firing up. SpamAssassin User State Dir = /var/spool/MailScanner/spamassassinĪt this point, MailScanner is ready. # please check /etc/MailScanner/ for more details # Outgoing Queue Dir = /var/spool/postfix/incoming Incoming Queue Dir = /var/spool/postfix/hold Next, the configuration file for MailScanner is backed up and then modified. # chown postfix /var/spool/MailScanner/incoming/* # chown postfix /var/spool/MailScanner/spamassassin # mkdir /var/spool/MailScanner/spamassassin # tar zxvf MailScanner-4.84.Īfter installation, the directories necessary for SpamAssassin are created and permissions are modified. The installation will take some time, so you can take a break if you want. Now we will extract and install the packages. We will download packages from the official MailScanner site and install it. MailScanner is not yet available in CentOS or Repoforge repositories. Header_checks = regexp:/etc/postfix/header_checks MailScanner performs checks on the emails held in a queue. Postfix header_checks is used to hold any incoming email that Postfix receives. Postfix should not auto-start because the MailScanner service will be responsible for invoking Postfix whenever necessary. Postfix is stopped and disabled on start-up. # ln -s /usr/bin/freshclam /usr/local/bin/freshclam # sa-updateįix a path to MailScanner by creating a symbolic link. The following few steps cover how to install and prepare them. Yum can be used to install ClamAV and SpamAssassin as well. # yum install -y yum-utils gcc cpp perl bzip2 zip unrar make patch automake rpm-build perl-Archive-Zip perl-Filesys-Df perl-OLE-Storage_Lite perl-Sys-Hostname-Long perl-Sys-SigAction perl-Net-CIDR perl-DBI perl-MIME-tools perl-DBD-SQLite binutils glibc-devel perl-Filesys-Df zlib zlib-devel wget mlocate The list is long, but fortunately yum can resolve all the dependencies. Yum is used to install packages that are required for MailScanner. It is also necessary to add Repoforge repository on CentOS. Configuring SELinux for MailScanner is beyond the scope of this tutorial. Preparing the Systemīefore we start doing anything, it should be mentioned that SELinux is disabled on CentOS. Installing MailScanner is a lengthy process, but going forward step by step should make the deployment process easy. ![]() If you are interested in setting up this system on Ubuntu, refer to this tutorial instead. The procedure should work on RHEL as well. This tutorial will focus on setting up MailScanner along with Clam Antivirus and SpamAssassin in a CentOS system. It also helps preventing the mail server IP from becoming blacklisted, keeping the mail server records clean. ![]() This makes sure that the mail server does not participate in the distribution of malware and unsolicited spam emails. MailScanner relies on pre-installed anti-virus and anti-spam software to check incoming and outgoing emails for malicious content or patterns of spamming. In the world of mail servers, MailScanner is one of the best open source software for virus scanning and spam detection. How to set up MailScanner, Clam Antivirus and SpamAssassin in CentOS mail server
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |