icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.

» Surpass Web Hosting Forums » Discussions » Email » Make SPAM ASSASSIN work for you...

Email General questions, webmail, mailing lists.

Reply
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 11 votes, 4.82 average.
Old November 17th, 2006, 2:54 AM   #118 (permalink)
Registered User
Fresh Surpasser
 
Joined in Nov 2006
1 posts
Gave thanks: 0
Thanked 1 Time in 1 Post
Quote:
Originally Posted by aaron01 View Post
Bigjohn- thanks for all the information you have provided here! I am having a little trouble getting the script to work, in fact the same problem that grokdesigns was having that he mentioned back on page 6. I contacted him to see if he figured anything out about it but he hadn't yet.

The problem is when the script ran, I had the following e-mailed to me:
Learning SPAM
Learning HAM
Done

So I decided to check /home/(user)/mail/(domain)/aaron/ to see if the SPAM and HAM folders were listed there. They were, but they, and every other folder, had a dot "." in front of them. So they were .SPAM and .HAM. So in the script, I decided to add a dot in front of the folder names, and when the script ran this is the result that I received:

Learning SPAM
Processing /home/(user)/mail/(domain)/aaron/.SPAM
Learned tokens from 0 message(s) (0 message(s) examined)
Learning HAM
Processing /home/(user)/mail/(domain)/aaron/.HAM
Learned tokens from 0 message(s) (0 message(s) examined)
rm: cannot remove `/home/(user)/mail/(domain)/aaron/.HAM': Is a directory
Done

I do have messages in both the SPAM and HAM folders. I'm not sure why exactly it isn't working, but I would appreciate any help!
The .SPAM (dot SPAM) folder indicates your host server's email system uses maildirs instead of mbox format mail files.
Inside the .SPAM and .HAM folder or any other extra folders you created through your email client / horde are sub folders cur, new, and tmp.
Each of those sub folders contains individual mail message files, rather than mbox files.
Your email client shows the folders as SPAM, HAM, etc. (without the dot)

Do you see any files with names like courierimapsunscribed? If so, your host probably runs Courier-imap.

You might be able to modify the learnspam script so that it no longer uses the --mbox option and correctly finds the dot-prefixed folders. The read messages are in cur and the unread messages are in new.

Change the code for the find command and the sa-learn lines:
Code:
for FILE in `find $HOME -path '*SPAM/cur' -print`
...
sa-learn --spam $FILE
Do the same for the HAM lines.

(Notice that the -name parameter changed to -path for the find commands) This is using the bash shell. I have not fully tested this yet but, hypothetically, it looks like it should work.

Also, here are a few links that might be helpful:
http://wiki.apache.org/spamassassin/BayesInSpamAssassin
http://wiki.apache.org/spamassassin/RemoteImapFolder
http://da.andaka.org/Doku/imapspamfilter.html

Last edited by billmack; November 17th, 2006 at 2:56 AM.
billmack is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
This user thanks billmack for this great post!
Kayla (November 17th, 2006)
Old November 17th, 2006, 12:28 PM   #119 (permalink)
Registered User
Seasoned Poster
 
Joined in Sep 2005
Lives in Lima, OH
Hosted on pass55
48 posts
Gave thanks: 0
Thanked 0 times
billmack, thanks for posting - I meant to post back here that I figured it out a couple nights ago. The --mbox option was the problem, I don't know why I didn't pick up on that at first. I did run the command from the shell and it worked. I have to edit the script yet, but anyway it is working out so far. Thanks!
__________________
I now have a dedi!
aaron01 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 19th, 2006, 5:38 PM   #120 (permalink)
Registered User
Seasoned Poster
 
Joined in Sep 2005
Lives in Lima, OH
Hosted on pass55
48 posts
Gave thanks: 0
Thanked 0 times
I am still getting loaded with spam. So far SA has examined around 300-350 or so spam and ham messages. Most of the ones that come through say BAYES_00. Just a few have said BAYES_20 or around there though. I have noticed that some of them have a higher score, say 3.0-4.0 or so, but a lot of them are around .5 or 1. Most of the spam I am getting are the messages that have a subject of "Its me Billy" or something like that and the contents are pretty much similar to what a "good" e-mail I'd receive would be. Is SpamAssassin having a hard time learning these?
__________________
I now have a dedi!
aaron01 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 29th, 2006, 3:44 PM   #121 (permalink)
Skittles
Super #1
 
DewKnight's Avatar
 
Joined in Aug 2004
Lives in a space ship
Hosted on dedi
6,724 posts
Gave thanks: 98
Thanked 190 times
I had this working on most of our domains, but I was adding it to one that we had transfered and the rules got lst, and I receive this from the cron:

Learning SPAM
find: /home: Permission denied
Learning HAM
find: /home: Permission denied
Done


Any ideas..?

edit: I did have to change the permissions to allow the user to execute, and then it could access the file... the file is owned by the correct user/group
__________________
Mountain Dew Knight
People should not be afraid of their governments. Governments should be afraid of their people.

Last edited by DewKnight; November 29th, 2006 at 4:24 PM.
DewKnight is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old November 29th, 2006, 4:08 PM   #122 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,365 posts
Gave thanks: 25
Thanked 94 times
Bayes does not even start to score until 500 messages - so you're getting the default stuff.

you can edit rules in your spam assassin too - I have mine set to score 3 points for a "forged_Rcvd_Helo" - which helps (but does cause some false positives) because if the machine says "Hi, I'm bob.com" and it's not - it's a dynamic IP or something - you get 3 points...
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old December 4th, 2006, 2:24 PM   #123 (permalink)
Registered User
Fresh Surpasser
 
Joined in Feb 2006
Lives in Oklahoma
Hosted on pass80
18 posts
Gave thanks: 3
Thanked 0 times
/bin/sh: home/??????/script/learnspam: No such file or directory


This is what I am getting in my email.
Do you know what i may have done wrong as I have went through the steps again to make sure. I do have 500 in the spam folder and 40 in the ham folder.

Do I need a folder in each separate e-mail account I have setup or do I just put one in the main account.
__________________
vcsok.com

Server reseller pass80
ironleg is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old December 4th, 2006, 2:33 PM   #124 (permalink)
minor deity
Super #1
 
Bigjohn's Avatar
 
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,365 posts
Gave thanks: 25
Thanked 94 times
A folder in each account is best.

That error says that you've not specified the correct location of your script file.
__________________
Proud to be a Surmunity Mod!
XEON PASS60 PASS61
Make a fundamental difference!
My Sites:
Curious about Brewing Beer? Join the community!
>>>>> Some Change is GOOD! Keep your paycheck! Support the Fair Tax
Get into an Art museum
Victorian London
It's your brain -ON WEB - mybrainhost.com (under development)
What SHOULD Government do? Much Less than it Does!
Bigjohn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old December 4th, 2006, 2:38 PM   #125 (permalink)
Registered User
Fresh Surpasser
 
Joined in Feb 2006
Lives in Oklahoma
Hosted on pass80
18 posts
Gave thanks: 3
Thanked 0 times
Quote:
Originally Posted by Bigjohn View Post
A folder in each account is best.

That error says that you've not specified the correct location of your script file.
I am new to this.

Which would be what...give example if you could

Thanks
__________________
vcsok.com

Server reseller pass80
ironleg is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old December 4th, 2006, 2:51 PM   #126 (permalink)
Registered User
Fresh Surpasser
 
Joined in Feb 2006
Lives in Oklahoma
Hosted on pass80
18 posts
Gave thanks: 3
Thanked 0 times
__________________
vcsok.com

Server reseller pass80

Last edited by ironleg; December 4th, 2006 at 2:56 PM. Reason: double post
ironleg is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On