What Is MailScanner?
MailScanner is an e-mail security and anti-spam package for mail servers.
Installation and Upgrade Instructions
If the cPanel Clamavconnector is installed (WHM > cPanel > Manage Plugins) remove it - this plugin is *not* compatible with MailScanner. To do this from the command line:
/usr/local/cpanel/scripts/check_cpanel_rpms --fix --targets=clamav
Next download and install MailScanner.
cd /usr/local/src wget https://download.configserver.com/msinstall.tar.gz tar -xzf msinstall.tar.gz cd msinstall/ sh install.sh
If you are performing a new installation, select option 1. If you are performing an upgrade, select option 1. If you are performing a upgrade and want to skip the full perl module installation, take option 2.
Next you will need to disable the following options in WHM:
WHM > Tweak Settings > Set "Enable Apache SpamAssassin™ spam filter" and "Enable BoxTrapper spam trap" to Off. WHM > Service Manager > Uncheck both boxes for "Apache SpamAssassin™" and click "Save" Packages > Feature Manager > Edit the feature list "disabled" and uncheck "Apache SpamAssassin™" and "Apache SpamAssassin™ Spam Box"
Create /scripts/postupcp (or add the perl line if this file already exists) with the following contents:
#!/bin/sh perl /usr/mscpanel/mscheck.pl
Set the correct permissions on /scripts/postupcp
chmod 700 /scripts/postupcp
Configure MailScanner to scan local domains. There is a script to synchronize the MailScanner installation with the /etc/localdomains file.
/usr/bin/perl /usr/mscpanel/mscpanel.pl -i
You can then check the files in /usr/mailscanner/etc/rules/*.rules and modify them if desired. There are instructions and examples in the README and EXAMPLES files in that directory.
Create a cron job to run this automatically.
echo "0 0 * * * perl /usr/mscpanel/mscpanel.pl > /dev/null 2>&1" >> /var/spool/cron/root
MailScanner can be configured by editing the file /usr/mailscanner/etc/MailScanner.conf. There are detailed explanations and instructions in that file. Restart MailScanner after making modifications to this file.
service MailScanner restart
Once installed you will also need to register the the MailScanner addon with AppConfig
Insert the following content into the mailscanner.conf file created above.
- Service that will serve this app
- Physical path: /usr/local/cpanel/3rdparty/Foo.php
- Literal URL path: $server:$port/$cpsession/3rdparty/Foo.php
- System user to run process as
- Required acls
- Display name as show in the service ui
Register the app: