How To Install Mailscanner On Cpanel Server

mailscanner cpanel hosting

mailscanner cpanel hosting


  1. If you have the cPanel Clamavconnector installed (WHM > Add-on Modules) remove it – it will break MailScanner
  2. Login to your root account on your server via SSH
  3. Download the package, expand it and go into it:
  4.  wget
  5.  tar -xzf msinstall.tar.gz
  6.  cd msinstall
  7. Follow the instructions in the README.txt and INSTALL.txt files in the package
  8. Please note that the script currently is configured to download the latest MailScanner at the time of writing. If you want a different version, edit and modify the $mailscanner variable appropriately
  9. Once installed/upgraded/uninstalled make sure that both MailScanner is running correctly and that exim is sending and receiving emails (you should use 2 separate SSH windows to do this): tail -f /var/log/maillog tail -f /var/log/exim_mainlog


1. Remove MailScanner and the MailScanner Front-End:

cd /usr/mscpanel

cd /root
tar -xzf msinstall.tar.gz
cd msinstall/

2. To remove the MailScanner Configuration icon from cPanel, go to WHM > Packages > Feature Manager. Edit the “disabled” Feature List and uncheck the box for MailScanner Configuration. 3. Remove the root cron jobs that run and (or rules_du_jour):

crontab -e

4. Remove the following lines from /scripts/postupcp:

perl /usr/mscpanel/

5. Reset Exim Configuration (if desired), in WHM > Exim Configuration Editor > Reset All Configs to Defaults. 6. If you want to re-enable SpamAssassin through cPanel: WHM > Tweak Settings > SpamAssassin > tick WHM > Service Manager > spamd > tick both boxes WHM > Feature Manager > Edit a Feature List > disabled > Edit > SpamAssassin and SpamAssassin Spam Box > tick WHM > Feature Manager > Edit Feature List – edit any feature lists that you want to allow access to the SpamAssassin configuration in cPanel

Temporarly Disable/Enable Mailscanner

 in Cpanel server

The simplest way to disable it is to do the following:

rm -fv /etc/exim_outgoing.conf
service exim restart

MailScanner will still be running, but won’t be involved in email delivery. If you also want to stop it running, go to WHM > Service Configuration > Service Manager and uncheck both boxes for MailScanner. Then login via SSH and do:

service MailScanner stop

You do need to do the first steps above to disable MailScanner before stopping the service, otherwise no mail will be delivered at all. Important: Before disabling MailScanner, you should check to see if there are any mails waiting to be processed by MailScanner. If there are and you disable MailScanner, the waiting emails will not be processed by exim until MailScanner is re-enabled. To find out if there are mails waiting (do thisbefore disabling MailScanner), in root SSH enter:

exim -bpc

You can contact us via the helpdesk if you need help after you’ve disabled MailScanner. To re-enable it:

touch /etc/exim_outgoing.conf
service exim restart

How To Install PHP on Windows/IIS via Web Platform Install

php on web platform installer

php on web platform installer

Over the years PHP has gotten better and better running on Windows and IIS. The latest version of PHP for Windows includes dramatic improvements that come from a deep collaboration between the PHP Core Maintainers and Microsoft.

If you want to easily install PHP on Windows, you can use the newly released Microsoft Web Platform Installer to get the public community version of PHP ((VC6 x86 non thread safe installer build) on Windows XP/Vista/Server 2003/Server 2008/Win 2012/Win7 with IIS and the Microsoft Web Platform. The Windows Installer for PHP also automatically configures IIS FastCGI as part of its setup.

To install PHP using Web Platform Installer:

  1. Install the Web Platform Installer if you don’t have it already from here.
  2. Go to the Web Platform tab under All Programs.
  3. Click on textbox in top right corner and search for PHP
  4. Click Add and then Instal
  5. The next page will request dependencies be install. Accept all and finish the installation
  6. We recommend you install wincache and PHP manager aswell. Wincache is used to speed up load times of websites and PHP manager makes it easier to manage the PHP.ini file.
  7. Next we will discuss how to optimize FCGI for PHP in IIS 7.

How to setup FastCGI Settings for Shared Hosting


There are tons of articles on how to optimize FastCGI setup. Yet, all of them talk about settings for a single site. The situation is much different in shared web hosting, where there are hundreds of sites running. Understanding & optimizing mod_fcgid settings can make a difference between fast and stable PHP hosting and frequent 503 & 500 errors. Unlike suPHP that executes new PHP process for each request, FCGID starts a bunch of processes per customer, and re-uses them for each PHP request.

mod_fcgid is an option in majority of hosting control panels, yet most of the control panels don’t alter default settings. And the default settings in mod_fcgid are made for a single site. You can find more info on mod_fcgid settings here:

When setting up mod_fcgid, you should care about several configuration options:
FcgidMinProcessesPerClass — should always be 0
“PerClass” means per user in shared hosting, and 0 means that there might be no processes for a particular user, if that user is not active.
FcgidMaxProcessesPerClass — default 100, this means that a single customer can have 100 php requests served at the same time. Which in turn means there will be 100 PHP processes just for that user. This is way to high for shared hosting. I would recommend values anywhere from 8 to 20. Note: if more requests comes in at the same time, they will be queued, and not rejected.
FcgidMaxProcesses — this is the total number of processes FCGID will start, for all users. That is what will prevent OOM issues. The more RAM you have, the higher you can set the value.
If you set this value too low, you will get 500 errors, as FCGID will not be able to create new processes to serve requests. This value also depends on the size of PHP processes (which in turn depends on extensions that you have enabled for PHP) as the larger the process the faster you will him OOM. You can try playing with following numbers depending on your RAM: 8GB — about 150, 16GB – 300
Also, make sure you monitor apache error logs. If you see “can’t apply process slot for error” — it means you are hitting FcgidMaxProcesses
FcgidIdleTimeout — default 300, number of seconds process would stay idle until it gets killed. The higher the number, the lower CPU usage, and the higher the chance of hitting FcgidMaxProcesses limit (as processes live longer). I would recommend putting it at 60 at first
FcgidIdleScanInterval — this should be adjusted as well, to about a half of what FcgidIdleTimeout is set.
FcgidProcessLifeTime: default – 1 hour, should be — anywhere from 120 seconds to 300 seconds (double idle time). It is there to make sure that processes do get killed after some time, if they are not busy (even for short periods of time).
The shorter idle timeout/process life time, the less chance that you will hit FcgidMaxProcesses limit, but the more load you will put on the system.

Most values can be same from server to server, but you might want to change FcgidMaxProcesses depending on the amount of RAM you have.

Example FCGID settings for shared hosts:
FcgidMinProcessesPerClass 0
FcgidMaxProcessesPerClass 8
FcgidMaxProcesses 150
FcgidIdleTimeout 60
FcgidProcessLifeTime 120
FcgidIdleScanInterval 30

This article was written by CloudLinux. Please view their website at