4 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Escape function not w...
FromSent OnAttachments
cour...@arantius.comFeb 24, 2005 6:18 pm 
Doc WalkerFeb 24, 2005 8:56 pm 
Doc WalkerFeb 25, 2005 6:48 pm 
cour...@arantius.comFeb 27, 2005 3:51 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] Escape function not working?Actions...
From:Doc Walker (rx-m@wvfans.net)
Date:Feb 24, 2005 8:56:25 pm
List:net.sourceforge.lists.courier-maildrop

cour@arantius.com wrote:

The following in my filter:

/Subject: *!.*/ s=escape($MATCH2) log "Escaped (?) subject: " $s

Logs, i.e.:

Escaped (?) subject: Comment Added: On-board Sound doesn't work

Which is a problem, becuase I want to pass the contents of the subject in single quotes to a shell script. But the single quote IN the subject of course breaks it. I thought that's what escape was for?

Try this:

log 'Subject: $MATCH2'

I append the following header to my maildrop'd messages as a troubleshooting tool:

# File Maildrop mailing list messages: if (/^List-ID:.*courier-maildrop/) { xfilter '$REFORMAIL -A "X-Maildrop-Mailfilter: 0x0301"' xfilter '$REFORMAIL -A "X-Maildrop-Match: $MATCH"' to "$DEFAULT/.Maildrop.Inbox" }

Read the recent archives where we discussed this very same issue of passing single quotes properly; Sam V explained how the argument gets passed to the shell correctly via the way I've quoted my $MATCH statement to xfilter above. Before that, I would get a maildrop error every time my $MATCH contained a single quote. Essentially, you do not need to use the ESCAPE() function for your purpose.

HTH.

Rx