?
Solved

SMTP server entry on the DNS server

Posted on 2004-11-04
7
Medium Priority
?
273 Views
Last Modified: 2013-12-27
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.
0
Comment
Question by:gsalcedo
  • 3
  • 3
7 Comments
 
LVL 7

Expert Comment

by:rugdog
ID: 12501014
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.

0
 

Author Comment

by:gsalcedo
ID: 12505334
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.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:gsalcedo
ID: 12505372
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.
0
 
LVL 7

Expert Comment

by:rugdog
ID: 12505790
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.




0
 

Author Comment

by:gsalcedo
ID: 12506378
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?
0
 
LVL 7

Accepted Solution

by:
rugdog earned 1000 total points
ID: 12506478
yes, it is a BIND standard, the @ refers to the $ORIGIN value in your db file, so in the example i wrote at the beginning I used:

$ORIGIN yourdomain.com.

so very time the @ appears it refers to yourdomain.com.

0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month14 days, 21 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question