Learning Spam With SpamAssassin And All Of Your ISPConfig Clients [ISPConfig 2]

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Submitted by bswinnerton (Contact Author) (Forums) on Tue, 2009-04-14 10:31. :: Anti-Spam/Virus | Linux | Control Panels

Learning Spam With SpamAssassin And All Of Your ISPConfig Clients [ISPConfig 2]

This is a quick way of learning spam from all of your ISPConfig clients by running a quick and simple command. Please note that this is for ISPConfig 2, not 3.

You can start out by creating a new file in /bin. For example sa_learn.

nano /bin/sa_learn

Now once you are in that file you can paste the following:

#!/bin/bash

/home/admispconfig/ispconfig/tools/spamassassin/usr/bin/sa-learn --spam /var/www/web*/user/*/Maildir/.Junk/cur

The first part to this code is the directory of the SpamAssassin learning script, when putting in the --spam it learns it as spam, and --ham learns it has "good" messages. The second part to this code is the directory to your clients' spam folders. So once this is all done, you can learn all spam in your customers' spam folders.

After you have saved that file by clicking ctrl x, you will want to make it executable by doing the following command:

chmod o+x /bin/sa_learn

And then now from the command prompt you can simply type

sa_learn

and it will learn spam!


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by madmucho (registered user) on Thu, 2009-04-16 20:00.

For Mandriva distro there is little change in path to sa-learn binary file

/home/admispconfig/ispconfig/tools/spamassassin/usr/local/bin/sa-learn ..

 

Sponsored Links: Unified Communications: Thoughts, Strategies and Predictions
Join the discussion.
www.seamlessenterprise.com

IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com

Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com

Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com