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!


In reply to Mail-Qmail-Queue can't (re)send message by Stoffe

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.