You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Wael Shaheen <wa...@gmail.com> on 2007/03/21 15:08:50 UTC

Reporting spam by forwarded/attached message

Hello everyone,
am looking for a mechanism which allows my clients to report spam by 
forwarding a message or attaching it to a single mailbox i.e 
spam@whatever.tld

How can i do this, forwarded emails will have the sender information cut off 
before being fed to sa-learn
I would appreciate any hints-information in that direction and if any idea 
would be better than what am thinking of
or have sa-learn run on the attached messages

Thank you 


RE: Reporting spam by forwarded/attached message

Posted by Michael Scheidell <sc...@secnap.net>.
 

> -----Original Message-----
> From: Wael Shaheen [mailto:wael.shaheen@gmail.com] 
> Sent: Wednesday, March 21, 2007 10:09 AM
> To: users@spamassassin.apache.org
> Subject: Reporting spam by forwarded/attached message 
> 
> Hello everyone,
> am looking for a mechanism which allows my clients to report 
> spam by forwarding a message or attaching it to a single 
> mailbox i.e spam@whatever.tld
> 
Better yet, set up public imap folders and run sa-learn.pl (contributed)
on it.

Google, search archives.  Yes, forwarding your email will mess up
headers.

There are tricks to forwarding emails as attachments, but its not easy
in outlook.  Better have users drag the email to a public folder that
imap can read.

-- 
Michael Scheidell, CTO
SECNAP Network Security Corporation
http://www.secnap.com
---------------------------------------------------------------------------
This email has been scanned and certified safe by SpammerTrap(tm) 
For Information please see http://www.spammertrap.com 
---------------------------------------------------------------------------

Re: Reporting spam by forwarded/attached message

Posted by Luis HernĂ¡n Otegui <lu...@gmail.com>.
Well, I got it working (started a thread like this one month ago or so)
thanks to some other users contributions.
What I did (following someone elses instructions) was insert these lines in
local.cf:
<code>
bayes_ignore_header ReSent-Date
bayes_ignore_header ReSent-From
bayes_ignore_header ReSent-Message-ID
bayes_ignore_header ReSent-Subject
bayes_ignore_header ReSent-To
all_spam_to spam@mydomain.tld
</code>

and after that, set up the spam account, and generate a script to teach
spamassassin the forwarded messages. Maybe the bash programming could be
improved, but it's working for me like this:

<code>
#!/bin/bash
result_spam=$(ls /usr/local/virtual/spam@mydomain.tld/new | wc -l)
if [ $result_spam -ne 0 ]
        then
            spamassassin -r -d  --progress < /usr/local/virtual/spam@
mydomain.tld/new
            echo 1 > /var/tmp/sa-state
            rm -f /usr/local/virtual/spam@mydomain.tld/new/*
fi
</code>

This script runs through cron once an hour along with some others which scan
my users IMAP folders (some of them only use a webmail, and some use MUAs,
such as Outlook Express), seach for spam and ham folders, checks if they're
not empty, and learn from their contents (that's why I put that "echo"
sentence. BTW, if anyone knows a better way to check for the existence of
spam in the precedent script, I will gladly accept their tips...

When I finish polishing this, I promess to make a nice package and share it.



Luis
2007/3/21, Wael Shaheen <wa...@gmail.com>:
>
> Hello everyone,
> am looking for a mechanism which allows my clients to report spam by
> forwarding a message or attaching it to a single mailbox i.e
> spam@whatever.tld
>
> How can i do this, forwarded emails will have the sender information cut
> off
> before being fed to sa-learn
> I would appreciate any hints-information in that direction and if any idea
> would be better than what am thinking of
> or have sa-learn run on the attached messages
>
> Thank you
>
>


-- 
-------------------------------------------------
GNU-GPL: "May The Source Be With You...
-------------------------------------------------

Re: Reporting spam by forwarded/attached message

Posted by "Chris St. Pierre" <st...@NebrWesleyan.edu>.
On Wed, 21 Mar 2007, Wael Shaheen wrote:

> Hello everyone,
> am looking for a mechanism which allows my clients to report spam by 
> forwarding a message or attaching it to a single mailbox i.e spam@whatever.tld
>
> How can i do this, forwarded emails will have the sender information cut off 
> before being fed to sa-learn
> I would appreciate any hints-information in that direction and if any idea 
> would be better than what am thinking of
> or have sa-learn run on the attached messages
>
> Thank you 
>

Search the archives, this gets brought up almost every week.

The short answer is that you can either bounce/redirect the message
(which doesn't munge sender data) or forward as an attachment (ditto,
but harder to extract).

Chris St. Pierre
Unix Systems Administrator
Nebraska Wesleyan University
----------------------------
Never send mail to thobrux@nebrwesleyan.edu