SpamAssassin Command Line Bayesian Learn Command cPanel

Once it is enabled, it is necessary to train spamassassin to learn what is junk mail and what is ham. To scan through an email folder with assigned junk with a cPanel install run the following command (Update for your environment):


/usr/local/cpanel/3rdparty/bin/sa-learn --no-sync --spam /home/username/mail/domain.com/account/.Junk/



To scan and add for ham (good email) run the following command:


/usr/local/cpanel/3rdparty/bin/sa-learn --no-sync -ham /home/username/mail/domain.com/account/Inbox/cur




Share this page:


Was this article useful? Have any suggestions or improvements to the information?

Also Read

VPS Time not Correct with Time Server

If you have a problem with your VPS time not staying sync in a Xen VPS you will want to enable...

Failed to start tailwatchd. Unit tailwatchd.service entered failed state.

Failed to start tailwatchd. Unit tailwatchd.service entered failed state.  tailwatchd.service...

Create CXS Quarantine Directory

The following command may be used to create a quarantine directory for Configserver's CXS: cxs...

This webpage is not available ERR_SSL_VERSION_OR_CIPHER_MISMATCH

This webpage is not availableERR_SSL_VERSION_OR_CIPHER_MISMATCHA secure connection cannot be...

ModSecurity: collection_store: Failed to access DBM file "/var/cpanel/secdatadir/ip": Permission denied

The error Failed to access DBM file /var/cpanel/secdatadir/ip: Permission denied can occur on...