I administer a domain (let's say example.com
) for a client who uses an Exchange server at an external service provider for email. So I made the MX record point to the Exchange server, let's say mail.provider.com
. Now I want email to a single address me@example.com
forwarded to my own email account me@me.com
. Unfortunately, the service provider told me that they're not able to do this for some reason.
Since I have control over the MX record, my idea is to make it point to my own server running Postfix and
- forward email to
me@example.com
tome@me.com
- relay all other addresses to
mail.provider.com
The solution I came up with is to add the domain to relay_domains
and set up a Postfix transport map
relay_domains = example.com
transport_maps = hash:/etc/postfix/transport
that contains
me@example.com virtual:
example.com :[mail.provider.com]
.example.com :[mail.provider.com]
Then add an entry to the virtual alias map
me@example.com me@me.com
I think this should work but it looks a bit ugly. Would this work at all? Is there a nicer solution?