7 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] "unable to filter mes...
FromSent OnAttachments
Eric d'AlibutJun 16, 2009 11:03 pm 
Sam VarshavchikJun 17, 2009 4:01 am 
Eric d'AlibutJun 17, 2009 11:03 am 
Eric d'AlibutJun 17, 2009 9:46 pm 
Devin RubiaJun 18, 2009 7:27 am 
Sam VarshavchikJun 18, 2009 3:15 pm 
Eric d'AlibutJun 18, 2009 11:31 pm 
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] "unable to filter message"?Actions...
From:Eric d'Alibut (eric@gmail.com)
Date:Jun 17, 2009 9:46:26 pm
List:net.sourceforge.lists.courier-maildrop

On Wed, Jun 17, 2009 at 7:01 AM, Sam Varshavchik <mrs@courier-mta.com> wrote:

Your maildrop recipe probably invokes an external program and passes it, as a
parameter, some part of the message without properly quoting it.

I developed a piece of code to rewrite the Subject: header of incoming mails with a prefix indicating which remote account had received the mail. (I forward mail addressed to many different addresses on different remote servers to a central account.) I hasten to add that turning off this code has solved the problem cited in my original post.

1. First I get the 'payload' of the Subject: line into a variable.

if (/^Subject:\s+(.*)/) MSGSUBJ = $MATCH1

2. Then I get the oldest Delivered-to into a variable.

foreach(/^Delivered-To:.*/) DELTO = getaddr($MATCH)

3. Then I proceed through a series of if-else tests looking for a match to any of my forwarded accounts. If one is found a revised Subject line containing the prefix pertinent to that account is inserted. Here's one such test.

TEST = getaddr("er@pet-fish.org") if ($DELTO eq $TEST) { MSGSUBJ = "<ERIC> $MSGSUBJ" xfilter "reformail -I 'Subject: $MSGSUBJ'" }

Your comment leads me to think I should, above, quote $MSGSUBJ as it is passed to reformail? I.e.

xfilter "reformail -I 'Subject: "$MSGSUBJ"'"

???

Best regards,

------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects