procmail
[Top] [All Lists]

Re: How to send the original after filter?

2003-09-02 07:28:20
Udi wrote,

        Now, I have new strange problem:  If the message do not has bad
        words (viagra, pills...) the user will get the message twice.
        One in lynx's dump format and the second is the original message.
        Why the problem is strange?  Because if I use the same procmailrc
        from the command line, it works perfectly!
        See what the logs say:

:0cw
* reason to do any of this
{
:0bf
| lynx -stdin -dump

:0B
* viagra
{ EXITCODE=1 }
:0A:
viagraspam

HOST # if no "viagra", lose the lynxed clone
}
 :0e
 { HOST }
 :0A:
 $DEFAULT

The attempt to unset HOST inside the braces should kill the filtered version if it didn't get delivered to $MAILDIR/viagraspam.

You know what ... just try this compromise I posted before. If the offending word is present, the original HTML version will be dropped into the shunt folder, but otherwise the results should be the same:

Or we can punt; this has extra processes but, at least, no temporary file:

:0:
* reason to do any of this
* B ?? lynx -dump -stdin | egrep -i '\<(viagra|sars|pill)'
viagraorsarsspam

# otherwise, procmail goes on with an unchanged message


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail