How to upgrade to ASSP 2.x

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

Updated 14 June 2019

Latest versions of ASSP WHM and ASSP Deluxe supports usage of ASSP 2.x and above versions using the upgrade instructions below . Before starting execute a backup of your /usr/local/assp folder because if something will go wrong you should remove /usr/local/assp folder and restore ASSP 1.x . ASSP 2.x with ASSP Deluxe for cPanel was tested in various productions server and there should not be issues if you follow the upgrade instructions below very carefully.
ASSP 2.x support in ASSP Deluxe for cPanel is currently available only as an upgrade of ASSP 1.x .
Such as in ASSP 1.x, by installing and running version 2.x you could not mess your server in any way, it run in /usr/local/assp and it can be uninstalled or fully disabled if required.

Should I upgrade to ASSP 2.x ?

ASSP v1 is EOL, however if you have no problems using ASSP 1.x ( all spam blocked, no issues at all ), you may continue to use it . ASSP 1.x will continue to be supported in ASSP Deluxe for low hardware resources servers and for low/medium email traffic.

If you have a server with good harware resources (multicore with 8GB RAM or above), if you need addictional antispam features and better antispam performance than ASSP 1.x, if your server receives huge daily email traffic , yes you have very good reasons to upgrade to ASSP 2.x

ASSP 2.x UNinstallation can be found here .



"ASSP" is the Anti Spam Smtp Proxy server which includes the ASSP Web interface. "ASSP Deluxe for cPanel" is the ASSP frontend/integration for cPanel , it's a set of php scripts to use/install/configure ASSP on your cPanel server plus various plugin scripts (i.e. spambox piping, spam finder..).

1) If you see a problem in ASSP WHM interface or in ASSP Deluxe cPanel frontend send an email by clickling  >> HERE <<

2) The recommended assp.cfg parameters will be applied when you will upgrade to ASSP 2.x.
    All parameters controlled by Deluxe are listed in
If you would suggest a different ASSP configuration for one or more ASSP parameters send an email >> HERE <<

3) If your question is strictly related to ASSP 2.x and ASSP 2.x Web Interface please DO NOT contact me.
    Be sure you have read carefully the documentation included in ASSP Web Interface, and if you can't find a solution,
    please use the ASSP 2.x forum (you should be registered at ).
    When you start/open a new forum TOPIC please specify your problem and only your ASSP version, the ASSP community has NO IDEA about cPanel and/or "ASSP Deluxe for cPanel".

4) if your problem is not included in the 3 steps above, please DO NOT contact me, thank you.


Why ASSP 2.x

Multi-threaded Workers allowing to process high SMTP traffic
MySQL fully supported ( switch automatically to flat files if MySQL goes off ).

Bayesian and Hidden Markov Model (HMM) spam detection engine (compared to the Bayesian option, the HMM Model will produce results that are much more exact)
Private whitelist/blacklists per domain
(legacy, domain based, user based)
newReportedInterval : spam/notspam reports are used to immediately update the Spamdb and HMMdb
Plugins: archive, full attachment check and replacement, OCR
Razor2 and DCC support via Plugin
word stemming (several languages) for Bayesian analyzer
CPU affinity settings
New and improved GUI
and various new configuration possibilities.

New features in your ASSP WHM interface : after upgrading to ASSP 2.x in your ASSP WHM you will see new features to control your ASSP 2.x .

ASSP 2.x upgrade requirements

     You must have a working  and updated ASSP 1.9.9 (13344 or above) installation with post installation steps applied . ASSP 2.x support in ASSP Deluxe for cPanel is currently available only as an upgrade of ASSP 1.x .

     A good experience with ASSP 1.x (managing ASSP web interface, ASSP WHM interface and so on) is optional and recommended.

     ASSP 2.x version is recommended for IT professionals considering the huge amount of features,
     usage possibilities and plugins included in version 2.x. If you found difficult configuring ASSP 1.x , do not upgrade to ASSP 2.x. or you may consider ASSP managed service .

     Hardware requirements :
In a cPanel enviroment Min. 8 GB total RAM (more is better), multicore server.
If you can't satisfy these specs DO NOT RUN/INSTALL ASSP 2.x .

     Be sure you have  /dev/shm  partition mounted. ASSP Deluxe for cPanel will use a little portion of your /dev/shm
     creating 2 folders  /dev/shm/assp/tmpDB/ and /dev/shm/assp/sl-cache . It will be required to optimize rebuildspamdb and ASSP cache performance.

     ASSP will use at least 2-3 GB in /usr/local/assp folder be sure you have enough free space in your /usr partition.
     If you can't satisfy this DO NOT RUN/INSTALL ASSP 2.x .

     A local MySQL database . ASSP 2.x uses MySQL . In case of MySQL failure ASSP 2.x will switch automatically to flat files . 
     Recommended MySQL version is MariaDB 12.x or above version ( or latest available MySQL version ).

     If you are using an ip different from in your ASSP WHM ( ASSP Deluxe for cPanel Advanced tools ) ,  revert it to as shown below. If you would a different ip to send email use this cPanel/EXIM solution instead .

     If you are using this solution in your ASSP 1.x ( bypass ASSP for one or more ASSP listen ports ) revert it back  before upgrading. You may enable it again after the upgrade .

    Be sure ASSP Deluxe for cPanel , ASSP WHM , and ASSP Deluxe frontend are updated to latest version.

    Be sure you read the ASSP 2.x support policy above , if you do not accept it DO NOT RUN/INSTALL ASSP 2.x .

    Installation of some optional ASSP V.2 plugin is not supported. ASSP plugins requires binaries installation which could be different in your OS , you are responsible to install them. Please ask support in ASSP forum or mailing list in case you need help to install ASSP 2.x plugins, if you do not accept this, DO NOT RUN/INSTALL ASSP 2.x .


Important changes between 1.x and 2.x

After update by default whitelist will be set to "Domain and private" ( in ASSP 1.x whitelist was/is global ).
If a local user adds an email address to the whitelist ( using assp-white@ i.e. ) the email address is automaticaly whitelisted for all other local users in the same local domain ( and no more globally such as in ASSP 1.x ) .

If you would you can change this setting , first open ASSP WHM > Automation settings and disable WhitelistPrivacyLevel , then change the status of WhitelistPrivacyLevel using ASSP web interface : whitelist menu : PrivacyLevel of the Whitelist (WhitelistPrivacyLevel)  .

To reduce RAM usage and optimize ASSP 2.x performance MySQL usage is strongly recommended. In case of MySQL failure ASSP will switch to flat files automatically (as alternative you may use BerkeleyDB instead of MySQL) .
Recommended MySQL version is MariaDB 12.x or above version ( or latest available MySQL version ).

rebuildspam (script to build Bayesian and HMM database) is now executed using an ASSP worker ( no more using such as in ASSP v1 !) .
rebuildspam  can be executed from your ASSP WHM interface or ASSP web interface too . If you would execute rebuildspam from console you should execute this

echo "RunTask RunRebuildNow" > /usr/local/assp/cmdqueue

After few seconds your rebuildspam will start . You can find more details in /usr/local/assp/cmdqueue_example.txt
If you would see how works rebuildspam create a rebuilddebug.txt file and tail it when you execute a rebuildspam using cmdqueue

touch /usr/local/assp/rebuilddebug.txt
tail -f /usr/local/assp/rebuilddebug.txt

remove the file when you terminated to debug your rebuildspamdb

rm -f /usr/local/assp/rebuilddebug.txt

New login/authentication
After upgrading you can login in your 2.x ASSP Web Interface using your old ASSP 1.x password but only using the username root , the username "assp" will not be accepted (such as in ASSP 1.x) . 
Always use the "logoff"-button as root to terminate the ASSP Web interface session otherwise no other admin/user will be able to open the ASSP Web interface!

You can now upgrade your ASSP 1.9.9 to ASSP 2.x, by following the HOW TO below

If you would use my professional update service please click here to order ($25.00). However please be sure you have all the requirements explained above before ordering the upgrade service.

If something goes wrong with upgrade (it should not if you follow the upgrade carefully) you should remove /usr/local/assp folder and reinstall ASSP 1.x  . Or you can first create a backup of ASSP 1.x (your current /usr/local/assp folder) and restore it in case of you will have issues running ASSP 2.x .


ASSP 1.x to 2.x HOW TO

First create this file , this will allow you the upgrade to 2.x using ASSP WHM

touch /usr/local/assp/deluxe/upgrade2
chmod 444 /usr/local/assp/deluxe/upgrade2

Now open your ASSP WHM interface and upgrade ASSP WHM and ASSP Deluxe and Frontend to latest version .

Now STOP your ASSP 1.x using your ASSP WHM . You should simply first click ASSP STOP in your ASSP WHM

You will receive the message above. Now click the "click HERE"  link , and ASSP 1.x will be fully disabled
and EXIM will be unproxied from ASSP , normal cPanel usage with ASSP disabled.
You should have a message like this below .

# installling a linux-thread-multi Perl
ASSP 2.x requires a linux-thread-multi perl . Even if it can work with preinstalled cPanel perl ( with some limitations ), you can have better performance installing a separate perl , latest recommended perl for ASSP v2 is 5.26.1. You can remove this custom perl in case of you'll decide to uninstall ASSP .

Open ssh console as root ; you can install your custom perl linux-thread-multi by following this procedure . Current recommended Perl version is perl 5.26.1  .

Centos 7.x note
If you are installing ASSP v2 in Centos 7 or above, you should already have perl linux-thread-multi .
Even if you may run your ASSP using the existent cPanel Perl I recommend you to install a custom perl (using the procedure below) which will allow you a better plugin and Perl module compatibility .

Note : the first red row below will remove the old custom perl folder ( IF you already installed a custom perl for ASSP 1.9.9 ); if you would you can preserve the old custom perl by skipping the 2 red rows below.

rm -fr /usr/local/perls/
kdir /usr/local/perls/
cd /usr/local/perls
tar -xzf perl-5.26.1.tar.gz
cd perl-5.26.1
./Configure -des -Dusethreads -Dprefix=/usr/local/perls/perl-5.26.1
make;make test;make install
cd /usr/local/perls/
rm -f /usr/local/perls/perl-5.26.1.tar.gz

Perl installation will require about 20 minutes , at the end of Perl installation you should have this

# /usr/local/perls/perl-5.26.1/bin/perl -v

should return this
This is perl 5, version 26, subversion 1 (v5.26.1) built for x86_64-linux-thread-multi

now execute this

echo "/usr/local/perls/perl-5.26.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 ASSP 2.x.

Now install/upgrade to ASSP 2.x in this way  ( #99 )

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

and install the required ASSP 2.x package, libraries and plugins

cd /usr/local/assp
rm -fr /usr/local/assp/images
wget -r -nH --cut-dirs=10
tar xvzf package.tar.gz;rm -f package.tar.gz

Now open your ASSP WHM interface ( now you should already notice some ASSP 2.x new feature in your ASSP WHM such as MYSQL SETUP, does not touch them now )  and click  "update ASSP perl modules" .

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

ONLY IF you receive a lot of FAILED warnings, update again your ASSP perl module without using the "click here" option above (or press F5 in your keyboard).

If a Perl module continues to fail the installation try this from console

# /usr/local/perls/perl-5.26.1/bin/cpanm --force perl_module_name

Now edit your cronjobs ( crontab -e ) and remove following row using

50 4 * * * cd /usr/local/assp;perl /usr/local/assp/  => remove this row

Save your cron list .

Now open your ASSP WHM interface and click START ASSP to start your ASSP 2.x.

ASSP should START succesfully in max/about 150 seconds.

If ASSP does not START , update ASSP modules again and force ASSP Perl module installation again as shown in the image below.

If you see various perl modules failed , repeat the procedure above, before starting ASSP.

Start again your ASSP using your ASSP WHM . If ASSP starts succesfully , you should be able to see ASSP log running executing this

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

Now executes this (it will fix permissions for folders and files)

/usr/local/cpanel/3rdparty/bin/php-cgi /usr/local/assp/deluxe/ex_localdomains.php force=yes

Now you should check if SSL is working correctly . Go to ASSP WHM > SSL MENU , you should have something like this.

Click "check" for each port and check if SSL works correctly. If it does not work reinstall the SSL certificates as shown in the image below

then return to your ASSP WHM interface, STOP and START ASSP , after this step your ASSP SSL should work correctly .

Now , open your ASSP web interface .... ( ASSP WHM > ASSP Web interface )

You can login in your 2.x ASSP web interface using your old ASSP 1.x password and ONLY using the username root , the username "assp" will not be accepted such as in ASSP 1.x .

Look your new 2.x ASSP Web interface and click "info and stat"

Go down to perl modules and check if perl modules are installed correctly . Some module could be off because disabled in config or because require a plugin setup (read below optional setup).

Now Close your ASSP Web Interface.

MySQL setup #mysql

Now you can setup MySQL for your ASSP
(only If MySQL setup will fail, it should not, you can use this HOW TO to setup a BerkeleyDB instead of MySQL ).

First of all be sure you have following two rows in your /etc/my.cnf  ( possibile add them at the end of your [mysqld] section ) . If you do not have these two rows your ASSP could disconnect from MySQL very often .


Now restart your MySQL

# /usr/local/cpanel/scripts/restartsrv_mysql

return to your ASSP WHM interface > ASSP 2.x settings and utilities menu and click MYSQL SETUP, and follow guidelines/instructions to setup MySQL for your ASSP 2.x . Be sure the account/domain which will install the MySQL db will have min 1GB web space and min 1 MySQL DB .

Note :
after you click "create MYSQL" , please wait also about 1-5 minutes to complete, data will be migrated to MySQL !

Note : ASSP 2.x uses MySQL for better performance. In case of MySQL failure ASSP 2.x will switch automatically to flat files (and return to MySQL if the MySQL service will return available).

Now return to your ASSP WHM interface, if you find ASSP STOPPED , START it . It should start correctly.
After this step MySQL should be setup correctly . 

Now open again your ASSP web interface , you should see a green dot such as below, which means all ASSP DBs are working correctly

If you see a red dot, try to STOP and START your ASSP using your ASSP web interface and open again the ASSP web interface to check the status.

Now open your ASSP WHM and click Rebuild spamdb

Now execute this again (it will set default ASSP 2.x parameters)

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

Now go to ASSP WHM > SCORE SETTINGS and set BAYES between 10 and 15  (low values are more relaxed), HMM between 38 and 43  (low values are more relaxed) and PenaltyMessageLimit betweem 52 to 58 (low values are more aggressive)

After some week of usage if you have some spam passing, you can increase some step the value of Bayesian and HMM and reduce some step the PenaltyMessageLimit .

Now go to ASSP WHM > ASSP 2.x settings and utilities and choose number of SMTP workers following the instruction. 5 is default and should be good in most cases . You can increase or reduce based on your server RAM and SMTP traffic . If you receive a lot of SMTP traffic you may consider a bigger value (8-12 i.e.) . A value above 15 is not recommended . 

ASSP 2.x upgrade is terminated and all should work correctly . If you would you can enable the Country Checks in GUI  > Senderbase menu (please be sure to set first DoOrgBlocking and DoSenderBase OFF in WHM > Automation Settings)

Now you may install/enable some addictional module plugin. These steps are optional and could be done also after some week/day running ASSP 2.x .


important note related to Rebuildspamdb optimization

In ASSP 2.x rebuildspamdb is located in /usr/local/assp/lib/ . Scheduled times to executed RebuildSpamdb are set in  ASSP web interface > Rebuild Spamdb > Schedule Cron time for RebuildSpamdb (RebuildSchedule) .
By default RebuildSchedule will be scheduled to run 5 2,14 * * * (at 02:05 and 14:05) . If you would you can change this setting , first open ASSP WHM > Automation settings and disable RebuildSchedule , then change the value of RebuildSchedule. .

Or you can execute rebuildspamdb using your ASSP WHM interface.

Rebuildspamdb optimization is an important setup step which should not be underevaluated in ASSP 2.x. The RebuildSpamDB thread uses some internal caches that could grow to a large number of entries. You can choose between following solutions based on useDB4Rebuild status ;

useDB4Rebuild disabled (default in automation settings) : the rebuild spamdb process will run very fast using RAM. It could possibly require a very large amount of memory (about 1GB) - but it will run very fast !


useDB4Rebuild enabled: if you enable useDB4Rebuild  you can choose between ONE of these 3 solutions below which will reduce RAM usage but will run slower than RAM solution above.

1) enable "Use Module DB_File (useDB_File)" in module setup menu .
    Rebuildspamdb will use perl module DB_File , which uses the Berkeley V1 . Not recommended because obsolete.
2) enable "Use Module BerkeleyDB (useBerkeleyDB)" in module setup menu . Rebuildspamdb will use BerkeleyDB .
    You should first install and configure BerkeleyDB version 4.5 or higher to use this feature. This solution
    is faster than solution 1) .
3) If you do not enable "Use Module DB_File (useDB_File)" or "Use Module BerkeleyDB (useBerkeleyDB)" , ASSP will use the
    orderedtie method which is extremely slow.

Recommendation of usage
If you have a big amount of RAM in your server choose useDB4Rebuild disabled (default). If free RAM is an issue in your server set  useDB4Rebuild  enabled and solution 2) .

Optional steps Razor2 and dcc plugin

ASSP 2 plugins
ASSP 2 supports usage of plugins which can be enabed/disabled using the "plugin_name-Plugin" menu in ASSP web interface . Plugin requires additional configuration (i.e. Razor).

This is a brief unsupported guideline to setup DCC and Razor2 ASSP 2.x plugins ; even if I do my best to have this guideline correct and updated consider them unsupported , verify them with source links and ASSP support forum !! Follow these guidelines at your risk.
Razor2 Plugin

This Plugin uses a service provided by to detect spam on a statistical base.
You have to open port 2703 on your firewall for TCP outgoing connections. This port is used by Razor to connect to the Razor-Servers.
Razor is a distributed, collaborative, spam detection and filtering network. Through user contribution, Razor establishes a distributed and constantly updating catalogue of spam in propagation that is consulted by email clients to filter out known spam. Detection is done with statistical and randomized signatures that efficiently spot mutating spam content. User input is validated through reputation assignments based on consensus on report and revoke assertions which in turn is used for computing confidence values associated with individual signatures.
This plugin is designed for- and running in call/run level 'complete mail'!

This is a brief unsupported guideline to setup Razor2 ASSP 2.x plugin.

If you have ASSP Deluxe version 8.2.5 or above , Razor should be already installed , you can verify it by executing this

# /usr/local/bin/razor-check -v

If it returns  something like "Razor Agents 2.x, protocol version x" you can skip to Step 2 below .
If razor-check is not installed execute the Step 1.

Step 1

cd /usr/local/assp/razor2_for_assp
tar -xzf razor-agents.src.tar.gz
cd razor-agents-2.84_assp
/usr/local/perls/perl-5.26.1/bin/perl Makefile.PL
make test
make install
cd /usr/local/assp
rm -fr

Step 2
open ASSP web interface, open the ASSP_Razor-Plugin  menu  and set

DoASSP_Razor : score

and SAVE/APPLY ASSP settings ,
Razor2 should be installed and should work.

Following ASSP parameters should will be set automatically by your ASSP Deluxe
ASSP_RazorLog : standard
ASSP_RazorMaxNotSpamConf : default
ASSP_RazorValencePB : min 15 (moderate) max 25 (aggressive) with pe
procWhiteASSP_Razor: off/disabled
ASSP_RazorLogTo: spam folder and ccallspam




This DCC plugin uses a service provided by to detect spam on a statistical (checksum) base.
Before enabling you have to open/allow UDP port 6277 (IN/OUT) on your firewall and dccifd must be installed an running. This port (port 6277) is used by dccifd to connect to the DCC-Servers. If ASSP_DCC will detect a spam an addictional 15 points ( default ASSP_DCCValencePB ) will be added to the email received .

This is a brief unsupported guideline to install dccifd and use ASSP_DCC , if it does not work please read the source docs

mkdir /usr/local/perls
cd /usr/local/perls
tar -xvzf dcc-dccd.tar.Z 
cd dcc-dccd-1.3.163
./configure --disable-dccm
make install
cd /usr/local/perls/
rm -f /usr/local/perls/dcc-dccd.tar.Z
rm -fr /usr/local/perls/dcc-dccd*


#  replace "DCCIFD_ENABLE=off" "DCCIFD_ENABLE=on" -- /var/dcc/dcc_conf

now open (add) UDP port 6277 (IN/OUT) in your firewall .

now start rcDCC in this way

# /var/dcc/libexec/rcDCC start

Now open ASSP web interface, open the ASSP_DCC-Plugin  menu  and set

DoASSP_DCC  : score mode

and SAVE/APPLY ASSP settings , DCC should be installed and should work.

Following ASSP parameters should will be set automatically by your ASSP Deluxe
ASSP_DCCClientIP : enter your main server ip
ASSP_DCCClientName : enter your server hostname
ASSP_DCChomedir : /var/dcc
ASSP_DCCLogTo : spam folder and ccallspam
procWhiteASSP_DCC : disabled
ASSP_DCCLog : standard
Report to DCC-Server (ASSP_DCCReportToDCC) : set to "Report and Known spam"

If you will see a 'Socket connect failed" in your ASSP log try this

# service exim stop
# /var/dcc/libexec/rcDCC stop
# /var/dcc/libexec/rcDCC start
# service exim start

If you would update DCC from 1.3.163 to newer version preserving your DCC settings you can execute this

# /var/dcc/libexec/updatedcc

Automation note :
if ASSP Deluxe find /var/dcc/dcc_conf with DCCIFD_ENABLE=on and DoASSP_DCC set to score , ASSP Deluxe will start automatically rcDCC each time you START ASSP .

Uninstall/disable DCC
If you would uninstall DCC

# /var/dcc/libexec/rcDCC stop
# /var/dcc/libexec/uninstalldcc

and set DoASSP_DCC set to disabled


This plugin is an addon to the default attachment- and ClamAV- engine of ASSP. The default engines only scannes the first MaxBytes/ClamAVBytes of an email. If you enable this plugin, the complete mail will be scanned for bad attachments and/or viruses .

I do not recommend it's usage because the clamAV UNOFFICIAL signatures will be disabled by ASSP_AFC.

This plugin does not require binary installation , simply set DoASSP_AFC to "score" or block mode , and configure ASSP_AFC parameters based on your need.


Optional steps advanced module configuration

ASSP 2 modules information and configuration

You can turn ON/OFF an ASSP plugin module as you wish using ASSP Web interface > Module Setup.
If you turn ON/OFF an ASSP module you need to STOP and START your ASSP using your ASSP WHM interface.

/usr/local/assp/lib/ ) : it's a file commander (default OFF) . If you would install/use it download  here and upload in /usr/local/assp/lib folder, disable useASSP_FC in ASSP WHM>AUTOMATION SETTINGS and enable useASSP_FC in ASSP web interface .  

/usr/local/assp/lib/ ) : graphical stats in ASSP info page (default ON) .

ASSP_WordStem ( /usr/local/assp/lib/ ) : It stemms the words of a mail for the supported languages. Using this module will improve the correctness of the ASSP Bayesian analyze and the result of the rebuild spamDB task (default ON) .

AsspSelfLoader (
/usr/local/assp/lib/ ) : it helps to reduce the memory usage of ASSP (default ON controlled by useAsspSelfLoader ) .

(perl module) : required by HMM module  (default OFF controlled by useBerkeleyDB ) .

DB_File : old module to support BerkeleyDB v 1.x (default OFF) .

:  (default ON) .

:  (default OFF) .

useMailSRS :
 (default OFF) .

All other perl modules
except of WIN32 perl modules are required by ASSP and should be  ON .