On Tue, 15 Sep 2026 20:02:19 +0200, Igor Zornik <[email protected]> wrote: > > Hello, > > Does anyone else get noticeable discrepancies in the resulting list > of IPs based on whether you run SPF walk as root or under a regular > account? For instance, when running something like “smtpctl spf > walk < common_domains.txt > common_domains_ip.txt”, the output > file contains approximately 20% more addresses than when running it > as root. Does anyone have an explanation for such behavior? You can > try it with an example list of common domains I’ve prepared at > https://ports.mocheryl.org/tmp/common_domains.txt >
Yes, here an explanation: spf-walk $ ftp https://ports.mocheryl.org/tmp/common_domains.txt Trying 46.23.94.76... Requesting https://ports.mocheryl.org/tmp/common_domains.txt 100% |*******************************************************************************************************************************| 2092 00:00 2092 bytes received in 0.00 seconds (1.46 MB/s) spf-walk $ smtpctl spf walk <common_domains.txt | sort > user.txt smtpctl: lookup_record: %{i}._spf.mta.salesforce.com contains macros and can't be resolved spf-walk $ doas smtpctl spf walk <common_domains.txt | sort > root.txt smtpctl: lookup_record: %{i}._spf.mta.salesforce.com contains macros and can't be resolved spf-walk $ ulimit -S -n 128 spf-walk $ smtpctl spf walk <common_domains.txt | sort > user-128.txt smtpctl: lookup_record: %{i}._spf.mta.salesforce.com contains macros and can't be resolved spf-walk $ wc -l *.txt 183 common_domains.txt 957 root.txt 970 user-128.txt 1239 user.txt 3349 total spf-walk $ and when I read the code: https://github.com/openbsd/src/blob/master/usr.sbin/smtpd/spfwalk.c#L146-L147 I see that it give us on the error, like not enough fd. If you split your list, I think 128 fd will be enough. -- wbr, Kirill
