Date: Thu, 4 Oct 2001 23:33:15 +0100 From: setantae <setantae@submonkey.net> To: Chris Aitken <chris@ideal.net.au> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Getting an Email into a PHP/pl script Message-ID: <20011004233315.A15495@rhadamanth> In-Reply-To: <5.1.0.14.2.20011005081627.02ec7468@mail.ideal.net.au>; from chris@ideal.net.au on Fri, Oct 05, 2001 at 08:22:30AM %2B1000 References: <5.1.0.14.2.20011005074857.0320bf88@mail.ideal.net.au> <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> <20011004230813.A15307@rhadamanth> <5.1.0.14.2.20011005081627.02ec7468@mail.ideal.net.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 05, 2001 at 08:22:30AM +1000, Chris Aitken wrote: > At 11:08 PM 4/10/2001, setantae wrote: > > >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. > > Something I did leave off my original email. We used to have a mailbox auto > responder perl script in place that had an email alias piped to the script > with the following line in the /etc/aliases > > alias: "|/location/to/perlscript.pl /location/to/responder.txt" > > Problem is, this system isn't in place any more, and there isn't a backup > of the old script I can even check up to see how it pulled the data into > the script. Well, if the message was just being piped to it then it would be something as simple as : while (<>) { # $_ now contains one line of the mail &do_stuff; } or : { local $/ = undef; while (<>) { # $_ now contains the entire email &do_stuff; } } Ceri -- keep a mild groove on To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011004233315.A15495>