I've been having a problem for months with Sendmail and DNSBL lookups. DNSBL lookups fail without any output in error logs, even with Sendmail's log level set to 22. Furthermore, NOQUEUE errors occur as per the mail logs. The server runs FreeBSD 7.0, fully up-to-date in terms of the base system and ports. The problem has been present since FreeBSD 6.2, and at the risk of sounding stupid, "seemed to happen overnight without me changing anything". Sendmail details are as follows -

Disabling all daemons and commenting out mailer entries sees the daemon referred to in NOQUEUE errors change accordingly (i.e. disable MSA --> MTA --> MTA-SSL --> Daemon0 when no user-specified daemons exist). I usually operate with the MAILER(local) entry disabled. Besides this, I've tried every combination of rc.conf sendmail-related options. In use at the moment are -

As I said, I've tried using only one of the sendmail_*_enable options in turn, using all, using different flags, using the /etc/rc.d/sendmail init script and other things Google has turned up - all to no avail.

Regarding the DNSBL problem, I've tried using a variety of other lists, and tried removing my custom error message. The only thing I can think of that would cause the DNSBL lookups to fail silently is the, "t" option, but this is to prevent lookup timeouts causing spam mail to be received. I can successfully use the dig command to lookup known spam IP addresses. I'm not sure if it is relevant, but the server defaults to using the router for DNS lookups and the local cache otherwise (djbdns), with both processing DNS queries OK.

I apologise if I haven't explained my problem very well. The e-mail server sends and receives e-mail without issue, however, even when the log level is set to the default the NOQUEUE errors are still present. I appreciate the NOQUEUE errors may be of no significance, but the output of '/etc/rc.d/sendmail status' concerns me -

Code:

root@darkweb# /etc/rc.d/sendmail status
sendmail is running as pid 1038.
sendmail_clientmqueue is not running.

The main issue is the DNSBL lookups failing and seemingly all mail is accepted - when DNSBL lookups worked 90% of the spam I receive was dropped.

Thanks for your help in advance. Again, I apologise for any difficulties in understanding the problem, and if the information provided isn't sufficient. Any advice or comments would be of assistance.

I used 81.141.137.78 as it was my IP address at the time of writing. The results of tcpdump indicate DNSBL lookups are taking place. I apologise if I have misunderstood your suggestions, and would appreciate any further help you may be able to offer.

By chance, whilst I was writing this post I left tcpdump monitoring the NIC. It shows two DNSBL lookups taking place via Sendmail -

Analysing the Sendmail logs reveals no rejections due to DNSBL listing, and the nightly FreeBSD periodic mail doesn't list any blocklists. It is as if Sendmail ignores the DNSBL options in the configuration file. Perhaps Sendmail is compiled incorrectly, but this seems odd as I am using the standard FreeBSD port.

Sorry if my post has missed anything out. Again, I'd appreciate any further help you could offer.

I don't run a mailserver. That is why I just did a manual DNSBL lookup to show you what to expect in the tcpdump output.
You will have to determine using tcpdump whether sendmail is doing DNSBL lookups while processing the incoming mail.

From the rc.conf stuff you posted, I saw you use clamav virusscanning. This really can be a resource hog. You could check if you are not somehow running out of resources like file descriptors, memory space etc.

Another point is the /etc/rc.d/sendmail status output complaining that "sendmail_clientmqueue" is not running.

Did you take the necessary steps to "compile' the sendmail mc file into the sendmail.cf format? And make sendmail re-read this file?

I am not really a sendmail expert. If the above suggestions don't work you may be better off to ask on a sendmail mailing list

__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump

From the rc.conf stuff you posted, I saw you use clamav virusscanning. This really can be a resource hog. You could check if you are not somehow running out of resources like file descriptors, memory space etc.

Another point is the /etc/rc.d/sendmail status output complaining that "sendmail_clientmqueue" is not running.

Did you take the necessary steps to "compile' the sendmail mc file into the sendmail.cf format? And make sendmail re-read this file?

I am not really a sendmail expert. If the above suggestions don't work you may be better off to ask on a sendmail mailing list

I agree with ClamAV being a resource hog, but it's the only antiviral solution I have tried in conjunction with Sendmail. Based on this experience, I am considering ditching Sendmail altogether. Regarding the compilation and update of Sendmail to use the new configuration files, I've run all appropriate commands. I wrote a simple 'MailRestart.sh' to restart the mail server and associated daemons (SpamAssassin and ClamAV), which recompiles the Sendmail configuration and ensures it is reread.

I'll post my problem on a Sendmail board, but I am greatful of your help. Thanks for your replies and sharing your knowledge of tcpdump. I owe you an e-Beer or webhosting (visit the URL in my signature), get in touch if you need either.

Turns out the fix was simple, and the problem due to my stupidity. My custom mail start/stop script called "make start" and the rc.d script, which meant the server was started twice. Once I'd changed this, and set an alternate pid file for the MSP queue in rc.conf everything worked perfectly. I had to change the ownership of /var/spool/clientmqueue to root:wheel (preserving default permissions of 770 worked). The rc.conf section for sendmail now looks as follows -