procmail
[Top] [All Lists]

Re: /dev/null Recipe with reply

1998-01-28 22:30:39
Hermann Wecke wrote:

This is my usual recipe for /dev/null:

:0
* 1^1 ^.*parceiro\.com
* -1^1 ^Subject:.*parceiro\.com
/dev/null
 
So, if the first condition is met (* 1^1 ^.*parceiro\.com)
I would like to reply with a custom message and include the
original message.

    First, let's assume that the IP address of the offending
sender is 148.206.100.XXX (As per the "Received: from" line
in the email headers).  Domain names can easily be forged,
and it would be nice to cut down the recipe to one line.  I
would use...

:0
* !^Received:.from.*.148\.206\.100\.
$DEFAULT

{
Send your message to the original domain.  This is the
"delivery" action, and doesn't have to be followed by
/dev/null
}

    The reason for the inverted logic in the recipe is
to allow multiple IP-blocks.  For instance, assume a
different "nnn.nnn.nnn." in each line...

:0
* !^Received:.from.*.148\.206\.100\.
* !^Received:.from.*.nnn\.nnn\.nnn\.
* !^Received:.from.*.nnn\.nnn\.nnn\.
* !^Received:.from.*.nnn\.nnn\.nnn\.
* !^Received:.from.*.nnn\.nnn\.nnn\.
$DEFAULT

{
<Send Reject Message>
}

-- 
Walter Dnes (Toronto)
<waltdnes(_at_)interlog(_dot_)com>

<Prev in Thread] Current Thread [Next in Thread>