Beruflich Dokumente
Kultur Dokumente
Select the NIC & get a window where assign IP address net mask gateway etc.
Then enter the hostname & domain name. ere networking is always yes.
# vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=dns.asianatelbd.com
options {
listen-on port 53 { 127.0.0.1; 192.168.2.1; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
query-source port 53;
query-source-v6 port 53;
allow-query { localhost; 192.168.2.0/24; };
};
Here the
listen-on port 53 loop back & DNS IP.
allow-query { localhost; 192.168.2.0/24; }; (This IP block query this DNS)
.
Check the named.conf file
[root@dns etc]#named-checkconf named.conf
The domain name, reverse IP and forward zone & reverse zone file names are declare here
[root@dns etc]# vim named.rfc1912.zones
zone "asianatelbd.com" IN {
type master;
file "asianatel.fz";
allow-update { none; };
};
zone "2.168.192.in-addr.arpa" IN {
type master;
file "asianatel.rz";
allow-update { none; };
};
By using this command test the named file is ok or have any error.
[root@dns etc]# service named configtest
Enter this location & create the forward zone, reverse zone file.
[root@dns named]# cd /var/named/chroot/var/named/
You can copy the named.local file, rename it which is declare the named.rfc1912.zones file The
forward zone, reverse zone file's permission 640 and group owner must named.
1 IN PTR asianatelbd.com
1 IN PTR dns.asianatelbd.com
2 IN PTR mail..asianatelbd.com
Here, status is always noerror.If status show any error or servfail or NXDOMAIN the DNS can't
resolv this domain or IP..
Check the system time & date.By default dovecot.pem file containing a private key and self signed
certificate, remove it.
[root@dns ~]# vim /etc/dovecot.conf
protocols = imap imaps pop3 pop3s
Send a test message & check the dovecot private key certification
[root@dns ~]# echo 'this a test' | mail -s test root
The sendmail.mc file is human readable and sendmail.cf file is machine readable. So make this file
machine readable by using the microprocessor m4
[root@dns ~]# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
Here asianatelbd.com domain accesses this mail server and 192.168.3.0/24 is rejecting from this
mail server.
Entry the mail domain name at DNS forward & reverse zone file
[root@dns ~]#vim asianatelbd.fz
$TTL 86400
@ IN SOA dns.asianatelbd.com. root@asianatelbd.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS dns.asianatelbd.com.
IN MX 10 mail.asianatelbd.com.
asianatelbd.com IN A 192.168.2.1
dns IN A 192.168.2.1
mail IN A 192.168.2.2
1 IN PTR asianatelbd.com
1 IN PTR dns.asianatelbd.com
2 IN PTR mail.asianatelbd.com
To login into mail server by using 25 port and send a test mail
[root@dns ~]# telnet mail.asianatelbd.com 25
Trying 192.168.2.1...
Connected to mail.asianatelbd.com (192.168.2.1).
Escape character is '^]'.
220 dns.asianatelbd.com ESMTP Sendmail 8.13.8/8.13.8; Tue, 30 Dec 2008 00:31:38 -0500
mail from: <tito@asianatelbd.com>
250 2.1.0 <tito@asianatelbd.com>... Sender ok
rcpt to: <tito@asianatelbd.com>
250 2.1.5 <tito@asianatelbd.com>... Recipient ok
data
354 Enter mail, end with "." on a line by itself
test
this is test mail message
.
250 2.0.0 mBU5VcmW003284 Message accepted for delivery
To login into mail server by using 110 port and read a mail
[root@dns ~]# telnet mail.asianatelbd.com 110
Trying 192.168.2.1...
Connected to mail.asianatelbd.com (192.168.2.1).
Escape character is '^]'.
+OK Dovecot ready.
user tito
+OK
pass 1
+OK Logged in.
stat (show on mailbox status)
+OK 512 1
stat 1