
kyle-qmail at memoryhole
Nov 5, 2007, 10:22 AM
Post #6 of 6
(1505 views)
Permalink
|
|
Re: Script to force qmail to process the outbound queue
[In reply to]
|
|
On Monday, November 5 at 11:29 AM, quoth John Simpson: > On 2007-11-04, at 2347, Kyle Wheeler wrote: >> On Sunday, November 4 at 10:59 PM, quoth John Simpson: >>> On 2007-11-04, at 1841, Victor wrote: >>>> >>>> If you have an internet outage or DNS problems, the qmail's outbound >>>> queue will start to fill up. This script force it to process immediately: >>> >>> what's wrong with "svc -a /service/qmail-send" ? >> >> Unless you run qmail-tcpok first, qmail-remote will still cache time'd out >> addresses to avoid getting hung up. Thus, domains qmail had already >> discovered were offline won't be retried for another hour (as described in >> the qmail-tcpto man page). > > i dunno about you, but i see that as a good thing... if qmail already knows > that a given IP address is non-responsive, i'd rather see it retry > deliveries to the other IPs first anyway. No, it's not a good thing. Imagine this: there's an internet outage (as the OP suggests). Qmail attempts to send a message, fetches the IP address from your locally-installed djbdns cache, and attempts a connection. Since your internet connection is down, the connection times out, and qmail thinks that that particular host is offline. In fact, EVERY IP address that it tries turns out to be non-responsive. They all get added to the internal list of non-responsive IP addresses. You then realize that the network is down and that your queue has gotten enormous. You fix your network connection, and you'd like qmail to start using it right away. Unfortunately, "svc -a /service/qmail-send" won't help. Qmail will stubbornly refuse to attempt to send any currently queued messages for about an hour. > for an ISP server, i think it makes more sense to just run "svc -a" > by itself first, and if that doesn't "get it" (i.e. if there's a > specific message that you're trying to move along) then clear the > list and try the "svc -a" command again. I think it depends on *WHY* you're running "svc -a" rather than who you happen to be. If the reason you're running it is because your internet connection has been down for a while and you want to get deliveries going (e.g. to clear out the queue and tell people that things are now operating normally), then clearing out the tcpto list is probably smart. The longer your connection has been offline, the less likely any of the entries in that list are likely to be useful and/or valid, and the more of a backlog of undelivered messages you've built up. Put another way, why assume that the entries in the tcpto list are correct if your network has been down for a while? The only reason I can think of for sending qmail-send a SIGALRM without using qmail-tcpok is if I have a bunch of mails ready for local delivery that have stalled for some reason (e.g. a bad script) and I just fixed the script that was the problem. The fact that you're an ISP rather than a corporate mail server or a non-profit listserv or a vanity domain doesn't have any bearing on whether to use qmail-tcpok, as far as I can tell. > it's like i've said before, it all comes down to UNDERSTANDING- how > qmail works, what each program involved does, and what you actually > need on your own server. HEH - doesn't everything? :) ~Kyle -- Being powerful is like being a lady. If you have to tell people you are, you aren't. -- Margaret Thatcher
|