|
|
#127 (permalink) |
|
minor deity
Super #1
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,321 posts
Gave thanks: 22
Thanked 93 times
|
You're telling your CRON job to run "learnspam"
in directory home/??????/script/ Its not finding it there. Check CaSe... paths and filenames are case sensitive in LINUX. John
__________________
Proud to be a Surmunity Mod! XEON 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! |
|
|
|
| This user thanks Bigjohn for this great post! | ironleg (December 5th, 2006) |
|
|
#128 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Feb 2006
Lives in Oklahoma
Hosted on pass80
18 posts
Gave thanks: 3
Thanked 0 times
|
Figured it out: I had to give the learn permission then it started to work
Thanks
__________________
vcsok.com Server reseller pass80 ![]() |
|
|
|
|
|
#129 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Jan 2005
12 posts
Gave thanks: 1
Thanked 0 times
|
Forwarding from remote client back to spamassassin
Hi,
Awesome, awesome thread, Big John. This has worked perfectly for me. Now I only get a couple of spam in my inbox in the morning. But, now I'd like to tweak it a bit. Can you please help me? What I'd like to do is avoid me or my resold hosting clients having to log in to the mail server and copy/move mail into SPAM and HAM folders on the server. What I'd like to do instead, is to set up a ham@domain.com and spam@domain.com email account for each domain. When the user reads a ham or spam in their Outlook Express or other client on the home/office desktop, they would forward that ham or spam to ham@theirdomain.com or spam@theirdomain.com, filters on those mailboxes on the server would automatically move those messages into the appropriate HAM or SPAM folder for that new ham@ or spam@ users, and then your scripts would work their bayes training magic for everyone in that domain. My only fear with this approach is that the forwarding from the remote client would obliterate or obfuscate the original spam or ham headers. Can you please help me figure out this method of forwarding from remote mail clients to ham@ and spam@ mail accounts back on the mail server? Thanks a million! Pete |
|
|
|
|
|
#130 (permalink) |
|
minor deity
Super #1
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,321 posts
Gave thanks: 22
Thanked 93 times
|
I'm not sure if that would work. The only way that I have ever used it was with manual training. I don't see the advantage of forwarding the mail over copying it to a SPAM folder...
__________________
Proud to be a Surmunity Mod! XEON 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! |
|
|
|
|
|
#131 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Jan 2005
12 posts
Gave thanks: 1
Thanked 0 times
|
Thanks for the quick reply, BigJohn.
The advantage is that the non-tech user can continue using their familiar email client on their desktop. They just need to forward ham (msgs that got scored by SA but not auto-deleted) and spam (msgs that scored below the auto-delete filter threshold) to a familiar and easily remembered email address. If I'm not mistaken, forwarding as an attachment (as opposed to forwarding inline) passes all the headers of the original message, so I guess the question is whether sa-learn reads that deeply into the message/attachment and finds the original headers. I'll try it out and reply back with my findings. Thanks again for this awesome contribution to society! Pete |
|
|
|
|
|
#132 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Jan 2005
12 posts
Gave thanks: 1
Thanked 0 times
|
I've found these:
http://wiki.apache.org/spamassassin/...kViaForwarding http://wiki.apache.org/spamassassin/...ailWithHeaders I added 2 users to my domain, spam domain.com and ham domain.com (I should've used something obscure so they don't get filled up with spam). They do NOT have SPAM or HAM folders, just inbox. I added sections with these lines to your great learnspam script: for FILE in `find $HOME -regex ".*/spam/inbox" -print` for FILE in `find $HOME -regex ".*/ham/inbox" -print` (these are untested, please do NOT use them yet) (I also changed my learnspam cron job to every 5 minutes while I was testing this.) I forwarded as attachment from my yahoo mail client some previously SA-processed messages that I POP'd in from my surpass mail account; spam to the spam user and ham to the ham user. Those forwarded messages have the forwarding headers, but also the X-Spam SA headers in the original message as it passed through my surpass mail server. I got results like: Processing /home/<user>/mail/domain.com/spam/inbox Learned tokens from 5 message(s) (5 message(s) examined) and Processing /home/<user>/mail/domain.com/ham/inbox Learned tokens from 0 message(s) (1 message(s) examined) So, I'm hopeful... So, now I need to add a removeforwardingheaders script to my cron jobs. Can someone please help with that? I have no clue where to start (except the apache.org links above). (We may need to use the inbox for a working area and then have at the end of the removeforwardingheaders script some code to move the stripped msgs from the inbox to the BigJohn HAM and SPAM folders, and if so, my "find FILE ... regex ..." lines in learnspam will no longer be needed. Thanks again! Pete |
|
|
|
|
|
#133 (permalink) |
|
minor deity
Super #1
Joined in Apr 2004
Lives in Georgia
Hosted on XEON
7,321 posts
Gave thanks: 22
Thanked 93 times
|
You might be able to do that with an EXIM filter...
Cowboy? You out there?
__________________
Proud to be a Surmunity Mod! XEON 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! |
|
|
|
|
|
#134 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Jan 2005
12 posts
Gave thanks: 1
Thanked 0 times
|
It looks like the exim "pipe" command
http://www.exim.org/exim-html-4.50/d....html#SECT3.13 could send the incoming forwarded bayes training ham or spam through a sed or similar script that could delete everything up the, at least in my forwarding-from-yahoo client case, Content-Type: message/rfc822 and the blank line required to be following it. The script will then need to, I think, delete any prior SA X-Spam headers, too. The script will have to be able to detect different forwarding clients and handle them each a bit differently, I believe. (I gotta add a section to the script delete the forwarding persons signature, too...) Does any of the above make sense for me to start working on, or am I wasting my time? Thanks, Pete |
|
|
|
|
|
#135 (permalink) |
|
Registered User
Fresh Surpasser
Joined in Jan 2005
12 posts
Gave thanks: 1
Thanked 0 times
|
Hi Bigjohn,
I think I have correctly implemented your plan on my server. When I check mail in horde, I think I see a total of 4 kinds of mail: 1) ham (subject line not rewritten, as expected), 2) false-negative (FN) spam (subject line not re-written but should have been), 3) false-positive (FP) ham (subject line re-written but should not have been) and 4) spam (subject line rewritten, as expected). It seems obvious to me to move 2) to SPAM and copy 3) to HAM. It's less obvious to me what to do with 1) and 4), those that have been correctly handled by SA. Do I need to or should I copy 1) to HAM and move 4) to SPAM? Does running learnspam on these correctly-handled messages train SA any better? Or have I misconfigured something? Thanks again for a great thread! Pete |
|
|
|