Mail SRS conflict with per-sender-domain rule

Thanks for the report, you’re right. The automatic SRS check in 1.9.1 only looks at the default relay route (the one for all outgoing mail), not at relay rules for a specific sender domain. With such a rule, the rewritten sender SRS0=...@yourdomain matches the rule, so forwarded mail goes through the smarthost, and the smarthost refuses it.

I reproduced it and filed a bug: Mail: forwarded mail rejected by a smarthost configured with a sender relay rule · Issue #8322 · NethServer/dev · GitHub

Until a fix is released, you can turn SRS off. Run these commands as root, and replace mail1 with your mail module instance:

runagent -m mail1 python3 -c 'import agent ; agent.set_env("POSTFIX_SRS", "0")'
runagent -m mail1 systemctl --user reload postfix

Forwarded mail will then keep its original sender, as it did before 1.9.