[CentOS] Sendmail, mailertable and DNS weirdness.

Wed Jun 21 10:23:32 UTC 2006
Will McDonald <wmcdonald at gmail.com>

Guys,

I've had a weird problem with Sendmail misbehaving in a way I don't
really understand. I've worked round the problem but I'd like to
understand what was going on.

The MX for one of our domains, blah.com, pointed at an internal
Exchange server. Mail relayed to a Sendmail MailScanner which then
delivered to Exchange for this domain. The domain expired leading to
all its mail queueing in Sendmail. So far so sensible.

While waiting for the domain to be renewed I setup a mailertable entry
to bypass DNS and route mail directly to the Exchange server...

blah.com  smtp:[192.168.10.10]

I rebuilt mailertable then tried flushing the queue with...

sendmail -q -v -qRblah

... which resulted in a bunch of "Transient parse error -- message
queued for future delivery" errors due to DNS resolution failure.

I thought mailertable entries bypassed DNS? Does Sendmail cache the
state of the destination for queued messages somehow? In the
qf${msgid} files in the spool?

I tried restarting MailScanner (and hence both Sendmail processes),
same problem. I read (
http://www.sendmail.org/~ca/email/doc8.12/op-sh-3.html ) that Sendmail
can, when configured with HostStatusDirectory enabled, retain
information on the status of hosts on disk but "sendmail -bh" returned
nothing and "sendmail -bH", just in case, didn't help either.

So, was mailertable being bypassed because these messages had already
been attempted to be delivered before the mailertable changes? Anyone
know what was going on here? I worked around it by just setting up a
quick zone for blah.com with an MX in it but I'd like to understand
WTF was going on with mailertable for future reference.

Will.