<source>
An SPF record can refer to other domains, and those to further ones. While parsing it, the node makes DNS queries, and some of them come back empty: the name does not exist or the answer is empty. This line sets how many such answers to tolerate before declaring the check a permanent error.
The default is two. The manual explains why: a low threshold prevents your check from being turned into a way to load someone else’s resolver. The flip side is named in the same place — complex records may fail to parse.
When the threshold is exceeded, there is one outcome: a permanent error. What to do with it is decided by reject-spf-check-permerror.
Keep the default. It balances the two extremes named in the manual.
Raise it only after figuring out whose records fail. A complex record at a large sender is a reason; a dozen unknown domains are not.
There is no point lowering it. Below two, only the simplest records remain, and the load on the resolver drops insignificantly.
# the default is kept on purpose <source 0/0> check-spf-inbound true check-spf-inbound-max-void-lookups 2</source>
what people get wrong and how it ends1 mistake▶
our experience
2 relations
grep -n max-void-lookups /etc/pmta/config grep -ci 'permerror' /var/log/pmta/pmta.log
3 articles
◇Who is allowed to submit mail and for whom to accept itOut of the box, the node accepts submission only from the machine itself; two different questions — “who can send through us” and “for whose addresses we accept mail” — are answered by different directives.◇Two inbound report processors and what to do with themBounces by message and complaints are parsed by two identically structured blocks; each has its own address list and its own pair of decisions about the message’s fate.◇Address lists — named and unnamedA list of addresses, domains, patterns or hashes; a named one is attached by directives such as suppression, an unnamed one lives inside an inbound mail processor.