All,
I have over the last week been forced to dig into a behavior my server
has been exerting over the last months; namely that of qmail-send
crashing (but automatically restarting) frequently with the error
message "alert: unable to switch to queue directory". With it goes all
qmail-remote processes, and the delivery sequence number starts all over
again at 1. Some users report that messages affected end up being
delivered twice. I operate two qmail-toaster servers; and only the
server with SRS enabled is having the problem.
After studying the source I discovered that it was all caused by the
following in the qmail-srs-qt-0.5.patch:
if (chdir("queue") == -1) { log1("alert: unable to switch to queue
directory\n"); _exit(111); }
Looking at http://opensource.mco2.net/qmail/srs/ I see that version 0.6
contains a reference to a bug regarding chdir(), and the new code is:
if (chdir(auto_qmail) == -1) { log1("alert: unable to switch to home
directory\n"); _exit(111); }
if (chdir("queue") == -1) { log1("alert: unable to switch to queue
directory\n"); _exit(111); }
Before patching the system was running:
clamav-toaster-0.95.1-1.3.28
daemontools-toaster-0.76-1.3.5
libdomainkeys-toaster-0.68-1.3.5
libsrs2-toaster-1.0.18-1.3.5
qmailmrtg-toaster-4.2-1.3.1
qmail-pop3d-toaster-1.03-1.3.12
qmail-toaster-1.03-1.3.12
ripmime-toaster-1.4.0.6-1.3.5
simscan-toaster-1.4.0-1.3.0
spamassassin-toaster-3.2.5-1.3.16
ucspi-tcp-toaster-0.88-1.3.7
vpopmail-toaster-5.4.13-1.3.3
I simply added the line in the patch, recompiled qmail-toaster 1.3.18,
and now I have no crashes, delivery numbers in the 100000's, compared to
rarely above 1000 previously.
Has anybody seen this problem before? Can it be fixed with another
approach? Has any thought been put in patching the qmail-sts-qt patch?
Regards,
Lars