procmail
[Top] [All Lists]

Re: How to send the original after filter?

2003-08-28 11:53:42

        To avoid misunderstanding I'm cut n paste my filerc:

VERBOSE=no
LOGABSTRACT=no
SHELL=/bin/sh
#DEFAULT=/dev/null
DEFAULT=/root/Udi/good
JUNK=/root/Udi/junk
TEMP=/root/Udi/temp
M=987654321
LOG="

"
VERBOSE=yes

:0 cw
{
        :0 bf
        | lynx -stdin -dump

        :0 B
        * viagra
        { EXITCODE=1 }

        :0 A:
        $JUNK

        HOST
}

:0 a:
$DEFAULT

        As before, if the "viagra" is found than HOST will not done
        and the message will be saved in the good-folder too.

Any idea,
 Udi



On Thu, 28 Aug 2003, David W. Tamkin wrote:

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


--



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