Cognitial.com Forums

Cognitial.com Support & Discussion Forums
It is currently Tue May 23, 2017 3:55 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: help with script
PostPosted: Thu May 12, 2011 8:45 am 
Offline

Joined: Thu May 12, 2011 8:42 am
Posts: 2
Hi & thank you for your page on taking control of spam w/spam assassin. I was overloaded with spam (hundreds a day) and now it's dropped!

I've uploaded the script to help spam assassin learn, but get this error. Can you tell me if it's working correctly or??

SpamAssassin training results for domain.com:

=======================================================

Process mail for user 'user'

SPAM (spam): Checking read messages to learn SPAM: splice() offset past end of array at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 495.
Use of uninitialized value in sprintf at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 505.
Use of uninitialized value in sprintf at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 505.
splice() offset past end of array at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 495.
Use of uninitialized value in sprintf at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 505.
Use of uninitialized value in sprintf at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 505.
splice() offset past end of array at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 495.
Use of uninitialized value in sprintf at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 505.
Use of uninitialized value in sprintf at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 505.
splice() offset past end of array at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 495.
Use of uninitialized value in sprintf at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 505.
Use of uninitialized value in sprintf at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 505.
splice() offset past end of array at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 495.
Use of uninitialized value in sprintf at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 505.
Use of uninitialized value in sprintf at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 505.
splice() offset past end of array at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 495.
Use of uninitialized value in sprintf at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 505.
Use of uninitialized value in sprintf at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 505.
splice() offset past end of array at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 495.
Use of uninitialized value in sprintf at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 505.
Use of uninitialized value in sprintf at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin/HTML.pm line 505.
Learned tokens from 0 message(s) (3092 message(s) examined)
Checking unread messages to learn SPAM: Learned tokens from 1 message(s) (3 message(s) examined)
HAM ():
Checking read messages to learn HAM: Learned tokens from 1203 message(s) (2676 message(s) examined)
Checking unread messages to learn HAM: Learned tokens from 0 message(s) (0 message(s) examined)
=======================================================

SpamAssassin Training Statistics

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


Top
 Profile  
 
 Post subject: Re: help with script
PostPosted: Thu May 12, 2011 9:02 am 
Offline

Joined: Thu May 12, 2011 8:42 am
Posts: 2
cripes, now a different error

SpamAssassin training results for domain.com:

=======================================================

Process mail for user 'user'

SPAM (spam): Checking read messages to learn SPAM: bayes: cannot open bayes databases /home2/domain/.spamassassin/bayes_* R/W: lock failed: File exists
Learned tokens from 0 message(s) (0 message(s) examined)
Checking unread messages to learn SPAM: Learned tokens from 1 message(s) (1 message(s) examined)
HAM ():
Checking read messages to learn HAM: Learned tokens from 14 message(s) (2679 message(s) examined)
Checking unread messages to learn HAM: Learned tokens from 0 message(s) (0 message(s) examined)
=======================================================

SpamAssassin Training Statistics

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

* Don't forget to empty the '' and 'spam' folders in each user's webmail accounts. *


Top
 Profile  
 
 Post subject: Re: help with script
PostPosted: Thu May 12, 2011 4:55 pm 
Offline
Site Admin

Joined: Mon Mar 16, 2009 6:16 pm
Posts: 10
Location: South Suburbs of Chicago, IL
I'm not exactly sure what the problem is but from what I can tell, the bayes training is working for everything except your READ messages in your 'learn spam' folder for the user in question.

Is there something different at all with that folder?

Attached are some screenshots from my domain. The first one is a screenshot of the ham & spam learning folders as seen in Horde. The second is of those folders as seen in cPanel's file manager. These are for my "backup" user where I have all emails forwarded to for bayes training.

Attachment:
sa1.jpg


Attachment:
sa2.jpg


"New" (unread) messages are stored in the "new" subfolder under learn_spam and read messages are stored in the "cur" subfolder under learn_spam. This is done automatically by the server.

Do your folders somewhat match mine? If you are still not having any luck, you can try pasting a copy of your salearning.cgi script (though you may want to change the domain name for privacy) and/or mail folder lists.

Another possibility is that perhaps your bayes database has somehow gotten corrupted. It is rare but can happen. One thing you could try is slightly changing the names of the bayes database files. This way, SpamAssassin will think they don't exist and should try to create new ones. This will allow you to see if having new bayes database files fixes the problem. If it works then problem solved (although you will lose what it has already learned and will need to re-learn them if you still have them). If it doesn't fix the problem then you can delete the newer files and restore the original filenames on the old files.

Bayes files (located in the .spamassassin folder at the root of your domain):
bayes_journal
bayes_seen
bayes_toks

(Just add a 1 or something after the original filenames to fool SpamAssassin into thinking they are missing so it will create new ones.)

I guess I'll leave it at this for now. It sounds like everything else is working, so that is good to hear. Hopefully I can help fix the problem for you. I wonder if you went through and marked all of your spam to learn as UNREAD, then ran the CGI script, would there be no errors? Or would it then give you errors on the next folder it processes (unread messages in the learn spam folder)? Just curious.

Good luck!


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
 Post subject: Re: help with script
PostPosted: Thu May 12, 2011 6:15 pm 
Offline
Site Admin

Joined: Mon Mar 16, 2009 6:16 pm
Posts: 10
Location: South Suburbs of Chicago, IL
Figured I'd post an update here. After a bit of Googling, it appears that this may be due to a bug in the SpamAssassin learning module and is caused by certain emails having a specific HTML color quirk in them.

https://issues.apache.org/SpamAssassin/show_bug.cgi?id=6551

I haven't seen this personally, but it could be some certain spam emails that you receive. It could even just be a handful of emails in the bunch that you are trying to learn that is causing the problem. This would likely be the cause of your initial problem (first post). The problem in your second post could be that SpamAssassin was still busy processing a prior request (you tried again too soon) or possibly a corrupted bayes database as mentioned before.

It sounds like there should be a fix for your first problem in an updated version of SpamAssassin, but hard to say exactly when that may be.

Hope this helps.

Edit to say that if you have already learned all of the spam in question, deleting it all (through webmail, etc) should fix the problem although it may come back if you get another email with the same glitch in it. It appears from your posts that SpamAssassin has learned from some of your spam so it probably wouldn't be a big deal to just delete it. Alternatively you could try deleting some of it and see if the error goes away. That way you can still learn from some of the other spam that may not have been learned yet.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Localized by MaĆ«l Soucaze © 2010 phpBB.fr