I'm trying to setup postfix to use multi-domains mail.
Right now, I can send mails to [email protected]
, but sending mails to [email protected]
isn't working: I receive the following email while trying to send emails to this address
Delivery to the following recipient failed permanently:
[email protected]
Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the server for the recipient domain domain2.com by redirect.ovh.net. [213.186.33.5].
The error that the other server returned was:
550 sorry, no mailbox here by that name (#5.1.1)
main.cf
myhostname = domain1.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = ns3289160.ip-5-135-180.eu, localhost.ip-5-135-180.eu, localhost
virtual_alias_domains = domain2.com
virtual_alias_maps = hash:/etc/postfix/virtual/addresses
/etc/postfix/virtual/addresses
domain2.com DOMAIN
[email protected] user
I genuinely have no clue about what's going on, knowing that I never switch my MX entries on my domain name (it still points to redirect.ovh.net, that stands for, according to their documentation, the mx for personnal mailboxes).
How can I properly set everything up so that I can be able to use postfix with a personalized mail address ? (such as domain1.com
instead of ns**.eu
)
; <<>> DiG 9.9.5-3ubuntu0.1-Ubuntu <<>> domain2.com mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15795
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; MBZ: 0005 , udp: 512
;; QUESTION SECTION:
;domain2.com. IN MX
;; ANSWER SECTION:
domain2.com. 5 IN MX 1 redirect.ovh.net.
;; Query time: 156 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Thu Apr 02 18:26:12 EDT 2015
;; MSG SIZE rcvd: 76
The names domain2.com, user have been changed...
dig domain2.com mx
?domain2.com
to your server.