I need to make an "MX chain" as the following:
@alias.mydomain.net --> @mail.mydomain.net --> @smtp.targetdomain.net
(1) (2) (3)
Say an SMTP server exists at
smtp.targetdomain.net
:$ host smtp.targetdomain.net smtp.targetdomain.net has address 1.2.3.4
Say my own domain name is
mydomain.net
. Currently, the jump between(2)
and(3)
works with the following configuration:mail 10800 IN MX 1 smtp.targetdomain.net.
Let's check it:
$ host mail.mydomain.net mail.mydomain.net mail is handled by 1 smtp.targetdomain.net.
An email sent to foo@mail.mydomain.net is received.
But the jump between
(1)
and(2)
doesn't work with the following configuration:alias 10800 IN MX 1 mail mail 10800 IN MX 1 smtp.targetdomain.net.
Let's check it:
$ host alias.mydomain.net alias.mydomain.net mail is handled by 1 mail.mydomain.net.
An email sent to foo@alias.mydomain.net is not received, and a delivery failure mail is sent back to the sender:
< #5.0.0 smtp; 5.1.2 - Bad destination host "DNS Hard Error looking up alias.mydomain.net (MX): all A records of the domain's MX records are invalid" (delivery attempts: 0)> #SMTP#
Is it possible to make such an MX record chain? Do I need to use the following configuration instead?
alias 10800 IN MX 1 smtp.targetdomain.net.
mail 10800 IN MX 1 smtp.targetdomain.net.