I configured a complete mail server with postfix and dovecot. Im running multiple domains on it that means thats I have several email with different domains for example :
[email protected] [email protected] [email protected]
What I want now is instead of using
MX domain1.com
MX domain2.com
MX domain3.com
use :
MX mail.domain1.com
MX mail.domain2.com
MX mail.domain3.com
BUT my email should be still
[email protected]
[email protected]
[email protected]
so, for a single domain configuration you should do in the /etc/postfix/main.cf
myhostname = mail.domain1.com
mydomain = domain1.com
but as I use multiple domain my configuration is a bit different.
My current configuration is the following :
myhostname = domain1.com
mydomain = domain1.com
virtual_alias_domains = domain2.com domain3.com
virtual_alias_maps = hash:/etc/postfix/virtual
in /etc/postfix/virtual I have :
[email protected] hellofirstdomain
[email protected] helloseconddomain
[email protected] hellothirddomain
[email protected] otherfirstdomain
[email protected] otherseconddomain
and so on...
SO, How can I use mail.domain1.com mail.domain2.com mail.domain2.com hostname but keep only domainX.com for my emails ?
Thanks you in advance
I read the postfix documentation but I can't find what I exactly want.