OpenBSD version: 7.0
Arch:            Any
NSFP:            Actually SFP o.O

Short one today… After having setup DMARC reporting for rspamd when migrating to OpenSMTPd, i noticed that my monitoring checks (i should write about that somewhen… ) would fail when reporting time came. rspam would complain, for the majority of reports:

Couldn't send mail for example.com: bad smtp responce on stage quit: "421 server internal error" when "2" expected
...
Couldn't send mail for other.example.com: bad smtp responce on stage quit: "421 server internal error" when "2" expected
Reporting collection has finished 1 dates processed, 27 reports: 8 completed, 19 failed

This, of course, does not look good.

Searching the Internet just brought me the usual “somebody had the same question as you, but never posted answer”. So, in the best spirit of it: Who were you, diana? WHAT DID YOU SEE?!

Redisolution

After some more debugging, I recalled that I ran into issues with my Nextcloud setup (something else I will have to document somewhen). Despite the redis default being a maximum number of 10,000 clients, the OpenBSD package/port default configuration limits this to a (rather non-round) 96 in /etc/redis/redis.conf. As we are sending ‘some’ mails, redis just reaches this limit, and becomes unable to handle more requests, subsequently failing with a tmp-error. So, what we do in /etc/redis/redis.conf is:

- maxclients 96
+ maxclients 10000

After a subsequent rcctl restart redis dmarc reporting no longer kills rspamd. :-)

Note: I just learned that the change was made to make redis play nice with limits by the port’s maintainer… soo… 10k max clients might be a tad too much. ;-)