Hi, Thanks for clearing out this mystery for us and pointing me in the right direction to resolve this. Unfortunately splitting the file isn’t an option as I’m using a script that takes a single file as an argument. For now I’ll inform the upstream about this potential issue and see if we can figure something out. In the meantime I’ll find some other way to work around this.
It does make me curious why it requires such a high FD count and doesn’t fail loudly (sorry, but I can’t afford to dig through the code for this at the moment). On Thu, 2026-09-17 at 00:36 +0200, Kirill A.Korinsky wrote: > 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. >
