2 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] maildroprc question
FromSent OnAttachments
Robert WelzSep 2, 2006 3:45 am 
Jay LeeSep 2, 2006 8:11 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] maildroprc questionActions...
From:Jay Lee (jl@pbu.edu)
Date:Sep 2, 2006 8:11:27 am
List:net.sourceforge.lists.courier-maildrop

On Sat, September 2, 2006 6:45 am, Robert Welz wrote:

I need to extract some message/rfc822 mime sections from the emails and I want to know if I archieve something like this in maildropfilter:

if ((cat my_mail | reformime -s 1.2 -i | grep message/rfc822) -eq message/rfc822) then cat my_mail | reformime -e 1.2 | sa-learn --ham

So what i need to do is pipe my mail through reformime and grep and check the return value and if true do execute sa-lean and if not skip and increment 1.2 to 1.3 in the reformime statement.

As far as I see in the man page if I call xfilters my mail would be replaced by the return value of grep. And when I call " to | program " I have to write that logic in that program itself.

You should use backticks. See:

http://www.courier-mta.org/maildropfilter.html

under command substitution. This way your running a command without munging up your message.

Jay