How to install ASSP 1.x

( ASSP 1.x notes, articles, and installation )

Updated 08 Nov 2019

  • Installation requirements

  • Be sure you have an ASSP Deluxe license for your server , you can get it here
  • If you are not familiar executing console commands please order the installation service here (configuration and/or installation service).
  • Hardware requirements : You can install ASSP 1.9.x in any cPanel server (VPS too) with min. 128 MB RAM . 
    ASSP v1 can handle about max 20-30 parallel SMTP connections and it's good for servers with low email traffic and low/poor Hardware specs.
    If you have a server with good hardware specs (min 6-8 GB total RAM) upgrade to ASSP V2 right after this installation.
    Only ASSP v2 has full SNI, IPv6 (if required) support .
  • firewall tcp port 55555 and 55553 open (inbound and outbound) , required for the ASSP Web interface and Stats
  • firewall tcp port 25,26,465 open (inbound and outbound) , default smtp ports, other smtp ports could be added in post installation.
  • firewall tcp port 125 open (only inbound) 
  • Install ClamAV antivirus
            WHM > cPanel > Manage Plugins 
  • Uninstall any other custom clamAV which was not installed using WHM/cPanel.
  • Deactivate/Remove mailscanner if you are using it (redundant)( how to ).
  • Deactivate/Remove Rvskin anstispam if you are using it  (redundant). 
  • Deactivate/remove any other spam/antivirus solution installed .
  • Spamassassin and boxtrapper must be deactivated from WHM and cPanel theme/skins (recommended).
  • You should have min. 1 domain name listed on WHM (account list)
  • A RedHat, CentOS or Cloudlinux operating System ; all virtual environments are supported (Virtuozzo,Xen,VMware..)

Now you can start the installation . If you are familiar executing console commands and setting cronjobs the installation is easy to be completed and the downtime will be limited to some EXIM/ASSP restart. If you fail some step in the installation please send a message to this email (be sure to include your licensed ip) . At the end of installation you ( or anyone who is installing ASSP for you ) should apply the post installation steps .
The installation is risk free and does not make modifications to your system/OS that hard to remove or even permanent. You can, at any time, choose to fully disable ASSP instantly (returning to EXIM/cPanel way) without uninstalling ASSP .  If you need to uninstall ASSP click  here .

INSTALLATION  (Time required to complete this installation, 20~30 minutes)

[ M2_start ] Only If you need to uninstall correctly mailscanner please read this  

Disable/turn OFF  SpamAssassin
To disable SpamAssassin open your cPanel WHM >> Service Configuration >> Service Manager and uncheck SpamAssassinas shown below


be sure RecentAuthedMailIpTracker ( or the obsolete antirelayd cPanel service ) service is running/enabled as shown below

antispam cpanel

If you are allowing EXIM to listen alternative SMTP ports (i.e. 26 and/or 587 or other SMTP ports) be sure to turn OFF  the alternative port(s) . You can setup the alternative port(s) later using the ASSP Web Interface by following the post installation steps (step 5)

assp deluxe for cPanel 

SAVE settings in your Service Manager .

Now go to WHM/cPanel > Server Configuration > Tweak settings  , click the Mail tab and uncheck (disable) SpamAssassin and boxtrapper as shown below, and save Tweak Settings.

Now click the PHP tab , and select Ioncube as shown in the image below .  Save Tweak Settings (on older cPanel versions you can find ioncube here Server Configuration > Tweak settings > Software  )

Your ASSP works the email BEFORE your MTA/EXIM .

While ASSP run other antispam/antivirus configurations configured in your MTA (exim.conf) could be redundant. For this reason if you have configured/customized your exim.conf to block spam you should reset it .  First create a backup of your current /etc/exim.conf and /etc/exim.conf.localopts in this way

cp /etc/exim.conf /etc/exim.conf_old
cp /etc/exim.conf.localopts /etc/exim.conf.localopts_old

Now open cPanel WHM >> Service Configuration >> then "Exim Configuration Manager ,
then click the "Reset" tab , select "Reset the entire EXIM configuration to the default settings provided with cPanel & WHM", select
"Disable third-party and custom ACLs" and click "Reset" .

dcc razor antispam 


Setting EXIM configuration

WHM/EXIM configuration editor/manager should configured correctly as the link images below based on your cPanel version.
All should be disabled except of the "Validate sender/Sender verification" check . "All disabled" because all these checks could only be redundant while running ASSP ( remember that ASSP spam filtering is executed before your MTA ).

Set your EXIM configuration as per image above (depending on your cPanel version) and click Save .

Now execute following command to check your cPanel internal php version...

/usr/local/cpanel/3rdparty/bin/php-cgi -v

Be sure you have php 5.2.6 or above ( php 7.x with newer cPanel versions ).

Now check if you have ClamAV antivirus installed

clamd --v


/usr/local/cpanel/3rdparty/bin/clamd --v


/usr/sbin/clamd --v

if one of the commands above return ClamAV 0.99.x or above you can continue . If it's not installed you should install or upgrade clamAV using  WHM > cPanel > Manage Plugins . If you are using a custom clamAV installation you should remove it and use only ClamAV provided by WHM/Cpanel.

Ok now you can create the folder /usr/local/assp in this way

mkdir /usr/local/assp

Now get latest ASSP version and the ASSP configuration file in this way

cd /usr/local/assp
wget -r -nH --cut-dirs=10
tar xvzf assp.tar.gz;rm -f assp.tar.gz
chmod 700;chmod 755
wget -r -nH --cut-dirs=10

create ASSP files and folders

cd /usr/local/assp;mkdir pb;cd pb
touch denysmtp.txt;touch exportedextreme.txt;touch
touch pbdb.rbl.db;touch pbdb.white.db
cd /usr/local/assp;mkdir notspam;mkdir spam;mkdir errors
mkdir /usr/local/assp/errors/notspam;mkdir /usr/local/assp/errors/spam
chmod 700 /usr/local/assp/spam;chmod 700 /usr/local/assp/notspam;chmod 700 /usr/local/assp/errors

Now install ASSP service files .

cd /usr/local/assp
wget  -r -nH --cut-dirs=10;chmod 700 start
wget -r -nH --cut-dirs=10;chmod 700 stop
cd /etc/rc.d/init.d

wget -r -nH --cut-dirs=10;chmod 755 assp
cd /usr/local/assp

Now install ASSP Deluxe php scripts in /usr/local/assp/deluxe

cd /usr/local/assp;mkdir deluxe;cd /usr/local/assp/deluxe
ln -s /etc/relayhosts /usr/local/assp/deluxe/relayhosts
wget -r -nH --cut-dirs=10
tar xvzf assp.tar.gz;rm -f assp.tar.gz;chmod 755 *.*;chmod 755 *
chmod 666 *spam_lover;chmod 666 assp_catch_all;chmod 755 /usr/local/assp/

Now download a starter Bayesian database

cd /usr/local/assp
wget -r -nH --cut-dirs=10 -P /usr/local/assp
rm -f /usr/local/assp/spamdb
tar xvzf /usr/local/assp/spamdb.tar.gz -C /usr/local/assp
rm -f /usr/local/assp/spamdb.tar.gz

Checking Perl version . Ok , now return to ssh console and execute following command to check your Perl version...  [ M2_stop ]

ONLY if you plan to upgrade to ASSP V. 2.x immediately after the ASSP 1.x installation, you may skip the perl installation step below and click here to continue .

perl -v

if it returns a not linux-thread-multi perl like this

This is perl, v5.8.8 built for i686-linux

you can continue here , while if it returns a linux-thread-multi perl like this..

This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi

even if your ASSP could work with no problem and you can continue here , it's recommended to install a separate perl for your ASSP whithout linux-thread-multi capabilities. If you want do so, please follow the procedure below to install a custom perl 5.14.1 for your ASSP.

rm -fr /usr/local/perls/;mkdir /usr/local/perls/
cd /usr/local/perls
tar -xzf perl-5.14.1.tar.gz
cd perl-5.14.1
./Configure -des -Dprefix=/usr/local/perls/perl-5.14.1
make test
make install

the perl installation will require about 20 minutes , at the end of perl installation you can check your Perl version

/usr/local/perls/perl-5.14.1/bin/perl -v

now execute this

echo "/usr/local/perls/perl-5.14.1/bin/perl " > /usr/local/assp/deluxe/used_perl

/usr/local/assp/deluxe/used_perl contains the location of your custom perl which will be used by your ASSP v1. In case of you want return to use cPanel internal perl simply delete the file /usr/local/assp/deluxe/used_perl .


WHM ASSP Deluxe for cPanel interface  [ M2_start ] perl_skip
Now you can install the WHM ASSP Deluxe for cPanel interface ; 

cd /usr/local/cpanel/whostmgr/docroot/cgi
wget -r -nH --cut-dirs=10
tar xvzf whm.tar.gz;rm -f whm.tar.gz

Now,  execute following command if you have cPanel version below version 76 ( you can get cPanel version in this way  # /usr/local/cpanel/cpanel -V )

# /usr/local/cpanel/3rdparty/bin/php-cgi /usr/local/assp/deluxe/fix_ioncube.php
# /usr/local/cpanel/3rdparty/bin/php-cgi /usr/local/assp/deluxe/ex_localdomains.php

If you have cPanel version 76 or above execute only this

# /usr/local/cpanel/3rdparty/bin/php-cgi /usr/local/assp/deluxe/ex_localdomains.php

, open your ASSP WHM interface . Open  your WHM/cPanel ,  go down to Plugins menu , and click the Grscripts ASSP Deluxe link
( if you can't see the Grscripts ASSP Deluxe link you need to logout of cPanel/WHM and log back in, or refresh the left frame ).
Click "update ASSP perl modules" .

and force ASSP perl module installation as shown in the image below using the "Click here" red link.

Now you can install the ASSP Deluxe cPanel frontend .
In your ASSP WHM interface go down to Install / Upgrade Center"ASSP Deluxe for cPanel frontend"

Select a supported cPanel theme (x ,x2 , xmail , moonson , bluelagoon, rvskin , x3/x3mail, Lantern, ALL THEMES) or enter a custom cPanel theme then click the "ASSP Deluxe cPanel Frontend" button to install the ASSP Deluxe for Cpanel frontend.

If you receive a message like this you can continue

The web interface for your clients will be installed on /usr/local/cpanel/base/frontend/yourskin/asspdeluxe and you can view the web interface pointing your browser to /usr/local/cpanel/base/frontend/yourskin/asspdeluxe/index.php  ( ).

Be sure to remove/disable spamassassin and boxtrapper everywhere from your control panel and WHM .

If you want customize your ASSP Deluxe for cPanel end-user frontend adding another language pack or if you want change something on the html layout please read here . ( you may do this step later ) .

Only if you have more than one /home location please follow this  now and when you read this
( <= ! return ! <= ) return/continue to this page.

,  return to your ssh console and  execute following commands

# /usr/local/cpanel/3rdparty/bin/php-cgi /usr/local/assp/deluxe/ex_ips.php
# /usr/local/cpanel/3rdparty/bin/php-cgi  /usr/local/assp/deluxe/fix_valiases.php

Now you must set ASSP Deluxe cronjobs ; execute the command below to edit your cronjobs

# crontab -e

and add following cronjobs

10 7 * * * cd /usr/local/assp;perl /usr/local/assp/
*/59 * * * * /usr/local/cpanel/3rdparty/bin/php-cgi /usr/local/assp/deluxe/ex_localdomains.php
*/3 * * * * /usr/local/cpanel/3rdparty/bin/php-cgi /usr/local/assp/deluxe/update_email.php
*/3 * * * * /usr/local/cpanel/3rdparty/bin/php-cgi /usr/local/assp/deluxe/status.php
*/20 * * * * /usr/local/cpanel/3rdparty/bin/php-cgi /usr/local/assp/deluxe/find_abusers.php sw=29 rl=50 sc=30 dc=30 blockpb=yes on=1
0 2 * * * /usr/local/cpanel/3rdparty/bin/php-cgi /usr/local/assp/deluxe/signatures.php
2 */6 * * * /usr/sbin/exiqgrep -o 33600 -i | /usr/bin/xargs /usr/sbin/exim -Mrm


Be sure to enter the rows MAILTO="" and MAILTO=root as shown above.
Every cron executed between MAILTO="" and MAILTO=root will not receive email cron notifications (each time the cron executes).
(!!) If you do not use MAILTO your email queue could be filled with messages (email cron notification) generated by the crons above very fast !
Do not use "> /dev/null" , since it will NOT work with these scripts .

 What are ex_localdomains.php , update_email.php and status.php ?
ex_localdomains.php creates 2 flat files very important to use ASSP on a cPanel server.-
  1. /usr/local/assp/deluxe/assp_local_email with all your local email and forwarders allowed to receive/send email
  2. /usr/local/assp/deluxe/assp_local_domains with all your local domains and subdomains allowed to receive/send email 

update_email.php updates assp_local_email and assp_local_domains each time would be required.

How do they work exactly ?
While ex_localdomains.php creates a new and complete list of email/forwarders/domains/subdomains, the update_email.php file searches new email/forwarders/domains/subdomains and adds them to your current ASSP files assp_local_email  and assp_local_domains.
update_email.php executes in about 0.025 sec. or less so it will not eat/waste cpu cycles (it's much faster than ex_localdomains.php) . There are also checks to run in less than this few time if there is nothing to update.
I suggest you to execute update_email.php each 3 minutes .

ex_localdomains.php must run each hour because update_email.php only adds new email/forwarders/domains/subdomains but does not remove unused (cancelled) domain/subdomain/email/forwarderds from your ASSP local domain/email.

Does these cronjob will waste my cpu ?
No .  All ASSP Deluxe scripts ar coded to use as low cpu as possible.  

a) ex_localdomains.php : you can execute it each hour or above and it extracts about 1000 email/forwarders/domains/subdomains in less than 1 sec. The file checks the server load and it can stop termporarly or definitely if the server is overloaded with other works.

b) update_email.php : also if you execute it each 3 minutes there is no problem since it was coded to use very few cpu . update_email.php executes in about 0.025 sec. or less so it will not eat/waste cpu cycles 

What is status.php ?
status.php check the status of ASSP and restart it in case of failure. You should remove this cron if you want disable assp temporarly.

What is ?
With ASSP can rebuild it's spam database in ASSP v1 only, it should run once a day. You can also execute it from console or from WHM ASSP .

Now get a note of your server hostname , you can get your current server hostname simply executing

# hostname

Now execute following command replacing yourhostname with your hostname .

sed -i 's/' /usr/local/assp/assp.cfg

Now open your WHM/cPanel ,  go down to Plugins menu , and click on the link Grscripts ASSP Deluxe link .
You should see something like this . Click START ASSP to start your ASSP .

ASSP should START succesfully in about 30-60 seconds. ASSP should start to generate an ASSP log too .

You can see your ASSP log executing this

# cd /usr/local/assp/
# tail -f /usr/local/assp/maillog.txt

You should see ASSP processing your email . You may also try to press STOP ASSP in your ASSP WHM INTERFACE, followed after few seconds by START ASSP .

You should see something like this ; in green the lines generated when you STOP ASSP , in brown the rows generated when your START ASSP.

Feb-28-12 11:14:04 Info: removing all SMTP listeners;
Feb-28-12 11:14:04 Saving delaydb;
Feb-28-12 11:14:04 Saving cache records;
Feb-28-12 11:14:04 Saving ldaplistdb;
Feb-28-12 11:14:04 Saving persblackdb;
Feb-28-12 11:14:04 Saving penaltydb (pbdb);
Feb-28-12 11:14:04 Saving whitelistdb;
Feb-28-12 11:14:04 Saving redlistdb;
Feb-28-12 11:14:04 Info: removing all WEB listeners;
Feb-28-12 11:14:04 Terminated by 'KILL -TERM';

Feb-28-12 11:14:56 /usr/local/assp/ version (Perl 5.008008) initializing ;
Feb-28-12 11:14:56 Starting as root;
Feb-28-12 11:14:56 File::Scan::ClamAV module version 1.91 installed and ready;
Feb-28-12 11:14:56 File::Scan::ClamAV modifyClamAV enabled;
Feb-28-12 11:14:56 /usr/local/assp/ running on server: ();
Feb-28-12 11:14:56 Net::LDAP module version 0.44 installed and available;
Feb-28-12 11:14:56 Net::DNS module version 0.68 installed;
Feb-28-12 11:14:56 Email::Valid module version 0.187 installed and available;
Feb-28-12 11:14:56 Email::Send module version 2.198 installed - notification, email-interface, blockreports and resend available;
Feb-28-12 11:14:56 Authen::SASL module version 2.15 installed - SMTP AUTH is available;
Feb-28-12 11:14:56 Mail::SPF module version 2.007002 installed and available;
Feb-28-12 11:14:56 Mail::SRS module version 0.31 installed - Sender Rewriting Scheme available;
Feb-28-12 11:14:56 Compress::Zlib module version 2.049 installed - HTTP compression available;
Feb-28-12 11:14:56 Digest::MD5 module version 2.51 installed - Greylisting/Delaying can use MD5 keys for hashes;
Feb-28-12 11:14:56 Digest::SHA1 module version 2.13 installed - Message-ID tagging (FBMTV) available;
Feb-28-12 11:14:56 File::ReadBackwards module version 1.05 installed - searching of log files enabled;
Feb-28-12 11:14:56 Time::HiRes module version 1.9725 installed - CPU usage statistics available;
Feb-28-12 11:14:56 Sys::Syslog module version 0.29 installed - Unix centralized logging enabled;
Feb-28-12 11:14:56 Tie::RDBM module version 0.73 installed - mysql usage available;
Feb-28-12 11:14:56 Net::IP::Match::Regexp module version 1.01 installed - CIDR notation for IP range available;
Feb-28-12 11:14:56 Net::CIDR::Lite module version 0.21 installed - Hyphenated IP address range available;
Feb-28-12 11:14:56 Net::SenderBase module version 1.01 installed - SenderBase Queries available;
Feb-28-12 11:14:56 LWP::Simple module version 6.00 installed - griplist available;
Feb-28-12 11:14:56 Email::MIME::Modifier module version 1.910 installed - attachments detection available;
Feb-28-12 11:14:56 Net::SMTP module version 2.31 installed - VRFY Recipients available;
Feb-28-12 11:14:56 IO::Socket::SSL module version 1.58 installed;
Feb-28-12 11:14:56 IO::Socket::INET6 module version version 1.58 installed - IPv6 installed and available;
Feb-28-12 11:15:06 Listening for admin HTTPS connections on webAdminPort;
Feb-28-12 11:15:06 Listening for SMTP connections on listenPort;
Feb-28-12 11:15:06 Listening for statistics HTTPS connections on webStatPort;
Feb-28-12 11:15:06 Listening for SMTPS (SSL) connections on listenPortSSL;
Feb-28-12 11:15:06 Listening for additional SMTP connections on listenPort2;
Feb-28-12 11:15:06 ASSP restart will be done with AutoRestartCmd: /etc/rc.d/init.d/assp stop; sleep 5; /etc/rc.d/init.d/assp start;
Feb-28-12 11:15:10 Info: RebuildSchedule for is 0:00;
Feb-28-12 11:15:10 Running in directory /usr/local/assp on host;

 What does happen when I click START ASSP ?
When you click "START ASSP" , your /etc/exim.conf.local file will be configured with following lines

local_interfaces =
daemon_smtp_ports = 125

which allows ASSP to proxy email to EXIM. After this step EXIM and ASSP are started so that ASSP can start to process email.
What does happen when I click STOP ASSP ?

If your ASSP is running and you click "STOP ASSP" , ASSP is temporarly stopped however note that the daemon_smtp_ports in EXIM is still active.It will be underlined by the warning below. At this point you can START ASSP or..

... only if you want fully disable ASSP and return to normal cPanel usage (only EXIM) you should click the "click HERE" button in the image above. ASSP Deluxe will remove following lines from your /etc/exim.conf.local  file

local_interfaces =
daemon_smtp_ports = 125

and will fully disconnect ASSP from EXIM, returning to normal cPanel usage (only EXIM)  .

If all works fine and you can see ASSP processing email in your ASSP LOG you can now check if also EXIM is working fine.

# tail -f /var/log/exim_mainlog

If email are processed with a final "Completed" message like this ...

2008-11-13 11:25:20 1Irs1F-0000vx-9U -> R=lookuphost T=remote_smtp [] X=TLSv1:AES256-SHA:256
2008-11-13 11:26:30 1Irs1F-0000vx-9U Completed

In your EXIM maillog you may see "unexpected disconnection while reading SMTP command" lines , it's a normal behavior , ASSP is disconnecting from EXIM because the email was blocked due to spam (email dictionary attack or any other reason) .

Finally you may try opening the ASSP WEB INTERFACE . Open your ASSP WHM INTERFACE and click ASSP WEB INTERFACE (port :55555).
If it does not open it means you have the TCP ports 55553/55555 blocked. You can login in your ASSP Web interface using

username : assp
password : nospam4me

Your ASSP Web interface should open similar to the image below

You can change the ASSP password now, go down to menu "Administration Interface"  menu > Web Admin Password (webAdminPassword)

Enter a new password in webAdminPassword , go down and click "Apply changes"

If the new password works you may close the ASSP Web Interface for now .

Now to TERMINATE your installation correctly you must configure your ASSP by applying the post installation STEPS . IF YOU DO NO APPLY THE POST INSTALLATION STEPS YOUR INSTALLATION WILL NOT BE COMPLETE.

[ M2_stop ]

ASSP 1.x / 2.x  uninstallation _

Uninstalling ASSP : Time required : 5 minutes   (#01)

Uninstallation requires about 5 minutes . Note that if you had/have a temporarly ASSP problem there is no need to uninstall it , simply follow this procedure if you want fully disable it without uninstallling it. 

If you want really uninstall it, follow this procedure ; please follow the procedure carefully , if you skip some step you will be forced to reinstall it.

If you are using ASSP WHM interface 6.0 or above please follow the step A) and continue following step C).
If you are using ASSP WHM interface 5.x or below please follow the step B) and continue following step C)..

Step A)  Only if you are using ASSP SSL open your ASSP WHM INTERFACE, select the SSL MENU and disable the "TLS native support".
using your ASSP WHM interface . You will receive this message

Press "click HERE" as shown in the image above.

Step B)
  STOP ASSP using your ASSP WHM Interface .

If you have a cPanel version older than WHM/cPanel 11.30
Open cPanel WHM , go to "Service Configuration" , then "Exim Configuration Editor" , and click on "RESET ALL CONFIGS TO DEFAULT" .

If you have WHM/cPanel 11.30
Open cPanel WHM , go to "Service Configuration" , then "Exim Configuration Editor" ,
then "Advanced editor" ; now go down and click  "RESET ALL CONFIGS TO DEFAULT"  .  

If you have WHM/cPanel 11.32 or above versions
Open cPanel WHM , go to "Service Configuration" , then "Exim Configuration Manager" ,
then click the "Reset" tab , and select "Reset the entire EXIM configuration to the default settings provided with cPanel & WHM" , select also
"Disable third-party and custom ACLs" and click "Reset" .

step C) Now execute

replace 'SMTPPORT = 125' '' -- /usr/local/cpanel/3rdparty/mailman/Mailman/

Now uninstall ASSP Deluxe for cPanel frontend from your cPanel themes, you can use the ASSP WHM Interface .
Go to Install / Upgrade Center ,  ASSP Deluxe for cPanel frontend , select the theme and check Uninstall

Now remove the ASSP WHM interface in this way

rm -f /usr/local/cpanel/whostmgr/docroot/cgi/addon_assp_deluxe.php
rm -f /usr/local/cpanel/whostmgr/docroot/cgi/assp_deluxe*
rm -frd /usr/local/cpanel/whostmgr/docroot/cgi/deluxe
/usr/local/cpanel/bin/unregister_appconfig ASSP_Deluxe

Now remove fully ASSP in this way

rm -frd /usr/local/assp
chkconfig --del assp

now remove all cronjobs required by ASSP and ASSP deluxe ( crontab -e ) .

If you was using spamd and boxtrapper re-enable them using WHM/cPanel.
If you was using an alternative exim port in your WHM/services , re-enable it.

If you was using ASSP 2.x with a custom perl or ASSP 1.x with a custom perl,
you may remove your custom perl and plugins located here /usr/local/perls

rm -fr /usr/local/perls

Now restore your exim.conf and /etc/exim.conf.localopts

cp /etc/exim.conf_old /etc/exim.conf
cp /etc/exim.conf.localopts_old /etc/exim.conf.localopts

Now rebuild your exim.conf and restart exim


Now execute/force a cPanel update with

/scripts/upcp --force

Now execute this to fix possible mail errors ( step recommended by )


ASSP Deluxe for cPanel is now fully uninstalled.