Hi @Pagaille,
I think I may have found the root cause, but I’d like to check my understanding with you.
Last year you added the following Dovecot override yourself:
“sieve_vacation_send_from_recipient = yes”
Was the only reason for this that your smarthost rejects messages with a null envelope sender (“<>”)?
If so, I wonder if this is actually exposing a deeper issue in “ns8-mail”.
From what I can see, NS8 builds “myorigin” as “.localhost” (in “reload-config”) and routes internal mail through that domain. As a result, the final LMTP recipient becomes something like:
“user@mail.myserver.be.localhost”
With “sieve_vacation_send_from_recipient = yes”, Pigeonhole uses that final recipient as the envelope sender, so the internal “.localhost” domain leaks to the outside world.
Could this be what you’re seeing?
If that’s the case, the real issue would not be SOGo. SOGo only generates the Sieve script and sets the “From:” header correctly. Instead, it looks like the combination of Dovecot, Postfix and the NS8 mail routing causes the invalid envelope sender. Rspamd then refuses to DKIM-sign because the envelope domain no longer matches the “From:” header domain, which ultimately results in Gmail rejecting the message.
Does that match your setup and the behavior you observed? Or am I missing something?