procmail
[Top] [All Lists]

Re: Fw: despamassassing

2004-11-18 00:00:42
On Wed, 17 Nov 2004 23:35:49 +0100, Hanspeter Roth 
<hampi(_at_)rootshell(_dot_)be> wrote:
  :0 fw hi
  * ^X-Spam-
  | formail -I X-Spam-

This probably adds some X-Spam- headers. But that doesn't help me.

removes, in fact.  However, you would still be left with the other
headers of the "envelope" message as well as the Mime boundaries.

If you want to automate it, you would need a shell script (or a really
good sed) that removed the first set of headers, starting after the
From_, and the MIME tags.  You could do a somewhat automated process
by cutting the lines from the From_  to the boundary.  You can get the
boundary with something like this:

:0
* ^X-Spam-Flag:.*YES
{
  :0
  * ^Content-type:.*; boundary="\/.*
  { 
    BOUNDS=`echo "$MATCH" | sed 's/"//'` 
  }
}

The MIME boundaries to remove will always be in the first Content-Type header.

SpamAssassin puts the original message into an attachment and puts
it's own comments into the main message. This makes it rather
annoying to read the original message by mutt. Also the coloring of
mutt is lost. And further the headers are now moved to the body
which makes it less efficient to filter by procmail.

Manually edit the email.  Delete the first set of headers and the MIME
boundaries.  Or, save the message attachment in mutt and import the
attachment back into your mail.

The last time I used mutt it handle SA tagged email fine.  In fact,
opening the attachment merely present with the original email, as is.

-- 
 ::::::===   <http://2blog.kreme.com>  ===::::::
 :: Build a man a fire and he'll be warm for  :: 
 :: a night, but set a man on fire and he'll  ::
 :: be warm for the rest of his life.         ::

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>