In case anyone else is having this problem recently, I discovered that my dnsmasq was caching poorly because spamhaus.org's SOA TTL is only 10s.
FTR, spamhaus.org is queried by spamassassin and uses NXDOMAIN DNS responses to indicate "not-spam-site". WIth a SOA TTL of only 10s, these responses are barely cacheable. When a burst of mail arrives, all the spamassassin workers hammer dnsmasq with un-cacheable requests, one per incoming email. I suspect the 10s TTL is a recent-ish mistake and have sent spamhaus.org an email about it. In the mean time your best workaround is to override the TTL with the following entry in your dnsmasq.conf min-cache-ttl=60 This will cache all responses for at least 1m. -- Donovan Baarda <a...@minkirri.apana.org.au>