12

I have two forms of the same domain name, one being a common misspelling of the other, let's say tedswidgets.com and tedswigets.com.

I'd like to redirect all mail for <someone>@tedswigets.com to that same <someone>@tedswidgets.com.

There's plenty of information on how to catch all mail from a domain and redirect it to a single address, but I don't want to do that - I want to catch all mail from a domain and redirect it, keeping the username part, and remap it to the equivalent address on the other domain.

Sorry, I should have mentioned that I use virtual alias domains and have a lot of other domains that I serve email for on this server. These two domains are the only two of many that need to mirror each other.

thomasrutter
  • 2,527
  • 1
  • 25
  • 34

2 Answers2

12

Add tedswigets.com to your virtual_alias_domains list and then in your virtual file add:

@tedswigets.com       @tedswidgets.com

According to virtual(5) when the result has the form @otherdomain the result becomes the same user in otherdomain. So @tedswigets will catch all anyuser@tedwigets.com emails and the @tedswidgets in the result will cause it become anyuser@tedswidgets.com.

TimS
  • 2,166
  • 13
  • 8
0

You could add this another domain to postifx mydestination list. See http://www.postfix.org/VIRTUAL_README.html#local

AlexD
  • 8,747
  • 2
  • 29
  • 38