How to upgrade to ASSP 2.x

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

Updated 12 Jul 2017

Latest versions of ASSP WHM and ASSP Deluxe supports usage of ASSP 2.4 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.4 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 ?

If you have no problems using ASSP 1.x ( all spam blocked, no issues at all ), you have no reason to upgrade to ASSP 2.x . 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 excellent harware resources, 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 good reasons to upgrade to ASSP 2.x

ASSP 2.x UNinstallation can be found here .

 

IMPORTANT NOTE : SUPPORT POLICY FOR ASSP 2.X

"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 >> 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
ASSP WHM > AUTOMATION SETTINGS .
   
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  http://www.sf.net ). 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 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
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.4 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.

     Hardware requirements :
     In a cPanel enviroment I recommend 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. If you can't satisfy this DO NOT RUN/INSTALL ASSP 2.x .

     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 . 

     If you are using an ip different from 127.0.0.1 in your ASSP WHM ( ASSP Deluxe for cPanel Advanced tools ) ,  revert it
  to 127.0.0.1 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.

    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 optional ASSP V.2 plugins 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 it DO NOT RUN/INSTALL ASSP 2.x .

 

Important change between 1.x and 2.x

Whitelist
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)  .


MySQL
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 .

Rebuildspam
rebuildspam (script to build Bayesian and HMM database) is now executed using an ASSP worker ( no more using rebuildspamdb.pl !) .
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) . If an admin is logged on using root.
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 ; also be sure you will be able to manage ASSP 2.x yourself after installation, ASSP 2.x is recommended for IT professionals only.

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.4 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.20.3. 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 . Version perl 5.20.3 is recommended to run ASSP 2.x .

Centos 7.x note
If you are installing ASSP v2 in Centos 7 and cPanel 11.49 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 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/
m
kdir /usr/local/perls/
cd /usr/local/perls
wget http://www.cpan.org/src/5.0/perl-5.20.3.tar.gz
tar -xzf perl-5.20.3.tar.gz
cd perl-5.20.3
./Configure -des -Dusethreads -Dprefix=/usr/local/perls/perl-5.20.3
make;make test;make install
cd /usr/local/perls/
rm -f /usr/local/perls/perl-5.20.3.tar.gz

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

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

should return this
This is perl 5, version 20, subversion 3 (v5.20.3) built for x86_64-linux-thread-multi

now execute this

echo "/usr/local/perls/perl-5.20.3/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 http://www.grscripts.com/assp_2/assp.tar.gz
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
wget -r -nH --cut-dirs=10 http://www.grscripts.com/assp_2/package.tar.gz
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.

Note: some perl module (such as Image::Magick, PDF::GetImages, Image::OCR::Tesseract, PDF::OCR2 and few other) will fail because need addictional and optional linux binaries, it's a normal behaviour ; after the upgrade read below the "Optional Steps" if you would install optional plugin.
ONLY IF you receive a lot of FAILED warnings, update again your ASSP perl module without using the "click here" option above.

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

50 4 * * * cd /usr/local/assp;perl /usr/local/assp/rebuildspamdb.pl  => 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 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. Only few modules which need addictional binary installation like Image::Magick ,Image::OCR::Tesseract and PDF::OCR2 should have the FAILED tag .

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 )

IMPORTANT NOTE
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

Now you can setup MySQL for your ASSP. If MySQL setup will fail 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 .

interactive_timeout=28800
wait_timeout=28800

Now restart your MySQL

# service mysql restart


Now
execute from console below command to install DBD::mysql perl module  ( this step to be sure you have DBD::mysql correctly installed before setting up MySQL for ASSP 2.x)

# cd /usr/local/perls
# /usr/local/perls/perl-5.20.3/bin/cpanm --installdeps DBD::mysql
# /usr/local/perls/perl-5.20.3/bin/cpanm DBD::mysql

If DBD::mysql perl module installation fails execute this

# /usr/local/perls/perl-5.20.3/bin/cpanm --force DBD::mysql

Now 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 .  If MySQL setup will fail you can use this HOW TO to setup a BerkeleyDB instead of MySQL.


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 and HMM AUTO MODE [ON] . ( don't worry if you see "poor", these will re-created in few hours )

Note : Bayes and HMM AUTO mode will set values depending on number of database rows.

If you find this values too much forceful or it's a new installation , I recommend you to set AUTO mode OFF and use Bayesian between 25 and 30 and HMM between 40 and 45 (with PenaltyMessageLimit set to 45-47) . After some weeks of usage you can increase some step value Bayesian and HMM .


Now go to ASSP WHM > ASSP 2.x settings and utilities and choose number of smtp workers following the instruction. 5 is default . You can increase or reduce based on your server RAM and traffic . 

ASSP 2.x upgrade is terminated and all should work correctly . Now you can optmize your ASSP by installing/enabling 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/rebuildspamdb.pm . 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 !

OR

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) .
 

If you would rate ASSP Deluxe for cPanel please click here , thank you , your support is important.


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 www.cloudmark.com 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.20.3/bin/perl Makefile.PL
make
make test
make install
cd /usr/local/assp
rm -fr
/usr/local/assp/razor2_for_assp/razor-agents-2.84_assp

Step 2
Now
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

 

 

ASSP_DCC Plugin

This DCC plugin uses a service provided by www.rhyolite.com to detect spam on a statistical (checksum) base.
Before enabling you have to open UDP port 6277 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 http://www.rhyolite.com/dcc/INSTALL.html#step-compile

mkdir /usr/local/perls
cd /usr/local/perls
wget http://www.rhyolite.com/src/dcc/dcc-dccd.tar.Z
tar -xvzf dcc-dccd.tar.Z 
cd dcc-dccd-1.3.158
./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*

now

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

now open (add) UDP port 6277 (IN/OUT) on 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.155 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

 

ASSP_AFC Plugin
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 OCR and dccifd plugin

This is a brief unsupported guideline to setup DoASSP_OCR and dccifd in your ASSP 2.x , these will add support to block more spam (especially image and attachment spam). If you are using clamAV UNOFFICIAL signatures (by default you should have them installed and working) these plugin and optional steps are useless in most situations, since clamAV UNOFFICIAL signatures will be able to block almost all image and attachment spam.

Even if I do my best to have this guideline correct and updated consider them
unsupported , and verify them with source links !! Follow these guidelines at your risk.

Only If you allow your ASSP 2.x to check spam inside pdf attachments (text) and in various languages, please follow these unsupported guidelines. If you have problem/issues you can receive support in ASSP 2.x forum and from binary souce links .

xpdf installation

First check if you have xpdf  installed.

whereis pdfinfo

if it returns something like

pdfinfo: /usr/local/bin/pdfinfo.pl /usr/local/bin/pdfinfo

you already have the xpdf package. If it returns nothing you can install xpdf in this way
( you can get latest version here ) . note : if you do not have /usr/include/freetype2 try  # yum install freetype

cd /usr/local/perls;
wget ftp://ftp.foolabs.com/pub/xpdf/xpdf-3.04.tar.gz
tar -xzf xpdf-3.04.tar.gz;cd xpdf-3.04
csh
setenv CFLAGS "-I/usr/include/freetype2 -I/usr/local/include"
setenv CXXFLAGS "-I/usr/include/freetype2 -I/usr/local/include"
./configure
make;make test;make install
cd /usr/local/perls/
rm -f /usr/local/perls/xpdf-3.04.tar.gz
bash 

xpdf should be installed you can continue installation.

You should have following binaries now

/usr/local/bin/pdftops
/usr/local/bin/pdftotext
/usr/local/bin/pdfinfo
/usr/local/bin/pdffonts
/usr/local/bin/pdfdetach
/usr/local/bin/pdfimages

You may now install language packs for xpdf here  http://www.foolabs.com/xpdf/download.html

Now install PDF::GetImages
in this way

/usr/local/perls/perl-5.20.3/bin/cpanm --installdeps PDF::GetImages
/usr/local/perls/perl-5.20.3/bin/cpanm PDF::GetImages

If it's already installed , execute this to reinstall

/usr/local/perls/perl-5.20.3/bin/cpanm --installdeps PDF::GetImages
/usr/local/perls/perl-5.20.3/bin/cpanm --reinstall PDF::GetImages

Now install ImageMagick and Image::Magick perl modules, in a Centos server you can use this ( you may have it already installed , check it with rpm -q ImageMagick )

yum install ImageMagick
/usr/local/perls/perl-5.20.3/bin/cpanm Image::Magick

Now install leptonica 1.71 required by Tesseract OCR which will be installed later , source is available here

cd /usr/local/perls;
wget http://www.leptonica.org/source/leptonica-1.71.tar.gz
tar -xzf leptonica-1.71.tar.gz
cd leptonica-1.71
./configure
make;make test;make install
cd /usr/local/perls/
rm -f /usr/local/perls/leptonica-1.71.tar.gz
rm -fr /usr/local/perls/leptonica-1.71

Now install Tesseract OCR , souce is available here . Below commands should work/compile 3.02 , for addictional compiling info read this

cd /usr/local/perls;
wget https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.02.tar.gz
tar -xzf tesseract-ocr-3.02.02.tar.gz
cd tesseract-ocr
./autogen.sh
./configure
make
make install
ldconfig
cd /usr/local/perls/
rm -f /usr/local/perls/tesseract-ocr-3.02.02.tar.gz
rm -fr /usr/local/perls/tesseract-ocr

Now install your required Tesseract OCR 3.02 language pack(s) , source  here ,  for example if you would install the English,Chinese (Traditional), Italian and Russian 3.02 language pack you may follow this ;

English language data for Tesseract 3.02

cd /usr/local/perls
wget https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.eng.tar.gz
tar -xzf tesseract-ocr-3.02.eng.tar.gz
cp /usr/local/perls/tesseract-ocr/tessdata/* /usr/local/share/tessdata
cd /usr/local/perls/
rm -fr /usr/local/perls/tesseract-ocr
rm -f tesseract-ocr-3.02.eng.tar.gz

Chinese (Traditional) language data for Tesseract 3.02

cd /usr/local/perls
wget https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.chi_tra.tar.gz
tar -xzf tesseract-ocr-3.02.chi_tra.tar.gz
cp /usr/local/perls/tesseract-ocr/tessdata/* /usr/local/share/tessdata
cd /usr/local/perls/
rm -fr /usr/local/perls/tesseract-ocr
rm -f tesseract-ocr-3.02.chi_tra.tar.gz

Italian language data for Tesseract 3.02

cd /usr/local/perls
wget https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.ita.tar.gz
tar -xzf tesseract-ocr-3.02.ita.tar.gz
cp /usr/local/perls/tesseract-ocr/tessdata/* /usr/local/share/tessdata
cd /usr/local/perls/
rm -fr /usr/local/perls/tesseract-ocr
rm -f tesseract-ocr-3.02.ita.tar.gz

Russian language data for Tesseract 3.02

cd /usr/local/perls
wget https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.rus.tar.gz
tar -xzf tesseract-ocr-3.02.rus.tar.gz
cp /usr/local/perls/tesseract-ocr/tessdata/* /usr/local/share/tessdata
cd /usr/local/perls/
rm -fr /usr/local/perls/tesseract-ocr
rm -f tesseract-ocr-3.02.rus.tar.gz

Other languages available here

Installation of pdftk could be completed using source in this way (more info here )

cd /usr/local/perls
yum install gcc-java
wget https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-2.02-src.zip
unzip pdftk-2.02-src.zip
cd pdftk-2.02-dist/pdftk
make -f Makefile.Redhat
make -f Makefile.Redhat install
cd /usr/local/perls/
rm -f
/usr/local/perls/pdftk-2.02-src.zip
rm -fr /usr/local/perls/pdftk-2.02-dist

OR you can install using rpm listed here : for example if you have a 64bit server running Centos 6.x you can install pdftk rpm in this way

wget https://www.pdflabs.com/tools/pdftk-the-pdf-toolkit/pdftk-2.02-1.el6.x86_64.rpm
rpm -i pdftk-2.02-1.el6.x86_64.rpm
rm -f /usr/local/perls/pdftk-2.02-1.el6.x86_64.rpm

after this step you can install Image::OCR::Tesseract perl module in this way ( it must install without errors! )

# /usr/local/perls/perl-5.20.3/bin/cpanm --installdeps Image::OCR::Tesseract
# /usr/local/perls/perl-5.20.3/bin/cpanm Image::OCR::Tesseract

and PDF::OCR2 in this way ( it must install without errors! )

/usr/local/perls/perl-5.20.3/bin/cpanm --installdeps PDF::OCR2
/usr/local/perls/perl-5.20.3/bin/cpanm PDF::OCR2

Now, open your ASSP Web Interface > ASSP_OCR-Plugin menu and set

DoASSP_OCR : score mode  (**)
ASSP_OCRLog : Standard or Verbose
procWhiteASSP_OCR : off
DoSimpleTextASSP_OCR : on
DoPDFTextASSP_OCR :  on
DoPDFImageASSP_OCR : OFF (not recommended it's usage may lead in to a large performance penalty and/or stucking workers!)
DoImageASSP_OCR : OFF (not recommended it's usage may lead in to a large performance penalty and/or stucking workers!)
ASSP_OCRExec : /usr/bin/convert or leave empty for automatic detection .

SAVE ASSP settings ! If all was installed without errors you configured correctly DoASSP_OCR in your ASSP 2.x !

(**) NOTE (!) : DoASSP_OCR set to "score" mode will override status settings for DoBayesian, forcing DoBayesian score mode even if you disable DoBayesian.
 


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.

ASSP_FC (
/usr/local/assp/lib/ASSP_FC.pm ) : it's a file commander (default OFF) . If you would install/use it download ASSP_AFC.pm  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 .  

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

ASSP_WordStem ( /usr/local/assp/lib/ASSP_WordStem.pm ) : 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/AsspSelfLoader.pm ) : it helps to reduce the memory usage of ASSP (default ON controlled by useAsspSelfLoader ) .

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

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

useConvertTNEF
:  (default ON) .

NetSNMP::agent 
:  (default OFF) .

useMailSRS :
 (default OFF) .

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



Image:assp.png