Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

How can I write a code for auto respoding mail. for ex . rediff.com having option of auto reply in prefereces and when user kept on then every sender get a email auto maticaly .

Replies are listed 'Best First'.
Re: Auto response
by davorg (Chancellor) on Sep 07, 2001 at 16:51 UTC
Re: Auto response
by jj808 (Hermit) on Sep 07, 2001 at 17:00 UTC
    Assuming you are running UNIX/sendmail, add an entry to the /etc/aliases file with a pipe to your Perl program, e.g.

    autoresponder    "|/path/to/your/perlscript.pl"

    Rebuild the aliases file (with the 'newalias' command), then any emails sent to autoresponder@your.domain will call your script. The email message can be read from standard input to get the From: header, then open a pipe back to sendmail to send a reply.

    Hope this helps,

    JJ