I've been upgrading my otherwise-working filters and
using more variables in general. I've run into two questions
which might be simple for some *nix folks but currently have me
pretty stumped and I'd really appreciate a little help. I admit
to be totally *nix impared and much of what I do is cut-and-paste
and then trial/error (with lots of time now in the sandbox).
1) For several reasons, I've replaced a long string of
literal file extensions that I'm blocking for active content with
a variable containing that list in the following two condition
lines (borrowed from quite a bit earlier in the list). It works
fine with the literal string in place but when I switch to having
the variable as below, I lose the literal quotes in both the "?
and the [^"] instances when the variable is substituted. Can I
get this to work using this variable list approach?
2) I'm using a variable called $ACTIVEBOX to pipe
delivery of the offending email to another mail address (for
review) with sendmail etc and that works fine. What could I
substitute for something to run after the pipe to effectively
"send it to /dev/null" by simply changing the $ACTIVEBOX
variable?
Snippets below, [ ] are standard whitespace, mind
the line wraps. Verbose logging shows that the quotes get eaten
during the variable handling on each line.
# ~~~~~~~
SHELL=/bin/sh
DELIVERTO="$SENDMAIL -oi"
ACTIVEBOX="$DELIVERTO somemailbox(_at_)example(_dot_)com"
BADEXT="(asd|bat|chm|com|dll|dot|exe|hlp|hta|jse?|key|lnk|ocx|pif|reg|scr|sh[bs]|vb[se]?|wav|ws[fhe])"
:0
* $ 9876543210^0 ^Content-[-a-z0-9_]+:.*="?[^"]*\.${BADEXT}
* $ 9876543210^0 B ?? ^Content-[-a-z0-9_]+:.*($[ ].*)*=[
]*($[ ]+)*"?[^"]*\.${BADEXT}
| $ACTIVEBOX
# ~~~~~
If these are simple answers and/or ignorant questions, my
apologies. I know both are affected by my own *nix limitations.
TIA for all the help,
- Don
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail