We have a scenario where an internal service sends with a domain that needs rewriting to one that the firewall relay can successfully deliver i.e.
mailbox1@internaldomain.net needs rewriting to mailbox1@correctdomain.com
Our initial research suggested that the Postfix plugin could achieve this with "Sender Canonical Rewriting" but found little documentation on how to correctly complete the fields. Posts elsewhere on this forum suggested we should format the original sender (entered into "Rewrite From") like this:
/mailbox1@internaldomain.net/i
and then the replacement address (entered into "Rewrite To") simply as:
mailbox1@correctdomain.com
However configured like this the sender address is not rewritten and the mail gets relayed with the original "From:" address and the headers do not contain the replacement address anywhere.
Is there any additional documentation on how to achieve the rewrite correctly?
NB the only entry in the logs referencing "canonical" is this: warning: regexp map /usr/local/etc/postfix/sendercanonical, line 1: ignoring unrecognized request but it is from a week ago, not repeated on subsequent service restarts nor when mail flows
All suggestions welcome!
Regards
Chris