gsalcedo
asked on
SMTP server entry on the DNS server
Hi,
I would like to make an SMTP server entry in the DNS server. Can someone instruct me what I need to do to make the entries on the DNS server? I would like to make the SMTP server to be the highest priority for all mails to go through it prior to going to the appropriate mail server. How am I able to do that?
Thank you.
I would like to make an SMTP server entry in the DNS server. Can someone instruct me what I need to do to make the entries on the DNS server? I would like to make the SMTP server to be the highest priority for all mails to go through it prior to going to the appropriate mail server. How am I able to do that?
Thank you.
gsalcedo,
say you have this db file:
$ORIGIN domain.com.
@ 1D IN SOA @ root (
1 ; serial
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
1D IN NS ns1
1D IN NS ns2
localhost IN A 127.0.0.1
www IN A 10.0.0.1
mail IN A 10.0.0.2
@ IN MX 0 mail
in this case the host mail.domain.com will be the primary/only mail exchanger for domain.com.
if you have several mail exchangers, say, mail2 and mail3, but you still want mail.domain.com to be the one with highest priority you could have
mail1 IN A 10.0.0.3
mail2 IN A 10.0.0.4
@ IN MX 0 mail
@ IN MX 10 mail2
@ IN MX 20 mail3
remember the number after 0 is the priority, the smaller the higher the priority. Also, if you would want many domains to go to the same server you'll do the same for each domain db file, and of course the machine will have to be prepared to handle every domain.
say you have this db file:
$ORIGIN domain.com.
@ 1D IN SOA @ root (
1 ; serial
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
1D IN NS ns1
1D IN NS ns2
localhost IN A 127.0.0.1
www IN A 10.0.0.1
mail IN A 10.0.0.2
@ IN MX 0 mail
in this case the host mail.domain.com will be the primary/only mail exchanger for domain.com.
if you have several mail exchangers, say, mail2 and mail3, but you still want mail.domain.com to be the one with highest priority you could have
mail1 IN A 10.0.0.3
mail2 IN A 10.0.0.4
@ IN MX 0 mail
@ IN MX 10 mail2
@ IN MX 20 mail3
remember the number after 0 is the priority, the smaller the higher the priority. Also, if you would want many domains to go to the same server you'll do the same for each domain db file, and of course the machine will have to be prepared to handle every domain.
ASKER
Hi rugdog and yuzh,
Thank you very much for your instructions. I have two db files on the DNS server. One of the db files contains the A and MX record and the other database contains the PTR record (reverse lookup). Currently, I am trying to create a new SMTP server and have it transfer mails to the mail servers. There is one mail server (Server_1) that is currently works as an SMTP and Mail server. Eventually, I would like to eliminate that and create it to be just a mail server. Currently in the first db which contains the A and MX records minus the serial and NS (name server) indication, it looks like this.
;
IN A aaa.aaa.aaa.aaa
IN A 10 server_1
;
;
server_1 IN A aaa.aaa.aaa.aaa
mailhost IN A aaa.aaa.aaa.aaa
mailhost IN A 0 mailhost
smtp IN CNAME server_1
;
;
The above information pertains to one mail server that is also an SMTP server. The mailhost and smtp names are also the server_1. When I create the new SMTP server (server_2) that will be the first server that all incomming and outgoing mails will go through, I will like to make it to have the lowest preference value, which is the highest priority. Can I configure the first db file to be as follows?
;
IN A bbb.bbb.bbb.bbb
IN A 1 server_2
;
IN A aaa.aaa.aaa.aaa
IN A 10 server_1
;
;
server_2 IN A bbb.bbb.bbb.bbb
smtp IN A server_2
;
server_1 IN A aaa.aaa.aaa.aaa
mailhost IN A aaa.aaa.aaa.aaa
mailhost IN A 0 mailhost
;
;
Also, on the PTR db file (reverse lookup), the mail server in the file is entered as follows.
;
IN MX 10 server_1
;
;
aaa.aaa IN PTR server_1.abc.com
;
When I include the new SMTP server, can I make entries as follows...?
;
IN MX 1 server_2
;
IN MX 10 server_1
;
;
bbb.bbb IN PTR server_2.abc.com.
;
aaa.aaa IN PTR server_1.abc.com.
;
Thank you very much for your help.
Thank you very much for your instructions. I have two db files on the DNS server. One of the db files contains the A and MX record and the other database contains the PTR record (reverse lookup). Currently, I am trying to create a new SMTP server and have it transfer mails to the mail servers. There is one mail server (Server_1) that is currently works as an SMTP and Mail server. Eventually, I would like to eliminate that and create it to be just a mail server. Currently in the first db which contains the A and MX records minus the serial and NS (name server) indication, it looks like this.
;
IN A aaa.aaa.aaa.aaa
IN A 10 server_1
;
;
server_1 IN A aaa.aaa.aaa.aaa
mailhost IN A aaa.aaa.aaa.aaa
mailhost IN A 0 mailhost
smtp IN CNAME server_1
;
;
The above information pertains to one mail server that is also an SMTP server. The mailhost and smtp names are also the server_1. When I create the new SMTP server (server_2) that will be the first server that all incomming and outgoing mails will go through, I will like to make it to have the lowest preference value, which is the highest priority. Can I configure the first db file to be as follows?
;
IN A bbb.bbb.bbb.bbb
IN A 1 server_2
;
IN A aaa.aaa.aaa.aaa
IN A 10 server_1
;
;
server_2 IN A bbb.bbb.bbb.bbb
smtp IN A server_2
;
server_1 IN A aaa.aaa.aaa.aaa
mailhost IN A aaa.aaa.aaa.aaa
mailhost IN A 0 mailhost
;
;
Also, on the PTR db file (reverse lookup), the mail server in the file is entered as follows.
;
IN MX 10 server_1
;
;
aaa.aaa IN PTR server_1.abc.com
;
When I include the new SMTP server, can I make entries as follows...?
;
IN MX 1 server_2
;
IN MX 10 server_1
;
;
bbb.bbb IN PTR server_2.abc.com.
;
aaa.aaa IN PTR server_1.abc.com.
;
Thank you very much for your help.
ASKER
Sorry... I would like to make some corrections on the first database file that I would like it to be.. if it is possible.
Hi rugdog and yuzh,
Thank you very much for your instructions. I have two db files on the DNS server. One of the db files contains the A and MX record and the other database contains the PTR record (reverse lookup). Currently, I am trying to create a new SMTP server and have it transfer mails to the mail servers. There is one mail server (Server_1) that is currently works as an SMTP and Mail server. Eventually, I would like to eliminate that and create it to be just a mail server. Currently in the first db which contains the A and MX records minus the serial and NS (name server) indication, it looks like this.
;
IN A aaa.aaa.aaa.aaa
IN A 10 server_1
;
;
server_1 IN A aaa.aaa.aaa.aaa
mailhost IN A aaa.aaa.aaa.aaa
mailhost IN A 0 mailhost
smtp IN CNAME server_1
;
;
The above information pertains to one mail server that is also an SMTP server. The mailhost and smtp names are also the server_1. When I create the new SMTP server (server_2) that will be the first server that all incomming and outgoing mails will go through, I will like to make it to have the lowest preference value, which is the highest priority. Can I configure the first db file to be as follows?
;
IN A bbb.bbb.bbb.bbb
IN A 1 server_2
;
IN A aaa.aaa.aaa.aaa
IN A 10 server_1
;
;
server_2 IN A bbb.bbb.bbb.bbb
smtp IN A server_2
;
server_1 IN A aaa.aaa.aaa.aaa
mailhost IN A aaa.aaa.aaa.aaa
mailhost IN mx 2 mailhost
;
;
Also, on the PTR db file (reverse lookup), the mail server in the file is entered as follows.
;
IN MX 10 server_1
;
;
aaa.aaa IN PTR server_1.abc.com
;
When I include the new SMTP server, can I make entries as follows...?
;
IN MX 1 server_2
;
IN MX 10 server_1
;
;
bbb.bbb IN PTR server_2.abc.com.
;
aaa.aaa IN PTR server_1.abc.com.
;
Thank you very much for your help.
Hi rugdog and yuzh,
Thank you very much for your instructions. I have two db files on the DNS server. One of the db files contains the A and MX record and the other database contains the PTR record (reverse lookup). Currently, I am trying to create a new SMTP server and have it transfer mails to the mail servers. There is one mail server (Server_1) that is currently works as an SMTP and Mail server. Eventually, I would like to eliminate that and create it to be just a mail server. Currently in the first db which contains the A and MX records minus the serial and NS (name server) indication, it looks like this.
;
IN A aaa.aaa.aaa.aaa
IN A 10 server_1
;
;
server_1 IN A aaa.aaa.aaa.aaa
mailhost IN A aaa.aaa.aaa.aaa
mailhost IN A 0 mailhost
smtp IN CNAME server_1
;
;
The above information pertains to one mail server that is also an SMTP server. The mailhost and smtp names are also the server_1. When I create the new SMTP server (server_2) that will be the first server that all incomming and outgoing mails will go through, I will like to make it to have the lowest preference value, which is the highest priority. Can I configure the first db file to be as follows?
;
IN A bbb.bbb.bbb.bbb
IN A 1 server_2
;
IN A aaa.aaa.aaa.aaa
IN A 10 server_1
;
;
server_2 IN A bbb.bbb.bbb.bbb
smtp IN A server_2
;
server_1 IN A aaa.aaa.aaa.aaa
mailhost IN A aaa.aaa.aaa.aaa
mailhost IN mx 2 mailhost
;
;
Also, on the PTR db file (reverse lookup), the mail server in the file is entered as follows.
;
IN MX 10 server_1
;
;
aaa.aaa IN PTR server_1.abc.com
;
When I include the new SMTP server, can I make entries as follows...?
;
IN MX 1 server_2
;
IN MX 10 server_1
;
;
bbb.bbb IN PTR server_2.abc.com.
;
aaa.aaa IN PTR server_1.abc.com.
;
Thank you very much for your help.
if you want all incoming traffic of email @yourdomain.com use this on the first db file:
server_2 IN A bbb.bbb.bbb.bbb
@ IN MX 1 server_2
if you add also,
@ IN MX 10 server_1
that will mean that if server_2 is unavailable, the sender will try server_1.
The entry you have like:
mailhost IN mx 2 mailhost
is wrong because it means that all email directed @mailhost.yourdomain.com will go to mailhost, and I assume you want an MX for yourdomain.com.
Also, no MX records should be defined in the in-addr db file, the MX records only make sense in forward domain db files.
server_2 IN A bbb.bbb.bbb.bbb
@ IN MX 1 server_2
if you add also,
@ IN MX 10 server_1
that will mean that if server_2 is unavailable, the sender will try server_1.
The entry you have like:
mailhost IN mx 2 mailhost
is wrong because it means that all email directed @mailhost.yourdomain.com will go to mailhost, and I assume you want an MX for yourdomain.com.
Also, no MX records should be defined in the in-addr db file, the MX records only make sense in forward domain db files.
ASKER
Hi rugdog,
I really appreciate your help. I notice that you used the "@" sign. Can it be used on any UNIX DNS server's db file?
I really appreciate your help. I notice that you used the "@" sign. Can it be used on any UNIX DNS server's db file?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.han.com/dns.html
http://www.akadia.com/services/sendmail_tips.html
To learn more about setup seandmail, have a look at the following pages:
http://www.kempston.net/solaris/configsendmail.html
http://www.sendmail.org/
http://www.arrayservices.com/projects/Exchange-HOWTO/html/x354.html
http://www.sendmail.org/m4/anti_spam.html
http://tarkus.pha.jhu.edu/sysadmin/generic/sendmail.html
http://www.sendmail.fr/products/msmgr_antispam.shtml
http://www.sendmail.com/