Skip to main content

How to Install MailScanner Stable v5.2.1-1 Email Security System on CentOS 7 with CWP Server ?

MailScanner is a highly respected open source email security system design for Linux-based email gateways. It is used at over 40,000 sites around the world, protecting top government departments, commercial corporations and educational institutions. This technology has fast become the standard email solution at many ISP sites for virus protection and spam filtering.

MailScanner scans email for viruses, spam, phishing, malware, and other attacks against security vulnerabilities and plays a major part in the security of a network.
Install MailScanner
First stop and disable postfix. We will use MailScanner in the future.
# systemctl stop postfix
# systemctl disable postfix
Download MailScanner and install:
# cd /usr/local/src/
# git clone
# cd v5
# cd builds
# rpm -ivh MailScanner-5.2.2-1.rhel.noarch.rpm
# /usr/sbin/ms-configure
1. Hit Enter to start
2. Intsall an MTA? [1] : N
3. Install EPEL? : n
4. Install missing tnef via RPM? : Y
5. Install missing unrar via RPM? : n
6. Install missing perl module via CPAN? : Y
7. Install these missing items via RPM? : Y
8. Set permissive mode for SELinux : n
9. Specify a RAMDSIK size? [0]: 4096
10. Do you wish to install the Sendmail::Milter interface? : no
Because it was previously installed 
11. Finally It is installed successfully and you will get the below details 
Preparing MailScanner ...
Creating the ramdisk ...

Enabling ramdisk sync ...

Initial configuration and module installation complete

See for more information and
support via the MailScanner mailing list.

To finish configuring MailScanner, edit the following files:


To activate MailScanner run the following commands:

--SysV Init--
chkconfig mailscanner on
service mailscanner start

systemctl enable mailscanner.service
systemctl start mailscanner.service

To activate Sendmail for Mailscanner (if in use) run the following commands:

--SysV Init--
chkconfig sendmail off
chkconfig sm-client off
chkconfig ms-sendmail on
service ms-sendmail start

systemctl disable sendmail.service
systemctl disable sm-client.service
systemctl enable ms-sendmail.service
systemctl start ms-sendmail.service

To activate MSMilter for Mailscanner (if in use) run the following commands:

--SysV Init--
chkconfig msmilter on
service msmilter start

systemctl enable msmilter.service
systemctl start msmilter.service
MailScanner Official: