From owner-freebsd-questions Wed Oct 11 11:14:28 2000 Delivered-To: freebsd-questions@freebsd.org Received: from dip.sevicron.com (res146a-036.rh.rit.edu [129.21.146.36]) by hub.freebsd.org (Postfix) with ESMTP id 2AAAC37B502 for ; Wed, 11 Oct 2000 11:14:21 -0700 (PDT) Received: from isetr0 by dip.sevicron.com with local (Exim 3.12 #1 (Debian)) id 13jQOP-00003z-00; Wed, 11 Oct 2000 13:14:17 -0500 Date: Wed, 11 Oct 2000 13:14:17 -0500 To: Jie Liang Cc: questions@FreeBSD.org Subject: Re: FreeBSD mail Message-ID: <20001011131417.A199@sevicron.com> References: <39E49E1C.CE2C4FAB@ipinc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <39E49E1C.CE2C4FAB@ipinc.com>; from jliang@ipinc.com on Wed, Oct 11, 2000 at 10:06:36AM -0700 From: Isetr0 Savi Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG See answer below... On Wed, Oct 11, 2000 at 10:06:36AM -0700, Jie Liang wrote: > Hi, > > I have a script which takes STDIN and parses mail into my database, > I want to know how to use a email address to fire my script when a new > mail recieved. > say my email is jliang@ipinc.com > > I'd like to fire my script say myscript when I recieved a mail. > ## Left this in for useful info - real solution below :) # Take a look at maildrop or procmail. Both are in /usr/ports/mail/ if # you have the ports installed. I prefer maildrop, but it's up to you - # either one should do the trick, I believe... ## Actually....you can just put this in your ~/.forward file "|exec /bin/myscript" I'm not sure that the syntax is correct ( i.e. don't know if you need the exec or not) but that pipes your mail into whatever program you specify. And you can always read man forward too :) Good luck! isetr0 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message