Re: [Persistentperl-users] RE: [Speedycgi-users] Help with STDOUT
Brought to you by:
samh
From: Sam H. <sa...@da...> - 2003-03-13 21:48:12
|
How about putting a frontend in front of your script like this: (sed "s/^/MAIL/"; sed "s/^/ENVELOPE/" 0<&1) | yourscript.pl Then in yourscript.pl do this: while (<STDIN>) { s/^(MAIL|ENVELOPE)//; if ($1 eq 'MAIL') { # $_ is a line from the mail message } else { # $_ is a line from the envelope } } > Here is the problem... > > SYNOPSIS > qmail-queue > > DESCRIPTION > qmail-queue reads a mail message from descriptor 0. It then reads envelope information from descriptor 1. It > places the message into the outgoing queue for future delivery by qmail-send. > > qmail-queue is what I am replacing with my own custom script. qmail-queue is written in C, and can read descriptor 0 (the message) from qmail-smtpd, and read descriptor 1 (the envelope) from qmail-smtpd. A script written in perl can read both descriptors also, but once I try to write the script in perperl, it wont work because it cannot read descriptor 1, and I cant get everything to pass out of qmail-smtpd on descriptor 0 without a major rewrite of the qmail-smtpd code. > > Thanks, > Dallas > > > ------------------------------------------------------- > This SF.net email is sponsored by:Crypto Challenge is now open! > Get cracking and register here for some mind boggling fun and > the chance of winning an Apple iPod: > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en > _______________________________________________ > Persistentperl-users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/persistentperl-users > |