From owner-freebsd-questions Thu Oct 4 15: 8:49 2001 Delivered-To: freebsd-questions@freebsd.org Received: from relay3-gui.server.ntli.net (relay3-gui.server.ntli.net [194.168.4.200]) by hub.freebsd.org (Postfix) with ESMTP id 6D1D437B40A for ; Thu, 4 Oct 2001 15:08:44 -0700 (PDT) Received: from pc2-card3-0-cust79.cdf.cable.ntl.com ([213.107.2.79] helo=rhadamanth.private.submonkey.net ident=exim) by relay3-gui.server.ntli.net with esmtp (Exim 3.03 #2) id 15pGfR-00037S-00; Thu, 04 Oct 2001 23:08:33 +0100 Received: from setantae by rhadamanth.private.submonkey.net with local (Exim 3.33 #1) id 15pGf7-0003zJ-00; Thu, 04 Oct 2001 23:08:13 +0100 Date: Thu, 4 Oct 2001 23:08:13 +0100 From: setantae To: Chris Aitken Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Getting an Email into a PHP/pl script Message-ID: <20011004230813.A15307@rhadamanth> Mail-Followup-To: Chris Aitken , freebsd-questions@FreeBSD.ORG References: <3BBCC9F7.EB932EE4@Visionnet.nl> <0c3701c14d18$3505c910$6401a8c0@workstation7> <20011004210925.22415.qmail@pb1.pair.com> <5.1.0.14.2.20011005074857.0320bf88@mail.ideal.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <5.1.0.14.2.20011005074857.0320bf88@mail.ideal.net.au>; from chris@ideal.net.au on Fri, Oct 05, 2001 at 07:54:00AM +1000 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Oct 05, 2001 at 07:54:00AM +1000, Chris Aitken wrote: > Hi all, > > I have looked into the archives but im not sure what im searching for so I > decided to ask here. > > What I want to do is, on my FreeBSD box running PHP and MySQL, to have a > system which will take any email sent to a specific address, and pipe the > body of the email to PHP (or even to a perl script). Once I have the body > of the email as a variable, I can do all my parsing and extracting etc to > do with it as I need, but im baffled on where to start looking to get this > done. > > Any help would be greatly appreciated. You did say ``any'' help : I have a daemon half written in perl that periodically checks a mailbox in /var/mail to see if there's anything in it and then moves it into separate files. It's very rough around the edges but does the job, and you could modify it to take appropriate action for your situation, but it's really just a poor implementation of approximately 0.0003 % of procmail's functionality. Despite that, if you want to have a look at it, then let me know privately. Ceri -- keep a mild groove on To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message