Hi Community, I am currently working on a project for a rewriting gateway with postfix, which shall mask two independent internal domains behind a third external DNS name. In general it should accept mails from @internal1.com and @internal2.com as a Smarthost, rewrite the addresses with a new @newcorp.com domain and send it to the public network. Besides the outgoing rewrite it also needs to rewrite incoming mail to both internal domains and transport them to the right Exchange organizations.
I managed to rewrite the outgoing messages with the "generic_maps" and a simple filetable, but there are still some issues: * Rewritten incoming messages get a new "To" field in the header via "canonical_maps" and they are delivered with the correct transport rule, but the internal mail server receives a mail for @newcorp.com and cannot deliver it to the right mailbox anymore * Messages rewritten with "header_checks" cannot be delivered too, because of the same reason mentioned above * Messages from @internal1.com to @internal2.com are rewritten too and not deliverable anymore, because the gateway does not know which transport rule it has to use * Encrypted and signed mails are rewritten too and are not useable anymore Therefore I do now have some questions for you: * Is it possible to do a conditional rewrite with "header_checks" and "mime_header_checks" and to filter ancrypted mails and mails "from internal1 to internal2" and backwards? * Is it possible to totally rewrite incoming mails like those outgoing mails? There are no problems with the "generic" function, but "canonical" and "header_rewrite" just won't work the way I need them. * Is it possible at all to create a black box rewrite gateway the way I need it or do I need the internal mail servers to know the external domain in any case? Thank you all a lot in advance for your thoughts and ideas about my problems! With best regards Dennis Weber
