Date: Thu, 24 Apr 1997 12:17:02 +0100 From: Robin Melville <robmel@nadt.org.uk> To: xiyuan qian <xiyuan@npc.haplink.co.cn>, freebsd-isp@FreeBSD.ORG Subject: Re: forward mail to a perl script Message-ID: <1.5.4.32.19970424111702.006ff158@wrcmail>
next in thread | raw e-mail | index | archive | help
At 13:33 24/04/97 GMT, xiyuan qian wrote: > >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. You can do this either from /etc/aliases or use a ~/.forward file. in aliases: myprog: "|/usr/local/bin/myprog arg1 arg2" this would run any messages for myprog@your.domain through /usr/local/bin/myprog in ~auser/.forward (example 1): \auser, "|/usr/local/bin/myprog arg arg" This will deliver the message to auser@your.domain mailbox and also run it through the program. example 2: "|/usr/local/bin/myprog arg arg" This will just run it through the program. In each case, the program will see the message text (& all the headers) on "stdin". Best regards, Robin -------------------------------------------------------- Robin Melville, Addiction & Forensic Information Service Nottingham Alcohol & Drug Team (Extn. 49178) Vox: +44 (0)115 952 9478 Fax: +44 (0)115 952 9421 Email: robmel@nadt.org.uk WWW: http://www.innotts.co.uk/nadt/ ---------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1.5.4.32.19970424111702.006ff158>