From owner-freebsd-isp Thu Apr 24 08:39:58 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id IAA12194 for isp-outgoing; Thu, 24 Apr 1997 08:39:58 -0700 (PDT) Received: from sys3.cambridge.uk.psi.net (sys3.cambridge.uk.psi.net [154.32.106.10]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id IAA12186 for ; Thu, 24 Apr 1997 08:39:49 -0700 (PDT) Received: from sys4.cambridge.uk.psi.net (uucp1.mail.uk.psi.net [154.32.105.26]) by sys3.cambridge.uk.psi.net (8.8.4/) with ESMTP id QAA02179; Thu, 24 Apr 1997 16:39:34 +0100 (BST) Received: by sys4.cambridge.uk.psi.net (8.7.5/SMI-5.5-UKPSINet) id QAA29183; Thu, 24 Apr 1997 16:19:52 +0100 (BST) Received: from infodev.nadt.org.uk (infodev.nadt.org.uk [194.155.224.205]) by charlie.nadt.org.uk (8.8.5/8.6.12) with SMTP id MAA23935; Thu, 24 Apr 1997 12:33:52 +0100 (BST) Message-Id: <1.5.4.32.19970424111702.006ff158@wrcmail> X-Sender: robmel@wrcmail X-Mailer: Windows Eudora Light Version 1.5.4 (32) Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Thu, 24 Apr 1997 12:17:02 +0100 To: xiyuan qian , freebsd-isp@FreeBSD.ORG From: Robin Melville Subject: Re: forward mail to a perl script Sender: owner-isp@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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/ ---------------------------------------------------------