From owner-freebsd-isp Thu Apr 24 01:10:09 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id BAA23041 for isp-outgoing; Thu, 24 Apr 1997 01:10:09 -0700 (PDT) Received: from unique.usn.blaze.net.au (unique.usn.blaze.net.au [203.17.53.17]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id BAA23030 for ; Thu, 24 Apr 1997 01:10:01 -0700 (PDT) Received: from unique.usn.blaze.net.au (local [127.0.0.1]) by unique.usn.blaze.net.au (8.8.5/8.8.5) with ESMTP id SAA28847; Thu, 24 Apr 1997 18:09:30 +1000 (EST) Message-Id: <199704240809.SAA28847@unique.usn.blaze.net.au> X-Mailer: exmh version 2.0gamma 1/27/96 To: xiyuan qian cc: freebsd-isp@freebsd.org Subject: Re: forward mail to a perl script In-reply-to: Your message of "Thu, 24 Apr 1997 13:33:35 GMT." <199704241333.NAA07410@npc.haplink.co.cn> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 24 Apr 1997 18:09:30 +1000 From: David Nugent Sender: owner-isp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > 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/