procmail
[Top] [All Lists]

Re: How to send the original after filter?

2003-08-28 11:48:59


        Thanks David, but, it dosen't work.  If the message is bad
        is dosen't reach the HOST line so, I get duplicat is the
        good and junk folders:

procmail: [16962] Thu Aug 28 21:34:00 2003
procmail: Forking "procmail"
procmail: [16963] Thu Aug 28 21:34:00 2003
procmail: Executing "lynx,-stdin,-dump"
procmail: [16963] Thu Aug 28 21:34:00 2003
procmail: Match on "viagra"
procmail: Assigning "EXITCODE=1"
procmail: Locking "/root/Udi/junk.lock"
procmail: Assigning "LASTFOLDER=/root/Udi/junk"
procmail: Opening "/root/Udi/junk"
procmail: Acquiring kernel-lock
procmail: Unlocking "/root/Udi/junk.lock"
procmail: Program failure (1) of "procmail"
procmail: Locking "/root/Udi/good.lock"
procmail: Assigning "LASTFOLDER=/root/Udi/good"
procmail: Opening "/root/Udi/good"
procmail: Acquiring kernel-lock
procmail: Unlocking "/root/Udi/good.lock"

Bye,
 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