This worked great. Thanks. while (<stdin>) did the trick!
--James
----------------------------------------------
ASCII Ribbon campaign against HTML E-Mail / \
load "linux",8,1
Date sent: Sat, 14 Aug 1999 14:35:50 -0400 (EDT)
From: "Timothy L. Mayo" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: Maildir filename in .qmail file
> Your script is getting the email message on standard input. Why not just
> parse that and put it where you want it?
>
> On Sat, 14 Aug 1999, James W. Blackwell wrote:
>
> > Some of our users strictly use our web frontend for reading their
> > mail. This works pretty well, but it's slow having to communicate with
> > the POP server when the user is trying to move around.
> >
> > What I'm doing is to parse out the mime parts of the message and
> > store them along with header information on a MySQL box. Binary
> > attachments are stored in their final binary form with a path in the the
> > database pointing to them. Now when users log in everything is coming
> > directly from MySQL and is VERY fast.
> >
> > I have the whole thing working except for this part. Right now I'm just
> > forcing it to parse a particular RFC 822 file rather then the one that
> > actually just came in.
> >
> > I saw qmail for the first time about 4 days ago and have written this
> > thing since then. I'm learning perl, MySQL, and qmail while doing this.
> > I've also rewritten the web frontend for vchkpw so it authenticates and
> > stores information about users, domains, etc. in the database. Needless
> > to say I'm kind of overwhelmed. Not to mention not sleeping for a
> > couple of days.
> >
> > My .qmail-[username] file looks like this:> >
> > | /usr/bin/vdelivermail ''
> > /var/vchkpw/domains/actiontax.com/postmaster
> > |/usr/scripts/parsemail
> >
> > Any examples of how to make my script deliver the mail, or is
> > there an easier way to do this?
> >
> > --James
> > ----------------------------------------------
> > ASCII Ribbon campaign against HTML E-Mail / \
> > load "linux",8,1
> >
> >
> > Date sent: Sat, 14 Aug 1999 11:32:50 -0400 (EDT)
> > From: "Timothy L. Mayo" <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: Re: Maildir filename in .qmail file
> >
> > > What is your perl script trying to do?
> > >
> > > Taking a first guess, I would say either have your perl script perform
> > > the final delivery or modify vdelivermail to do the post processing
> > > you require.
> > >
> > > On Sat, 14 Aug 1999, James W. Blackwell wrote:
> > >
> > > > Then is there any way to tell what this file is going to be called
> > > > once it is delivered? There's got to be some mechanism for doing
> > > > this.
> > > >
> > > > If the first line of my .qmail file is vdelivermail, and the second
> > > > line runs the perl script, I would assume that it has already been
> > > > delivered by the time it gets there. Of course this assumption is
> > > > probably wildly incorrect.
> > > >
> > > > Possibly any other ideas on how to achieve the same goal? I need to
> > > > run a perl script on every piece of mail that gets delivered to a
> > > > local user as soon as it comes in. I'm using vchkpw for the virtual
> > > > domain stuff.
> > > >
> > > > --James
> > > > ----------------------------------------------
> > > > ASCII Ribbon campaign against HTML E-Mail / \
> > > > load "linux",8,1
> > > >
> > > >
> > > > > On Sat, 14 Aug 1999, James W. Blackwell wrote:
> > > > >
> > > > > > Greetings,
> > > > > >
> > > > > > I need to be able to access the filename (ie,
> > > > > > 934495102.12993.qmail:2,) of the message just saved from within
> > > > > > a perl script launched by the .qmail-[username] file.
> > > > > >
> > > > > > I see there are several environmental variables that are set in
> > > > > > the shell, but not for the filename.
> > > > >
> > > > > That's because the .qmail file contains DELIVERY instructions.
> > > > > qmail can't tell you the filename when it hasn't delivered the
> > > > > message yet.
> > > > >
> > > > > >
> > > > > > Any help would be greatly appreciated.
> > > > > >
> > > > > > TIA,
> > > > > > --James
> > > > > >
> > > > > >
> > > > >
> > > > > ---------------------------------
> > > > > Timothy L. Mayo mailto:[EMAIL PROTECTED]
> > > > > Senior Systems Administrator
> > > > > localconnect(sm)
> > > > > http://www.localconnect.net/
> > > > >
> > > > > The National Business Network Inc. http://www.nb.net/
> > > > > One Monroeville Center, Suite 850
> > > > > Monroeville, PA 15146
> > > > > (412) 810-8888 Phone
> > > > > (412) 810-8886 Fax
> > > >
> > > >
> > > >
> > >
> > > ---------------------------------
> > > Timothy L. Mayo mailto:[EMAIL PROTECTED]
> > > Senior Systems Administrator
> > > localconnect(sm)
> > > http://www.localconnect.net/
> > >
> > > The National Business Network Inc. http://www.nb.net/
> > > One Monroeville Center, Suite 850
> > > Monroeville, PA 15146
> > > (412) 810-8888 Phone
> > > (412) 810-8886 Fax
> >
> >
> >
>
> ---------------------------------
> Timothy L. Mayo mailto:[EMAIL PROTECTED]
> Senior Systems Administrator
> localconnect(sm)
> http://www.localconnect.net/
>
> The National Business Network Inc. http://www.nb.net/
> One Monroeville Center, Suite 850
> Monroeville, PA 15146
> (412) 810-8888 Phone
> (412) 810-8886 Fax