I’m trying to figure out how to properly redirect / forward an incoming mail to an external e-mail address (outside the mailcow).
With “properly” I mean that I don’t want the forwarded e-mail to end up in the spam folder or worse risking that my mail servers IP is put on blacklist cause of wrong headers.
My old mailserver was configured to use SRS which never caused any problems.
I figured out two ways to do forward mails:
Aliases don’t seem like a great idea since mailcow does not support SRS. So I decided to use a sieve filter with a redirect rule. The incoming mail gets forwarded and certain headers like “X-Sieve-Redirected-From” are added. However, the forwarded mail receives a small spam score and stuff like dkim does not seem to be working. “To” and “From” are unchanged and SpamAssassin tells me: “HEADER_FROM_DIFFERENT_DOMAINS” - From and EnvelopeFrom 2nd level mail domains are different.
What is the right way to properly redirect incoming mails? Should I manually rewrite headers in the sieve filter? Wouldn’t this also break S/MIME signatures? Or is the only way to achieve this to implement SRS?
If my mail server forwards mails, isn’t the mail server itself a sender ands needs DKIM keys? A similar question was asked before but received no explicit answer (https://community.mailcow.email/d/1265-do-i-need-dkim-record-for-mailcow-hostname). But how would I add the keys since Mailcow forbids adding the hostname as mail domain? Also, adding the keys for the mailservers hostname manually in the admin panel, leaves a “Key unused” label.