Procmail 3.15.x, formail from same rev.
I'm trying to make an option to formail a rule-invoked option (the
LIST_OPTIONS is actually a line read in from a config file, containing
multiple options which may pertain to a mailing list which I have a bounce
manager running on):
# running under Sean's sandbox config!
# mimic stuff as if it'd been set from the options file
BOUNCER=listowner-something(_at_)somewhere(_dot_)com
FILTER_OPTIONS="listname BCCBOUNCE"
:0
* FILTER_OPTIONS ?? [ ]BCCBOUNCE\>
{
BOUNCEOWNER=-I\ \"Bcc:\ $BOUNCER\"
}
# this actually would have some sed and cat stuff prefixed, but our only
# focus here is to get formail working with the option
:0
| formail -I "Subject: [BOUNCE ADVISORY] blah blah" \
-I "From: $BOUNCER" \
-I "To: somebody(_at_)there(_dot_)com" $BOUNCEOWNER \
-I "X-Loop: $BOUNCER" | $SENDMAIL -t -f $BOUNCER
Suffice it to say that when BOUNCEOWNER is empty, no problem, and when the
text of it (sans the escaping of the doublequotes) is in the formail
invocation, it works. The point here is to make the BCC an option. Due to
other scripting complexities, I don't want to have multiple formail
invocations.
I've tried:
BOUNCEOWNER='-I "Bcc: $BOUNCER"'
BOUNCEOWNER='-I "Bcc: hardcodedbounceaddr(_at_)domain(_dot_)tld"'
BOUNCEOWNER="-I \"Bcc: $BOUNCER\""
BOUNCEOWNER="-I "Bcc: hardcodedbounceaddr(_at_)domain(_dot_)tld\""
BOUNCEOWNER=-I\ \"Bcc:\ $BOUNCER\"
(also all those without the space between -I and the field)
I get the expected result in the logfile from the assignment:
procmail: Assigning "BOUNCEOWNER=-I "Bcc: $BOUNCER""
or:
procmail: Assigning "BOUNCEOWNER=-I "Bcc:
listowner-something(_at_)somewhere(_dot_)com""
(as in the unquoted, escaped last variant above).
etc.
No dice - formail consistently emits a usage banner whenever BCCBOUNCE is
non-empty (for the string I'm trying to use). If instead, I set it to be a
simple option, such as -rt, formail accepts that.
I know this should be something simple, but I'm getting too aggravated to
see it clearly.
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail