Before I go into detail about the problem I'm having, I'll describe
what I'm trying to do, to make sure that I'm even on the right track.
We host a number of lists running under ezmlm-idx. I want to send an
announcement out to all of the lists every month. I first tried to do
this with a list of lists, but ezmlm doesn't care for that approach,
because the list name doesn't wind up in the To: or Cc: headers.
I'd rather not have things depend on the announcement process user
being a subscriber or in DIR/allow, which I think precludes the use of
qmail-inject. So, I'm attempting to do it with qmail-queue.
I created my message file, message.txt, and my envelope file
envelope.txt. AFAIK, they're in the correct format.
Looking back through the list, I saw Peter Green's example from a few
months ago, and came up with this:
#!/usr/bin/perl -w
use strict;
$|++;
my $mailprog = '/var/qmail/bin/qmail-queue';
my $message = './list_monthly_announcement.txt';
my $envelope = './list_monthly_announcement_recipients.txt';
open MSG,"$message" or die "Failed to open message file $!";
open ENV,"$envelope" or die "Failed to open envelope $!";
open \*STDIN, "<&MSG";
open \*STDOUT, "<&ENV";
my $rc = exec( $mailprog );
if ($rc) {
die "$rc something happened";
}
This does nothing useful (nothing in the log, no message sent),
although I'm at a loss to explain why. I saw references to calling a
pipe() to do this properly, but I can't find an example. Does one
exist?
thanks,
Todd