procmail
[Top] [All Lists]

Re: autoreply

2001-06-07 23:36:09
pankaj Agrawal <agrawal_pankaj(_at_)usa(_dot_)net> writes:
...
When I received a mail named to a user WHICH IS NOT MENTION IN MY ".promailrc"
file ;then this mail is bounce & So my aim is to autoreply to sender with a
suitable message. I am using following script but could not  working.
...
:0
 |(/usr/bin/formail -r -k \
    -A"X-loop: mailservice(_at_)mydomain(_dot_)dom "| \
      /usr/bin/gawk '{print }\
      /^/ && !HEADER \
        { system("/bin/cat nosuchuser"); \
        print"--" ;\
        HEADER=1 }' ) |\
        /usr/bin/sendmail -t

First of all, don't use full pathnames for programs.  That's what PATH
is for.  The exception is sendmail, which should be invoked via $SENDMAIL:

        :0
        |(formail -r -k \
                -A"X-loop: mailservice(_at_)mydomain(_dot_)dom " | \
          gawk '{print } \
                /^/ && !HEADER \
                { system("cat nosuchuser"); \
                print"--" ; \
                HEADER=1 }' ) | \
          $SENDMAIL -t


Next, put
        LOGFILE = $HOME/procmail.log
in your .procmailrc and then see what it contains after you try to send
a message to a non-existent user.


Philip Guenther
_______________________________________________
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>
  • autoreply, pankaj Agrawal
    • Re: autoreply, Philip Guenther <=