Provided you remove the comma from the print statement, it'll actually work too. ;) David -----Original Message----- From: Ihnen, David [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 19, 2000 11:58 AM To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED] Subject: RE: How to grab the envelope contents while filtering? In fooling with tcpclient I found the syntax to do this. As I'm a perl junky, here's a program that will read descriptor 6 and print to descriptor 7. If you know any perl at all this should get you to where you need to be. #!/usr/bin/perl # read descriptor 6 and print it to descriptor 7 open INFILE, "<&6" or die "BAD IN"; open OUTFILE, ">&7" or die "BAD OUT"; while (<INFILE>) { print OUTFILE, $_; } close OUTFILE; close INFILE; -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 19, 2000 11:20 AM To: [EMAIL PROTECTED] Subject: How to grab the envelope contents while filtering? Hi all, I'm using a content filter shell script that I've written (based on inflex) with qmail-qfilter. During this filter process, I'd like to grab the contents of the envelope and store them in a file for use later (ie, reconstructing the envelope for an inject). I've toyed with trying to pipe fd 1 into a file without success. I know that this has to be doable with a small C program, but quite honestly, I don't have the familiarity with C to do it. Can it be done with Perl? In the shell? Is it as simple as reading fd1, writing a file, and re-writing fd1? Any ideas on how I can accomplish this? Some details: qmail 1.03 qmail-qfilter 1.0 Redhat 6.2 Thanks in advance for any help, Josh Tibbs Kendle International Inc.
