the send call doesn't return anything or even dies in a way I've been able to catch

Hm, it's hard to image that your script just disappears without a trace. Actually, I'd expect qmail to somehow check and report the status of invoking qmail-queue. Also, when you look in the sources of Mail/Qmail/Queue/Send.pm, there's plenty of error handling that would cause the program to die/carp with some helpful messages. But the question probably is "where do they end up?" :)

Have you checked the syslog and any qmail specific logfiles? (not exactly sure where they're kept (probably /var/log/qmail/* or /var/log/qmail.log) -- I'm not using qmail myself, and as qmail is in "non-free", there's no readily downloadable .deb package to check...)

If you absolutely can't find where the error messages are ending up, it might be easier to just dump them another time to a place where you'll actually look, e.g. somewhere in /tmp/ . In Mail/Qmail/Queue/Error.pm there's a routine _fail which seems to be called eventually for every error. So, you could insert a bit of debugging code in there

sub _fail(@) { ### DEBUG if (open my $log, ">>", "/tmp/qmail-queue.log") { print $log "@_\n"; # or something like this close $log; } else { # writing another error message to nowhere if # this fails would be mostly useless... } ### my $default_ec = shift; ... }

Otherwise, if this also isn't going to lead you to enlightenment, you could try strace(1) as a last resort. Either write a wrapper for your script which runs it under strace (this is the easy way, but it would likely produce lots of unnecessary output), or fork/exec strace in the background from within your script (attaching it to the PID of the script), immediately before you call $msg->send(...). (If you want help with the latter approach, just report back...)

Good luck!


In reply to Re: Mail-Qmail-Queue can't (re)send message by almut
in thread 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.