W. Wesley Groleau asked,
| Most of you have seen the
|
| * ? fgrep -i -f $SBDIR/list.of.bad.guys
|
| method that I and others use. I am now wanting to PASS mail in which the
| matched string is ONLY in the subject line. That is, I want to pass
| things like
|
| Subject: What do I do if xxxxx threatens bodily injury?
|
| EXCEPT when xxxxx appears elsewhere in the header.
| Here's what I do now, repeated for several xxxx.domains files.
|
| :0
| * ? fgrep -i -f $SBDIR/nancynet.domains
| * !^X-Loop: noloops_for_wwgrol(_at_)fw(_dot_)hac(_dot_)com
| {
| INCLUDERC=$SBDIR/surespam.rc
| }
|
| Can I use formail to temporarily remove the subject line, and still have
| it back where it belongs when I hit the INCLUDERC action?
Well ...
:0h
HEAD_WITHOUT_SUBJECT=|formail -ISubject:
:0 # Put the condition that has no forks first.
* !^X-Loop: noloops_for_wwgrol(_at_)fw\(_dot_)hac\(_dot_)com
* HEAD_WITHOUT_SUBJECT ?? ? fgrep -i -f $SBDIR/nancynet.domains
{ INCLUDERC=$SBDIR/surespam.rc }
or, though this adds a shell call,
:0
* !^X-Loop: noloops_for_wwgrol(_at_)fw\(_dot_)hac\(_dot_)com
* ? formail -ISubject: | fgrep -i -f $SBDIR/nancynet.domains
{ INCLUDERC=$SBDIR/surespam.rc }