Before opening a new ticket, I have quickly searched github to see if there were new tickets. This one doesn’t seem new, but related.
Only, I do not understand what seems to be the solution. The thread mentions to modify the configuration is one is using the unauthenticated relaying configuration, and also mentions setting forwarding hosts as a fix. So, all in all, the ticket is confusing me even more, but it seems that the PR that caused all this is #5812.
In the github thread linked to above, Patrick Schult (FreddieSpl0it) mentions updating the documentation if this works, but I have not seen this mentioned in the documentation yet and unfortunately, the github thread has been locked for additional comments.
In any case, if one of the maintainers reads this, the solution does seem to work and is more like the solution I was looking for, being persistent and more or less maintainable.
Mail is now signed, not for being part of sign_networks but for being part of local_addrs:
rspamd-mailcow-1 | 2024-05-26 16:33:29 #42(normal) <9fdbd0>; dkim_signing; lua_dkim_tools.lua:191: mail is from local address
rspamd-mailcow-1 | 2024-05-26 16:33:29 #42(normal) <9fdbd0>; dkim_signing; lua_dkim_tools.lua:407: use domain(envelope) for signature: sending-domain.tld
rspamd-mailcow-1 | 2024-05-26 16:33:29 #42(normal) <9fdbd0>; dkim_signing; lua_dkim_tools.lua:427: final DKIM domain: sending-domain.tld
rspamd-mailcow-1 | 2024-05-26 16:33:29 #42(normal) <9fdbd0>; dkim_signing; lua_dkim_tools.lua:48: add selector "dkim" using default selector
rspamd-mailcow-1 | 2024-05-26 16:33:29 #42(normal) <9fdbd0>; dkim_signing; lua_dkim_tools.lua:53: set domain to "sending-domain.tld" using dkim_domain
rspamd-mailcow-1 | 2024-05-26 16:33:29 #42(normal) <9fdbd0>; dkim_signing; lua_dkim_tools.lua:569: found and parsed key for sending-domain.tld:dkim in Redis
rspamd-mailcow-1 | 2024-05-26 16:33:29 #42(normal) <>; dkim; rspamd_dkim_sign_key_load: got public key with length 1703 and type 4
In a nutshell:
If you have modfied mynetworks in data/conf/postfix/extra.cf, then set the same networks as local_addrs in data/conf/rspamd/local.d/options.inc. Only watch out, the syntax is not the same for postfix and rspamd:
(new)root@hoth:/opt/mailcow-dockerized# cat data/conf/rspamd/local.d/options.inc
dns {
enable_dnssec = true;
}
map_watch_interval = 30s;
disable_monitoring = true;
# In case a task times out (like DNS lookup), soft reject the message
# instead of silently accepting the message without further processing.
soft_reject_on_timeout = true;
#local_addrs = /etc/rspamd/custom/mailcow_networks.map;
# See https://github.com/mailcow/mailcow-dockerized/issues/5826#issuecomment-2041952576
local_addrs = [127.0.0.0/8, ::ffff:127.0.0.0/104, ::1/128, fe80::/10, 172.22.1.0/24, fd4d:6169:6c63:6f77::/64, 10.24.0.0/24, 192.168.122.0/24];
(new)root@hoth:/opt/mailcow-dockerized# cat data/conf/postfix/extra.cf
myhostname = mail.sending-domain.tld
# Note: 172.22.1.0/24 and [fd4d:6169:6c63:6f77::]/64 is the mailcow bridge interface and MUST be included!
# See https://docs.mailcow.email/manual-guides/Postfix/u_e-postfix-unauthenticated-relaying/
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 [fe80::]/10 172.22.1.0/24 [fd4d:6169:6c63:6f77::]/64 10.24.0.0/16 192.168.122.0/24