Redhat – Setting up Red Hat Enterprise Linux Server as a mail exchange server

active-directorydomain-name-systemmx-recordredhatwindows-server-2008

I am a Unix/Linux/Windows Server noob. So, keep that in mind before you throw your stones at my glass house. 😛

I have a Windows Server 2008 R2 machine that's acting as domain controller, Server A. It's also running a DNS server. I have a Red Hat Enterprise Linux Server 5.3, Server B that is intended for mail server.

In order for the mail delivery to happen, I understand that I have to set an MX record on Server A and point it to Server B. Well, I did. I manually added a host name on Server A and pointed to Server B's IP address. Then I added an MX record and pointed it to the host name. That didn't do the trick. After taking the above steps, I used the "dig" command on Server B to lookup the MX record coming back from Server A and it wasn't what I was expecting.

What am I doing wrong here?

I have noticed that… my Windows machines that are joined to the domain (Server A) are listed under the host names. The machines that are not joined to the domain are not list. This is fine, I am not worried about this. What does concern me, do I have to join the Server B to domain in order for Server A to recognize as a valid host and forward the MX properly? If so, some simple steps on how to join Server B to the domain would also help.

Additional Details:

Windows Server 2008 R2 Domain controller's name: Zeus
Red Hat Enterprise Linux Server's name: Mail

Forward Lookup Zone Records on Zeus:

  • mail, Host (A) 192.168.8.18
  • mail, Mail Exchanger (MX), [10] mail.domain.com

Result from running nslookup -type=mx domain.com on Zeus (Server A):

1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa
    primary name server = 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa
    responsible mail addr = (root)
    serial  = 0
    refresh = 28800 (8 hours)
    retry   = 7200 (2 hours)
    expire  = 604800 (7 days)
    default TTL = 86400 (1 day)
Server:  UnKnown
Address:  ::1

domain.com.domain.com   MX preference = 10, mail exchanger = mail

Result from running dig domain.com mx on Mail (Server B):

; <<>> DiG 9.3.4-P1 <<>> domain.com mx
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59592
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;domain.com.INMX

;; AUTHORITY SECTION:
domain.com.3600INSOAzeus.domain.com. hostmaster.domain.com. 105 900 600 86400 3600

;; Query time: 0 msec
;; SERVER: 192.168.8.12#53(192.168.8.12)
;; WHEN: Sat Feb  5 22:49:12 2011
;; MSG SIZE  rcvd: 81

Best Answer

Provided info shows that answer is coming from 192.168.8.12 (is that zeus?), it is not an authoritative answer for this zone and it could not find MX record for domain.com