Tuesday, February 25, 2003
Well, that (see yesterdays blog) didn't work. I got a call from the admin this morning that email didn't work, and sure enough it was not delivering mail at all. I undid the change to /var/qmail/control/ldaptimeout and restarted. It took about 5 restarts ((vi /etc/inittab; kill -HUP 1)*2), but eventually it got through the whole deliver queue. The problem still remained of why was this happening. One clue was found by setting /var/qmail/control/loglevel-send to 127 and restarting. I would get something like exhibit 1, except the "success" time was a minute and a half later than the "executing..." time.
The other big clue was that "top" on the openldap server box showed slapd pegged at close to 100% of the cpu. This told me that OpenLDAP was too busy.
Upon further examination of exhibit 1, I noticed that the mailAlternateAddress was being searched every time. The "mail" field is indexed by default, but the mailAlternateAddress was not indexed. I changed the /etc/openldap/slapd file on the OpenLDAP server by adding the line index mailAlternateAddress eq
, and that seems to have fixed everything up quite nicely.
Along the way, I developed two useful utilities for looking at the logs; delivery and deliveries. Delivery's output is shown in exhibit 1. It shows all the information about a specific delivery. The source is in exhibit 2. Deliveries simply shows multiple deliveries. It's source is in exhibit 3.
Exhibit 1 |
[root@mail qmail]# ./delivery 42 |
Exhibit 2: delivery |
#!/bin/sh |
Exhibit 3: deliveries |
#!/bin/sh |