procmail
[Top] [All Lists]

Re: Problem recipes

1996-03-05 08:23:52
On Sun, 3 Mar 1996, Jonathon Blake wrote:


      I'm having a some trouble with recipe that don't work the way 
      I expect them to.  Can somebody/anybody give me 
      a reason as to what needs to be changed, and why.

#**********
#
# I'm trying to set up my mailer so it autoreplies to any messages
# containing a certain keyword in the subject line. The auto-reply reads in
# a file and sends it to whoever sent me the message with the keyword.
#
    :0: h
    * !^From +YOUR_USERNAME
    * !^Subject:.*Re:
    * !^FROM_DAEMON
    * ^Subject:.*hwafaq
    | (formail -r ; ~ftp/pub/gr/graphology/hwa.faq ) | $SENDMAIL -oi -t

The pipe is trying to run something called 
~ftp/pub/gr/graphology/hwa.faq, which won't work.

Try:

| (formail -r; cat /ftp/pub/gr/graphology/hwa.faq ) |$SENDMAIL -oi -t

      LOG=dupNull$NL
      :13W:
      ^From:Mailer-daemon(_at_)aol(_dot_)com
      ^From(_dot_)Mailer-daemon(_at_)aol(_dot_)com
      ^From(_dot_)POSTMASTER(_at_)compuserve(_dot_)com
      ^From:POSTMASTER(_at_)compuserve(_dot_)com
        ^From(_dot_)Mailer-daemon(_at_)aol(_dot_)com
      ^From(_dot_)MAILER-DAEMON(_at_)prodigy(_dot_)com 
      ^Subject:Returned Mail: Undeliverable
      ^Subject:Returned Mail: undeliverable message 
        ^Subject:Returned mail: User unknown
      ^Subject:inactive user
      ^Subject:Returned Mail: Cannot send message for 5 days
      ^Subject:Returned Mail: Cannot send message for 3 days
      ^Subject:Undeliverable message
      | GARBAGE

It looks like your telling procmaiul that it needs to match on all of 
these conditions before it can toss the mail.

Try splitting it into three recipes, one for the From, one for From:  and 
the other for the Subject tests.


i.e.

*^Subject:.*(Returned Mail|inactive user|Undeliverable message)

But since you run a mailing list - is it a good idea to toss messages 
regarding inactive users?


--
"I know not with what weapons World War III will be fought, but World
War IV will be fought with sticks and stones."
                -- Albert Einstein

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