Steve Scrimpshire Posted May 18, 2006 Report Share Posted May 18, 2006 (edited) I have spamassassin setup on my laptop and here is my /etc/mail/spamassassin/local.cf (with default comments removed): rewrite_header Subject *****SPAM***** required_score 1.0 use_bayes 1 ok_languages en ok_locales en bayes_auto_learn 1 required_hits 5 report_safe 0 auto_whitelist_path /var/spool/spamassassin/auto-whitelist auto_whitelist_file_mode 0666 spamd runs as a service, so I am not sure if it reads my ~/.spamassassin/user_prefs, but here it is (comments removed): required_score 1.0 rewrite_header subject *****SPAM***** report_safe 1 use_bayes 1 bayes_auto_learn 1 skip_rbl_checks 0 use_razor2 1 use_dcc 1 use_pyzor 1 ok_languages en ok_locales en Now my question: I am using the spamassassin plugin with sylpheed-claws and I use fetchyahoo to download my mail to /var/spool/mail/omar and sylpheed processes mail from there and runs it through spamassassin. The problem is that spam goes to the spam folder like it should, but the subject is not rewritten and the mail doesn't show as unread in the spam folder of sylpheed (I have to look to see if there is mail in there and sometimes I forget). Under the 'S' column there is a little black frowny emoticon, though (I'm assuming that is the way that sylpheed marks the spam). Here's a screenshot: Here's the headers of the message: X-RocketYMUMID: ADRVv9EAALqSRGvLdQoiPCoQFQc X-Apparently-To: omarserenity@yahoo.com via 209.191.85.52; Wed, 17 May 2006 18:18:45 -0700 X-YahooFilteredBulk: 83.199.7.146 X-Originating-IP: [83.199.7.146] Return-Path: <russelystovall@pjstar.com> Authentication-Results: mta268.mail.scd.yahoo.com from=pjstar.com; domainkeys=neutral (no sig) Received: from 83.199.7.146 (HELO hansbuba.com) (83.199.7.146) by mta268.mail.scd.yahoo.com with SMTP; Wed, 17 May 2006 18:18:45 -0700 Message-ID: <000001c67a18$5dd12830$87cda8c0@rnm73> Reply-To: "Russell Stovall" <russelystovall@pjstar.com> From: "Russell Stovall" <russelystovall@pjstar.com> To: omarserenity@yahoo.com Subject: Re: the meldtcations Date: Wed, 17 May 2006 18:14:09 -0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0001_01C679DD.B1725030" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-FetchYahoo: version 2.10.2 MsgId 7404_59813_1730_1348_5012_0_43498_8211_3056279695 Sylpheed sees it as spam, even though spamassassin didn't rewrite the subject. I'm assuming spamassassin is doing its job (or at least sylpheed's plugin is), but why is the subject not getting rewritten.? Is there a way to have the message marked as Unread when incorporated from the spool? Edit: Ok, it is just the Spam folder that the messages are getting received marked as read already. Apparently, sylpheed sees that they are spam from the spamassassin plugin and marks them as spam and so they are not marked as unread. Still don't know why spamassassin is not rewriting the subject line. Edited May 22, 2006 by Steve Scrimpshire Quote Link to comment Share on other sites More sharing options...
Steve Scrimpshire Posted May 18, 2006 Author Report Share Posted May 18, 2006 (edited) I *think* I have solved it. Apparently, sylpheed's spamassassin plugin doesn't allow spamassassin to alter the message. I dropped this script: #!/bin/bash # # sc-spamc : a script for using SpamAssassin header modification / subject # tagging vi Sylpheed-Claws filtering actions. # # Author: Robert Story # Send questions or comments to the sylpheed-claws-users mailing list # # Based on a simpler script posted to the sylpheed-claws-users mailing list # by Richard A Downing. # # Should return the return code from spamc (1=spam, 0=nospam/error) # die() { : error "$@" : exit 0 } FILE=$* TEMP=sc-spamc.$$ # # call spamc, redirect output to temporary file, and save return value # /usr/bin/spamc -E -t 30 < "$FILE" > "$TEMP" RC=$? # # make sure temp file exists before we replace original message # if ! test -s "$TEMP"; then : die "spamc result file doesn't exist or is 0 bytes" fi # # backup original # mv "$FILE" "$FILE.bak" if ?$? -ne 0; then : die "'mv $@' failed!" fi # # rename filtered file # mv "$TEMP" "$FILE" if ?! 0 = $?; then : mv "$FILE.bak" "$FILE" : die "spam result rename failed, restoring backup" else : rm "$FILE.bak" fi # # return spamc exit code # exit $RC into ~/bin and created a filter rulle in spamassassin: test "!(sc-spamc %F)" move "#mh/Mailbox/Spam" And I am pretty sure it is working properly now. Found this info here: http://claws.sylpheed.org/faq/index.php/Fi...SpamAssassin.3F Edited May 18, 2006 by Steve Scrimpshire Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.