How can an MX record be added for a domain of univ.edu which will point to a specific host?
Edit the host file for that domain, i.e. TCPWARE_NAMED_ROOT:NAMED.HOSTS.
After the SOA record and NS records for the domain add one or more MX records for the domain. For example to have all mail addressed to user@univ.edu be delivered to the host mail1.univ.edu the NAMED.HOSTS file would contain the following -
@ IN SOA univ.edu. sysmgr.univ.edu. (
1 ; Serial
3600 ; Refresh
600 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS univ.edu.
IN A 192.168.0.1
;
univ.edu. IN MX 1 mail1.univ.edu
mail1 IN A 192.168.0.2
;
The MX record above says that any mail addressed to a univ.edu should be sent to the gateway mail1.univ.edu. The 1 in the MX record is the preference. The preference is the order of delivery when one host has multiple MX records. A host can have multiple MX records so that if an attempt to reach one of the gateways is unsuccessful another can be tried. An example of this would be if the above NAMED.HOSTS was changed to be as follows:
@ IN SOA univ.edu. sysmgr.univ.edu. (
1 ; Serial
3600 ; Refresh
600 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS univ.edu.
IN A 192.168.0.1
;
univ.edu. IN MX 1 mail1.univ.edu
univ.edu. IN MX 2 mail2.univ.edu
mail1 IN A 192.168.0.2
mail2 IN A 192.168.0.3
;
In the example above mail addressed to univ.edu would be sent to the gateway with the lowest preference value, mail1.univ.edu, and if that was unsuccessful it would then be sent to mail2.univ.edu.