in reply to Mail-Qmail-Queue can't (re)send message
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Mail-Qmail-Queue can't (re)send message
by Stoffe (Sexton) on Feb 13, 2007 at 23:03 UTC |