Koozali.org: home of the SME Server

Qmail problems

WillKemp

Qmail problems
« on: September 20, 2006, 01:22:28 PM »
I have been having weird problems with Qmail on a server in Kabul, Afghanistan, running SME server v 7.0 (recently upgraded from 7RC1).

About 50 people rely on this server to do their jobs properly, so it's a bit of a worry when things start going weird! At the moment, almost none of the users actually use the server as an SMTP of POP server. However, i've got to move everyone over from what they are currently using - which is the other side of our very clogged satellite link - and onto this server. So i'm currently testing it with me and one other user.

Yesterday Qmail just exited and i'm not really sure what the problem was. This is from the log:

2006-09-19 11:08:14.595587500 warning: unable to utime remote/5/575281; message will be retried too soon
2006-09-19 11:08:14.595620500 warning: unable to utime remote/5/9617409; message will be retried too soon
2006-09-19 11:08:14.595622500 status: exiting

I've had extensive experience with Sendmail, but this is my first time administering a Qmail system (and i must say, i much prefer sendmail!).

If anyone can give me any clues what to look for i'd be grateful.

Offline mmccarn

  • *
  • 2,597
  • +9/-0
Qmail problems
« Reply #1 on: September 20, 2006, 05:10:40 PM »
I have one system that did this intermittently after loading "qmHandle" and using it to delete messages from the queue.

WillKemp

Qmail problems
« Reply #2 on: September 20, 2006, 06:50:20 PM »
Quote from: "mmccarn"
I have one system that did this intermittently after loading "qmHandle" and using it to delete messages from the queue.

Ah. Well, i've installed smeserver-saco-qmHandle-1.3.1-1, so that could be related.

How did you fix it?

Offline mmccarn

  • *
  • 2,597
  • +9/-0
Qmail problems
« Reply #3 on: September 20, 2006, 07:25:38 PM »
Installing qmHandle didn't cause the problem; deleting messages from the queue causes it.

Here's what I think happens:

    1. I say
qmHandle -Sfailure\ notice to kill the undeliverable bounce messages in my queue.
2. qmHandle sends a kill signal to qmail
3. qmHandle deletes all the messages in /var/qmail/queue/mess with the specified subject ("failure notice").
4. qmHandle issues a start command to qmail[/list]

Usually, it works fine.

Sometimes, however, qmail is occupied with an open smtp connection.  If that connection hasn't closed before the "start" command is sent in step 4, qmHandle displays a message saying something like "qmail is already running, not restarting".

This sounds fine, but if I run /etc/init.d/qmail status it says "/service/qmail: run ...wants down...", and as soon as the last open connection closes it gets what it wants and qmail does indeed shut down...

What I did to fix this was 1) remove the cron job I had scheduled to clear out these bounces regularly (probably a bad idea to start with...), and 2) always monitor qmail after deleting messages with qmHandle.  I run /etc/init.d/qmail start or /etc/init.d/qmail restart until /etc/init.d/qmail status does not say "...wants down..."

(My examples all involve the command line, but the same behavior is possible when deleting messages from the server-manager panel.  If you are only using the server-manager you could monitor and restart qmail using Landry's sme7admin contrib)

WillKemp

Qmail problems
« Reply #4 on: September 20, 2006, 08:01:35 PM »
Ah! That sounds like it could be what happened. Not connecting the two - and not realising qmail had died until much later - i can't be sure of the timing, but i thnk i did delete a mesage or two from the queue yesterday. Probably at about the time qmail died.

I'll keep an eye on that in future.

Thanks very much for your help.

Offline mmccarn

  • *
  • 2,597
  • +9/-0
Qmail problems
« Reply #5 on: September 20, 2006, 08:35:12 PM »
Now that I look at your first post again
Quote
2006-09-19 11:08:14.595587500 warning: unable to utime remote/5/575281; message will be retried too soon
2006-09-19 11:08:14.595620500 warning: unable to utime remote/5/9617409; message will be retried too soon

I realize I could have told you in my first response that  messages 575281 and 9617409 were deleted while qmail was running -- when it got around to re-trying the messages it failed (since they aren't there any more) and crashed.

I, too, had some transition pain moving from sendmail to qmail... but I've been using qmail on SME for 2 years now and either like it better or at least can't remember what I used to prefer about sendmail...

WillKemp

Qmail problems
« Reply #6 on: September 21, 2006, 05:11:12 AM »
Quote from: "mmccarn"
I, too, had some transition pain moving from sendmail to qmail... but I've been using qmail on SME for 2 years now and either like it better or at least can't remember what I used to prefer about sendmail...

;-)

What i don't like about qmail is that it seems more complicated than sendmail. Configuring sendmail, generally, seems simpler. Also, sendmail documentation is better, as far as i can see (but that may be just because i'm used to it). I've yet to find any well-written qmail documentation. The standard documentation is not well written at all.

Qmail also seems to be more limited than sendmail. In the few weeks i've been working with this particular server, there have already been things that i wanted to do that would have been simple with sendmail - but seem either difficult or impossible with qmail.

But, yeah, i guess i've been administering sendmail in some context or another for 10 years or so, and no doubt i'll get used to qmail soon enough!

Cheers
Will

WillKemp

Qmail problems
« Reply #7 on: September 21, 2006, 05:13:18 AM »
Quote from: "mmccarn"
Now that I look at your first post again
Quote
2006-09-19 11:08:14.595587500 warning: unable to utime remote/5/575281; message will be retried too soon
2006-09-19 11:08:14.595620500 warning: unable to utime remote/5/9617409; message will be retried too soon

I realize I could have told you in my first response that  messages 575281 and 9617409 were deleted while qmail was running -- when it got around to re-trying the messages it failed (since they aren't there any more) and crashed.

Ah! That's what that's about, is it? It makes sense now. Thanks!