Stoffe has asked for the wisdom of the Perl Monks concerning the following question:
Hello, I've been trying to use Mail-Qmail-Queue to introduce a simple filter on our Qmail server. The idea is to replace the qmail-queue program, check and potentially modify the message and then call the original qmail-queue. This is apprently the approach of qmail-scanner and other programs, but I've not found any that seemes easy to adapt for our own purposes, but the Mail-Qmail-Queue package seemed it would do exactly the right thing.
Below is a really minimal example, without die clauses and other stuff I do have. If I replace qmail-queue with this program, and have a copy of the original still there as qmail-queue.old, it will be able to read and parse the message, but when I try to send it on, changed or not, it just disappears somewhere - the send call doesn't return anything or even dies in a way I've been able to catch. The only clue I've got is that if I send from Squirrelmail, something on the way apparently complains about write errors. asking if disk may be full (it isn't, and sending with original program works fine).
#!/usr/bin/perl use warnings; use strict; use Mail::Qmail::Queue::Message; # This works, message available my $msg = Mail::Qmail::Queue::Message->receive(); # This never returns... at all $ret_val = $msg->send(QmailQueue => '/var/qmail/bin/qmail-queue.old')
The machine is running Debian Sarge, Qmail 1.03-31.01 and it all works fine otherwise.
Any ideas, can it be fixed? Any tips appreciated, including pointers to other possible solutions. Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mail-Qmail-Queue can't (re)send message
by almut (Canon) on Feb 13, 2007 at 21:35 UTC | |
by Stoffe (Sexton) on Feb 13, 2007 at 23:03 UTC |