Gossamer Forum
Quote Reply
Qmail
I'm piping emails to a script using a .qmail file...

|/path/to/perl /path/to/script.pl

Once my script has done what it needs to do, how can I then successfully deliver the email?

Nothing arrives.

As soon as I remove the .qmail file all the emails start arriving again.
Quote Reply
Re: [Paul] Qmail In reply to
Mm the following works but still won't let me receive mail...


|/usr/local/bin/perl /path/to/script.pl
|/usr/local/ghost/sbin/qmail-inject
Quote Reply
Re: [Paul] Qmail In reply to
Well I'm very pleased with myself!

The following works:

|/usr/local/bin/perl /path/to/my/script.pl | /usr/local/bin/safecat /path/to/Maildir/tmp /path/to/Maildir/new

Then in my script I just do:

my $email = join "", <STDIN>;

....and when I'm done I pass STDIN along using:

print $email;
exit 100;