8 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Stripping headers?
FromSent OnAttachments
Casey Allen Shobe - SeattleServer Mailing ListsMay 4, 2005 4:43 pm 
PollywogMay 4, 2005 6:00 pm 
Casey Allen Shobe - SeattleServer Mailing ListsMay 5, 2005 1:01 am 
Chris HollemanMay 5, 2005 1:21 am 
Ed WMay 5, 2005 1:50 am 
Thorsten HaudeMay 5, 2005 1:56 am 
Ed WMay 5, 2005 2:52 am 
Thorsten HaudeMay 5, 2005 4:36 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] Stripping headers?Actions...
From:Ed W (lis@wildgooses.com)
Date:May 5, 2005 1:50:20 am
List:net.sourceforge.lists.courier-maildrop

So basically what I want is:

* Qmail hands mail to maildrop. * Maildrop calls spamassassin via xfilter. SpamAssassin adds header(s). * If the header says one thing, filter it to INBOX/Spam, otherwise deliver to INBOX. Regardless, remove the SpamAssassin headers before writing the file to disk.

The tool you want is reformail, this can strip or add headers. Unfortunately it seems to have a bug or misfeature and doesn't actually work for this task...

It's not ideal, but if you get the equivalent tool "formail" from procmail then this does work correctly and you just use the header stripping or adding options in conjunction with the flag to not filter the body and this works the way you want. I use it extensively in my scripts to filter down headers to just the bare minimum needed and it works very well.

Any chance of getting reformail tweaked to work the same way?