On Thu, Jun 18, 2009 at 12:46:49AM -0400, Eric d'Alibut wrote:
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"'"
$ man maildropfilter
Search for "ESCAPE"
------------------------------------------------------------------------------
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