Date: Thu, 24 Apr 1997 18:09:30 +1000 From: David Nugent <davidn@unique.usn.blaze.net.au> To: xiyuan qian <xiyuan@npc.haplink.co.cn> Cc: freebsd-isp@freebsd.org Subject: Re: forward mail to a perl script Message-ID: <199704240809.SAA28847@unique.usn.blaze.net.au> In-Reply-To: Your message of "Thu, 24 Apr 1997 13:33:35 GMT." <199704241333.NAA07410@npc.haplink.co.cn>
next in thread | previous in thread | raw e-mail | index | archive | help
> Hi, I noted from this list that one can forward a mail message to a perl > script program in order to handle some event. But there is no detail. /etc/aliases is your friend. > I checked the mail and sendmail mannual but find nothing to help me. Yup. aliases are very poorly documented. It is a pity for such a useful thing. You alias an address to a program using the following syntax: name: "|/path/to/program -program args" e.g. info: "|/usr/libexec/sm.bin/mailserver -f info" mailserv: "|/usr/libexec/sm.bin/mailserver" The '|' (pipe) character is the key, and don't forget the quotes. Incoming mail is piped to the program via its standard input. If you're running smrsh (which is more secure than using the general shells and generally an advisable thing to do in most cases) then the programs must be run out of /usr/libexec/sm.bin. -- David Nugent - Unique Computing Pty Ltd - Melbourne, Australia Voice +61-3-9791-9547 Data/BBS +61-3-9792-3507 3:632/348@fidonet davidn@freebsd.org davidn@blaze.net.au http://www.blaze.net.au/~davidn/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704240809.SAA28847>