procmail
[Top] [All Lists]

RE: Forward and return a message

2002-07-03 01:26:38
At 02 July 2002 20:09, Professional Software Engineering wrote:

:0
* ^From:.*(163\.|sina\.)
{
         :0c
         ! unwelcome(_at_)euro-share(_dot_)com

         # If it is looped or from the mailer daemon, do nothing more.
         :0 w
         * !^FROM_DAEMON
         * !^X-Loop: NoReply(_at_)yourdomain\(_dot_)tld
         | ( formail -rt -A "X-Loop: NoReply(_at_)yourdomain(_dot_)tld" \
                 -I "From: NoReply(_at_)yourdomain(_dot_)tld (No Reply robot)" 
;\
                 cat wrongaddressyoubutthead.msg ) | $SENDMAIL -t

         # anything that falls through appears to be a loop or a
bounce.
         # (but then, shouldn't be FROM that address...)
         :0
         /dev/null
}
<<<<

Sean, thanks for this. However, it doesn't appear to work in so far as
the message is not being returned to the original sender.

The procmail log contains the following lines...

procmail: Executing " ( formail -rt -A "X-Loop:
NoReply(_at_)euro-share\(_dot_)com" \
                -I "From: NoReply(_at_)euro-share\(_dot_)com (No Reply robot)" 
;\
                cat unwelcome.msg ) | $SENDMAIL -t"
procmail: Executing "/usr/sbin/sendmail,-oi,unwelcome(_at_)euro-share(_dot_)com"

...which seems to suggest it's sending the message, yet it doesn't.

Any clues?

Regards,
Tim Skipper


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

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