Create MX Record for Subdomain

7,014

This is how I would configured it, based on the slightly vague information, provided. You could make adjustments, as needed:

$TTL 1D
@                       IN      SOA     ns.domain.edu. support.domain.edu. (
                                        2017090501      ; serial
                                        1D              ; refresh
                                        1H              ; retry
                                        1W              ; expire
                                        3H )            ; minimum

                                NS      ns.domain.edu.
                                MX 10   mail.domain.edu.
                                TXT     "v=spf1 mx ~all"

ns                      IN      A       10.10.10.2
mail                    IN      A       10.10.10.10

student                 IN      MX 10   mail.student.domain.edu.
student                 IN      TXT     "v=spf1 mx ~all"
mail.student            IN      A       10.0.0.10



$ dig domain.edu any

;; ANSWER SECTION:
domain.edu.             86400   IN      SOA     ns.domain.edu. support.domain.edu. 2017090501 86400 3600 604800 10800
domain.edu.             86400   IN      NS      ns.domain.edu.
domain.edu.             86400   IN      MX      10 mail.domain.edu.
domain.edu.             86400   IN      TXT     "v=spf1 mx ~all"

;; ADDITIONAL SECTION:
ns.domain.edu.          86400   IN      A       10.10.10.2
mail.domain.edu.        86400   IN      A       10.10.10.10



$ dig student.domain.edu any

;; ANSWER SECTION:
student.domain.edu.     86400   IN      MX      10 mail.student.domain.edu.
student.domain.edu.     86400   IN      TXT     "v=spf1 mx ~all"

;; AUTHORITY SECTION:
domain.edu.             86400   IN      NS      ns.domain.edu.

;; ADDITIONAL SECTION:
mail.student.domain.edu. 86400  IN      A       10.0.0.10
ns.domain.edu.          86400   IN      A       10.10.10.2

P.S. Using a particular SPF mechanism is an administrative decision in most of the cases, rather than technical.

Share:
7,014

Related videos on Youtube

zegufe
Author by

zegufe

Updated on September 18, 2022

Comments

  • zegufe
    zegufe almost 2 years

    I have two Zimbra mail servers. One of them serve for stuff and the other one serve for student. So I want to create use two different mail template like [email protected] and [email protected].

    I have no problem for [email protected].

    For student I created a sub domain like studentlogin.domain.edu

    I use Bind 9 on Centos 7.

    But when a try a mail a have error message like "The address not found".

    You can see my config.

        studentlogin.domain.edu.     IN  MX      10   mail.student.domain.edu.
        studentlogin.domain.edu.     IN  A       XX.XXX.XXX.XXX
        studentlogin.domain.edu.     IN  TXT     "v=spf1 a mx ptr a:mail.student.domain.edu mx:mail.student.domain.edu ip4:XX.XXX.XXX.XXX ~all"
    

    What I should do?

    Please help.

    Best regards.

  • zegufe
    zegufe almost 7 years
    Thank you very much Chris. My rDNS record is correct. In addition when i use same subdomain and same mail address such as student.domain.edu subdomain and [email protected] mail it works. But when i use different subdomain and mail address like studentlogin.domain.edu and [email protected] it doesnt work.