I probed manually the spf behaivoir with one of the problematic domains that triggers the DNS Lookup error and obtained that:
/usr/bin/spfquery_static -ip 18.104.22.168 -sender firstname.lastname@example.org
Context: Failed to query MAIL-FROM
ErrorCode: (26) DNS lookup failure
Error: Temporary DNS failure for 'm-bgtb.maxmailing.com.ar'.
Please see http://www.openspf.org/Why?id=from%40m- ... r=spfquery
: Reason: default
spfquery: 22.214.171.124 is neither permitted nor denied by domain of m-bgtb.maxmailing.com.ar
Received-SPF: neutral (spfquery: 126.96.36.199 is neither permitted nor denied by domain of m-bgtb.maxmailing.com.ar) client-ip=188.8.131.52; email@example.com
I reproduced here manually, this is the answer that triggers the pipe problem to qmail-scanner, and obtained a delay of 18 seconds at execution time because the problem is with faulty DNS. May be it's a problem with a timeout generating this? Can I manage timeouts on qmail-scanner or qmail-queue?