procmail
[Top] [All Lists]

Re: How to send the original after filter?

2003-08-28 10:31:26
Udi asked,

        In this case, if the message is not SPAM the body has been
        already corrupted by lynx.  Any idea how to send (recover?)
        the original HTML message if "Viagra" is not found?

Bart replied,

The only way is to save a copy of the original on disk before you begin
filtering.  I generally use an MH-format directory for this because it
simplifies cleanup/recovery if something goes wrong.

I'm wondering if some combination of launching a clone with the `w' flag and setting the clone's EXITCODE can substitute for that. For example:

: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
}
:0a:
$DEFAULT

The question is whether that `a' will depend on the clone's exit status. That has to be tested. If this works, it's preferable to using a temporary file.


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