|
|||||||||||||||||||
In the list of options, choose E-mail filtering
If you have previously input filters, they'll show here, and below them you'll see:
Select Add Filter The Add filter dialog is pretty simple. The Filter drop down defaults to subject. Change this to "Any Header". The next box over is where you enter your test criteria. You can cut and paste the line below:
If you want a higher threshold, add a star. If you want a lower one (not recommended at the beginning - some email's that I get from PCWeek score as high as 7.9!) subtract a star. Leave the Destination as 'discard'. Now click ACTIVATE. There. You've done it. If you followed the examples literally, you'll now flag all messages that score over 4.5 points, and automatically trash messages scoring over 8 points. Part 3 - Teach Spam Assassin the spammers new tricks We'll assume that you've followed all the steps through now. You should have noticed a drop in spam due to the 'autodelete' of high scoring messages. But a significant number of messages have still been coming through....
Spammers stuff random words, paragraphs, quotes, etc. into the body of the message - or use 'hidden text' in HTML formatted messages (font size 1px, etc.) to get around normal Spam Assassin (and other spam checkers) rules. Thankfully, Spam Assasin can learn from these messages and start trapping them too... In your control panel, open your file manager. You'll see a folder .spamassassin. Click on the FOLDER icon for spam assassin. That will open the folder. Click on the file user_prefs, and in the right column select EDIT FILE. Now, add the following lines:
The above lines enable checks against known/reported spammer id's, and the top one enables the bayes 'logic analysis' system. Now click SAVE on the bottom of the screen. Now to teach SPAM ASSASSIN... In the file manager, navigate up to the user_root directory (click up one level). If you see the folder public_html in the list window you're in the right place. Click create new folder make a folder named "script" (without the quotes, of course...) After making the folder, navigate into it and select Create New File enter the file name 'learnspam', and select type "shell script". Copy the following code into the file edit window:
Half Way There.... Now you have a script that will teach Spam Assassin to recognize spam. But the Spam Assassin program won't activate the BAYES rules until it has learned at least 150-200 SPAM and 'ham' (non spam) messages. The best way to compile that many messages is to have each user 'pre check' their email with HORDE before downloading messages to their computer. To do this you must disable 'auto-checking' from your mail program (outlook express, etc). Then, open webmail for your account. Open the inbox, then select Folders. Create 2 new folders - SPAM and HAM. You must use those folder names exactly, because that is what the script is searching for. Now, when you find a message that IS spam in your inbox, MOVE it to the SPAM folder. And copy a bunch of your 'good' mail messages to the HAM folder. Copy is the best thing here, because the script will purge that folder after each run. Of course, with HORDE you can look at the contents of these folders. They should have a similar number of messages in them when you start the process. As it runs, however, the spam folder will continue to contain older spam messages. The reason for this is that in the event Cpanel upgrades Spam Assassin, or your bayes-database gets corrupted for any other reason, you want to have a library of about 500 spam messages to 'relearn'. You should go through the SPAM folder every month or so and delete the oldest messages once you have 500 in the folder. You can accumulate MORE spam by modifying the "autodelete" rule from the last section. If you remove that rule and instead tell the mail filter to forward ALL MESSAGES scoring over 10 to a separate EMAIL address (mine is 'mailtrap'), then logging into the mail trap account every couple of days and moving 'his' messages to 'his' spam folder will help SA learn REAL spam... If you get a message that is a FALSE POSITIVE - meaning it scored as spam but was not ment to be, make sure you copy that into the HAM folder. Setting the Cron Job Click the CRON JOB icon in Cpanel. Enter your mail address in the 'mail to' box Press 'save crontab' button. NOTE - see the path? that is the 'userID' for cpanel that is wiped out there... so replace it with whatever yours is... this is the path to the learning script. You're done. |
|
- 0 Users Found This Useful
Related Articles
Powered by WHMCompleteSolution