Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
June 30, 2008 - Submit Your Site for the July 08 Site of the Month Award!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 25, 2008, 10:55:20 PM


Login with username, password and session length


Pages: 1 ... 12 13 [14] 15 16 17   Go Down
  Print  
Author Topic: How-to: Train SpamAssassin - Updated May 30 2007  (Read 46385 times)
planetlanham
Spaceship Navigator
*****
Offline Offline

Posts: 79


I never finish anyth


WWW
« Reply #195 on: June 29, 2007, 07:31:36 AM »

aw nuts. I guess I jinxed myself. Running the script now displays

Code:
Checking /home/username/mail/domain.com/firstmailbox/spam to learn SPAM:

then stops. Sad

I deleted the bayes_* files again and gave it another go. This time it repeated what it did the first time. It scanned 7 mailboxes with very little mail, scanned a mailbox with 219 messages, then stopped on the next mailbox.

Logged
w98
Galactic Royalty
*****
Offline Offline

Posts: 438



WWW
« Reply #196 on: June 29, 2007, 08:29:35 AM »

Does it stop immediately, or does it just time out?

Timeouts are common if you're scanning hundreds of messages in every folder. Best action you can take is to scan more frequently (say, every 3-4 days instead of once per week) and delete the messages from the folders. If you get hundreds of spam messages on a daily basis then perhaps you want to employ a few mail filters to discard some of your spam before it fills your spambox. Personally, I filter out any messages that already score as BAYES_99 because there's little point re-training on such messages, and that alone dropped my spambox's message count on a daily basis. As tokens expire every 3-4 months, old spam may leak through if LP hasn't been diligent in maintaining their SA rules.

I've also noticed that scanning on LP is actually substantially faster than other cpanel-enabled hosting providers I've worked with using this script (way to go LP!), but it's possible that if you try scanning when there's a high CPU load or disk activity, that it could slow down your script to the point of timeouts. Just scan more often and you should be fine. Heck, you could write a Perl script to detect when you've got a threshold of messages and send you an Email alert or something...
Logged

silver45
Intergalactic Cowboy
*****
Offline Offline

Posts: 59



« Reply #197 on: June 29, 2007, 10:04:38 AM »

aw nuts. I guess I jinxed myself. Running the script now displays

Code:
Checking /home/username/mail/domain.com/firstmailbox/spam to learn SPAM:

then stops. Sad
I noticed mine doing this, so I thought maybe it had something to do with the amount of spam in the box (almost 2K messages Hypno). So, I moved about 2/3 of them to a temporary box and ran the script again, and it ran fine (if still a bit slow).

So it seems (from my admittedly anecdotal evidence) that the script hangs if there's too many messages in a box. I'm not sure what constitutes "too many," but so far the most I've had it work with is 701.
Logged
ace22
Intergalactic Cowboy
*****
Offline Offline

Posts: 72


« Reply #198 on: June 30, 2007, 05:56:59 PM »

I do not understand how this work:
If i get an email that pass SA tests but is is STILL a spam, how can i tel your script that it is a spam.

Do i need to send it to my mailbox and move it to the spam folder?
  (i have outlook to download all emails and not to keep them in inbox).
If i do so, won't SA start find my address as source of spam since now i am sending the spam to my self?

P.S
I think there is a bug in the script here:
if ($cpanel_username eq 'domain') {
   $continue = 0 ;
   $error_msg = 'You need to properly configure $cpanel_username within the script, or the script will not operate' ;
}
if ($my_domain eq 'domain') {
   $continue = 0 ;
   $error_msg = 'You need to properly configure $my_domain within the script, or the script will not operate' ;
}

It should be NOT eq,
 no?
Logged
planetlanham
Spaceship Navigator
*****
Offline Offline

Posts: 79


I never finish anyth


WWW
« Reply #199 on: July 01, 2007, 07:53:44 PM »

So it seems (from my admittedly anecdotal evidence) that the script hangs if there's too many messages in a box. I'm not sure what constitutes "too many," but so far the most I've had it work with is 701.

That did the trick! We had over 7,000 spams total. I moved all the spams I could into a /temp folder and ran it again. It didn't help that one of our email clients kept pasting the spams back into the /spam folders, resulting in almost 4,000 spams in both the /spam folder and /temp folders on our default account. Geez!

I'm going to slowly move pieces of spam out of /temp into /spam and run the script again.

Crossing my fingers hoping that it works from now on...
Logged
ace22
Intergalactic Cowboy
*****
Offline Offline

Posts: 72


« Reply #200 on: July 04, 2007, 12:11:12 AM »

I do not understand how this work:
If i get an email that pass SA tests but is is STILL a spam, how can i tel your script that it is a spam.

Do i need to send it to my mailbox and move it to the spam folder?
  (i have outlook to download all emails and not to keep them in inbox).
If i do so, won't SA start find my address as source of spam since now i am sending the spam to my self?

More over, what is the point to run the script on the spam folder?
In the spam folder there are messages that SA has already found as SPAM, so why to run it on that folder?

P.S
I think there is a bug in the script here:
if ($cpanel_username eq 'domain') {
   $continue = 0 ;
   $error_msg = 'You need to properly configure $cpanel_username within the script, or the script will not operate' ;
}
if ($my_domain eq 'domain') {
   $continue = 0 ;
   $error_msg = 'You need to properly configure $my_domain within the script, or the script will not operate' ;
}

It should be NOT eq,
no?
Logged
telling
Trekkie
**
Offline Offline

Posts: 10


« Reply #201 on: July 11, 2007, 09:15:34 PM »

I updated to the new version, and now I get this error message:

syntax error at tellingpix-sa-trainer.cgi line 91, near "$check_user_Inbox_for_ham "
BEGIN not safe after errors--compilation aborted at [domain]-sa-trainer.cgi line 189.

I looked at that line, and it's set to "N"
Logged
w98
Galactic Royalty
*****
Offline Offline

Posts: 438



WWW
« Reply #202 on: July 13, 2007, 01:27:28 AM »

If i get an email that pass SA tests but is is STILL a spam, how can i tel your script that it is a spam.
If you've downloaded the message to your local system via POP3, you simply move the message back into your 'spam' folder via IMAP. If you've configured the script correctly, it will see that message in your spam folder the next time you run the script, which teaches SpamAssassin that this particular message was spam.

If i do so, won't SA start find my address as source of spam since now i am sending the spam to my self?
If you set up an additional Email profile within Outlook as an IMAP connection instead of POP3, you can simply drag the message from your POP3 "Personal Folders" Inbox to the Inbox of the IMAP account you've just added. By dragging the messages in this fashion, none of the headers change, so SpamAssassin will not associate you with sending spam.

If you were to *forward* a copy of the message by clicking on the 'forward' button, then yes, your name and Email address would be seen as the sender of the message, and SpamAssassin will begin to learn that you are a spammer.

I think there is a bug in the script here:
if ($cpanel_username eq 'domain') {
You've got an old copy of the script -- this bug was fixed and does not exist in v3.04.
Logged

w98
Galactic Royalty
*****
Offline Offline

Posts: 438



WWW
« Reply #203 on: July 13, 2007, 01:29:57 AM »

syntax error at tellingpix-sa-trainer.cgi line 91, near "$check_user_Inbox_for_ham "
BEGIN not safe after errors--compilation aborted at [domain]-sa-trainer.cgi line 189.
I'll need to see your exact script to diagnose this. Contact me at the Email address in the comments of the script around line 18, and attach your script as a file attachment and I'll have a look.
Logged

w98
Galactic Royalty
*****
Offline Offline

Posts: 438



WWW
« Reply #204 on: July 13, 2007, 11:14:22 AM »

I'll need to see your exact script to diagnose this.
Telling had a syntax error earlier in the script where he removed a $ from a variable and forgot to end that same line with a semicolon, while enabling the global_ham_mailbox variable. Once the syntax error was fixed, the script worked as intended.
Logged

Mingers
Trekkie
**
Offline Offline

Posts: 11


« Reply #205 on: July 31, 2007, 06:38:07 PM »

I've just noticed that the "Enable Spam Box" button is missing in my cPanel under "Mail" then "SpamAssassin".

I re-enabled my spam box by putting https://login.servername.lunarpages.com:2083/frontend/lp/mail/addspambox.html? in my web browser =0)

Hope that might help someone.
Logged
pheared
Galactic Royalty
*****
Offline Offline

Posts: 203



WWW
« Reply #206 on: July 31, 2007, 06:49:58 PM »

For whatever reason, the spam box feature has disappeared during the latest cPanel upgrade.  I had to complain a few times before it was fixed for my account.
Logged

Mingers
Trekkie
**
Offline Offline

Posts: 11


« Reply #207 on: July 31, 2007, 07:05:09 PM »

Well I had migrated servers since I required PHP5 and for a few weeks my spam filtering has gone from working perfectly to not at all and everything in between.

I only noticed the missing button now when I needed to use the bugger!
Logged
pheared
Galactic Royalty
*****
Offline Offline

Posts: 203



WWW
« Reply #208 on: July 31, 2007, 07:17:45 PM »

I had the exact same experience.  It was humming along just fine until I was migrated to a new server which had the newer version of cPanel.  It took a few weeks of slow back and forth with the support desk to (I think) finally get things straightened out.  Very frustrating indeed.
Logged

chuckfa
Newbie
*
Offline Offline

Posts: 2


« Reply #209 on: August 11, 2007, 03:38:51 AM »

Can't get it to work.  I thought I followed the directs, but here's what the script returns.  I paid the $20 for the individual help but didn't get a response to my emails yet, help please.  Thanks!
****************
sa-trainer.cgi version 3.04 by Ian Douglas, iandouglas.com, Copyright 2004-2007
Some Rights Reserved under a Creative Commons "Attribution Non-commercial" license
Support for this script available here

Autodetected mail storage as Mbox; you could speed up this script slightly if you configure $mail_format in the script to "Mbox"

Training SpamAssassin for ccdastro.net:

WARNING: /home/ccdast2/mail/ccdastro.net/ccd/spam did not exist; attempting to create it; scanner will say it learned from 0 messages if successful or produce another warning if unsuccessful
WARNING: Could not find spambox for ccd@ccdastro.net, cannot scan SPAM
WARNING: /home/ccdast2/mail/ccdastro.net/chuck/spam did not exist; attempting to create it; scanner will say it learned from 0 messages if successful or produce another warning if unsuccessful
WARNING: Could not find spambox for chuck@ccdastro.net, cannot scan SPAM
WARNING: /home/ccdast2/mail/ccdastro.net/cody/spam did not exist; attempting to create it; scanner will say it learned from 0 messages if successful or produce another warning if unsuccessful
WARNING: Could not find spambox for cody@ccdastro.net, cannot scan SPAM
WARNING: /home/ccdast2/mail/ccdastro.net/globalham/spam did not exist; attempting to create it; scanner will say it learned from 0 messages if successful or produce another warning if unsuccessful
WARNING: Could not find spambox for globalham@ccdastro.net, cannot scan SPAM
WARNING: /home/ccdast2/mail/ccdastro.net/mail_lists2/spam did not exist; attempting to create it; scanner will say it learned from 0 messages if successful or produce another warning if unsuccessful
WARNING: Could not find spambox for mail_lists2@ccdastro.net, cannot scan SPAM
WARNING: /home/ccdast2/mail/ccdastro.net/nospam/spam did not exist; attempting to create it; scanner will say it learned from 0 messages if successful or produce another warning if unsuccessful
WARNING: Could not find spambox for nospam@ccdastro.net, cannot scan SPAM
WARNING: /home/ccdast2/mail/ccdastro.net/settime/spam did not exist; attempting to create it; scanner will say it learned from 0 messages if successful or produce another warning if unsuccessful
WARNING: Could not find spambox for settime@ccdastro.net, cannot scan SPAM
WARNING: /home/ccdast2/mail/ccdastro.net/temma/spam did not exist; attempting to create it; scanner will say it learned from 0 messages if successful or produce another warning if unsuccessful
WARNING: Could not find spambox for temma@ccdastro.net, cannot scan SPAM
WARNING: /home/ccdast2/mail/ccdastro.net/temp/spam did not exist; attempting to create it; scanner will say it learned from 0 messages if successful or produce another warning if unsuccessful
WARNING: Could not find spambox for temp@ccdastro.net, cannot scan SPAM

Checking Global Email-based Hambox for HAM messages:
Checking /home/ccdast2/mail/ccdastro.net/globalham/inbox to learn HAM: Learned tokens from 0 message(s) (1 message(s) examined)


Number of HAM messages scanned over time:
Number of SPAM messages scanned over time:


<a href="/cgi-bin/ccdsa-trainer.cgi>re-scan mailboxes


Logged
Pages: 1 ... 12 13 [14] 15 16 17   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM