I have one server hosting several domains - one main domain and several alias domains.
Domains
main.com
alias1.com
alias2.com
I use the domain name registra's (Gandi.net) email service for the main domain. I would like all emails to the alias domains to be forwarded to the email service for the main one. Which I think means just forward them to @main.com
I'm struggling with Postfix (and maybe DNS?) settings.
DNS
main mx records
fb.mail.gandi.net <-- Gandi's settings - I'm sure they're correct
spool.mail.gandi.net
alias1 mx records
mail.alias1.com
alias2 mx records
mail.alias2.com
All domains have an A/AAAA record for mail.[domain].com which points to the server IP address.
I also have a 4th domain (superdomain.com) which I am using as the server's hostname. It's DNS records look the same as main.com.
Using this page from Postfix - http://www.postfix.org/VIRTUAL_README.html - it looks like I can use virtual alias domains
main.cf settings
myhostname = mail.superdomain.com
mydestination = pluto.superdomain.com localhost.superdomain.com localhost $myhostname localhost.$mydomain
virtual_alias_domains = alias1.com alias2.com
virtual_alias_maps = hash:/etc/postfix/virtual
relay_domains = main.com
virtual file contents
@alias1.com @main.com
@alias2.com @main.com
The settings might look a little odd. I've tried quite a few combinations thus far :-P. The structure of the virtual file comes from the answer to How to redirect all mail from one domain to another in Postfix? [serverfault.com]
Based on the bounce backs from test emails - I seem to be getting "connection refused" results.
Any ideas or tips?