Posts Tagged ‘name server’

How to configure DNS Server for Mail Server on Linux


Hi again

First you should install the BIND DNS package in your linux server. you can simply install either with aptitude and yum installer or compile it  in your linux. (if you decided to compile approach just wait , i will explain you in my few next posts.)

so you should type:

aptitude install bind9


yum install bind.i386

(if you don’t know what exactly the name of package is, you can simply search your package name via the installer. for instance aptitude search bind)

then you should configure your mail server.

the main configuration file of the BIND by default is in the /etc/bind/ directory. therefore you start edit your named configuration files.

vim /etc/bind/named.conf

add the blow configuration before the last  }; in the file.

zone “” {
type master;
file “/etc/bind/mehdibehamin.local”;

as you sea you should create the zone configuration file. for instance in the above configuration i set it as mehdibehamin.local.

therefore save the named.conf and in the /etc/bind/ create the new file with the mentioned name.and insert these configuration in it.

$TTL    86400
@               IN              SOA     (
1                                                                                                                                                                    ; Serial
604800         ; Refresh
86400         ; Retry
2419200         ; Expire
86400 )       ; Negative Cache TTL
@                         IN                NS    
www                 IN                 A       
mx                     IN                 A      IN      MX      10

note: you can copy the template of the configuration file from /etc/bind/db.local and then edit it :)

with the last configuration line all the packet which mail server sent to transmited into ip address. (which is the smpt or mail server IP address).

thats it.


     Copyrighted Mehdi Behamin , All Rights Reserved
Blog has been visited 204745 times