procmail
[Top] [All Lists]

Re: How to send the original after filter?

2003-09-05 09:24:39
On Wed, 3 Sep 2003, Udi Mottelo wrote:

      The problem is:  By sendmail?      Ignore HOST
                       By command line?  Respect HOST.

Please set LOGFILE and VERBOSE to generate a verbose log and compare the
output in the two cases.  Send log excerpts to the list if you need help
interpreting them.

      Another side-issue problem is that the body of the message
      do not saved when the message is sent to the junk folder
      even if I add B to the sub-recipe in the clone:

:0 BH A:
$JUNK/HTML.$DATE

You would need "b", not "B" (the former applies to the actions, the latter
to the conditions), but NONE of b h B H should be needed, so the problem
must be elsewhere.

On Thu, 4 Sep 2003, Udi Mottelo wrote:

      [...] I want to add the duplication
      blocker (from the procmailex's man page) and I do not know
      where because it could block _ALL_ the duplicate messages:

           :0 Wh: msgid.lock
           | formail -D 8192 msgid.cache

You'd want to use it such that (1) it doesn't actually "deliver" the
message when used in the clone and (2) the "cache" persists only long
enough for the parent procmail and its clone to compare notes.  So
something like this (untested):

----------
PID=$$

:0 cw
* < 30000 
* sami(_at_)eng
{
  :0 bf
  |sed -n '/<[hH][tT][mM][lL]>/,$p' | lynx -stdin -dump

  :0 B
  * 1^0 ()\<viagra
  * 1^0 ()\<sars
  * 1^0 ()\<Pills?
  { EXITCODE=1 }

  :0 A:
  * ! ? formail -D 1024 msgid.$PID
  $JUNK/HTML.$DATE

  # Delivery to /dev/null is just an expensive way of saying { HOST }
  :0
  /dev/null
}

TRAP='rm msgid.$PID'

# Don't need a lock here as this is a one-per-process cache file
:0 Wh
| formail -D 1024 msgid.$PID

# Normal processing continues if the ID was not cached ...
----------


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