RHEL6.0 simple (smtp) Mail Server build system environment: rhel6.0-x86_64dnsserver: 192.168.0.44mailserver: 192.168.0.5clienthost: 192.168.0.6smtpserver: 192.168.0.7 (Forward mail) Configure DNS server install dns software yuminstallbindbind-chroot
RHEL6.0 simple (smtp) Mail Server SETUP
System Environment: rhel6.0-x86_64
Dns server: 192.168.0.44
Mail server: 192.168.0.5
Client host: 192.168.0.6
Smtp server: 192.168.0.7 (Forward Mail)
Configure the DNS server on 192.168.0.44
Install the dns software yum install bind-chroot bind-utils bind-libs-y
Vim/etc/named. conf
# Listen-on port 53 {127.0.0.1 ;};
# Allow-query {localhost ;};
Zone "." IN {
Type hint;
File "named. ca ";
};
Zone "example.com" IN {
Type master;
File "example.com. zone ";
};
Configure forward domain name resolution File
Cp/var/named. localhost/var/named/example.com. zone-p
Chown named. namd/var/namd/example.com. zone
Vim/var/named/example.com. zone
$ TTL 1D
@ In soa @ root .(
0; serial
1D; refresh
1 H; retry
1 W; expire
3 H); minimum
NS @
A 192.168.0.44
Server5 A 192.168.0.5
Mail CNAME server5
Server6 A 192.168.0.6
Client CNAME server6
Server7 A 192.168.0.7
Smtp CNAME server7
Example.com. in mx 10 mail.example.com.
~
The MX record of the DNS of example.com must point to mail.example.com.
* *** Pay attention to the points behind the domain ****
Start DNS server
/Etc/init. d/named start
If any error is reported, the file has no syntax error. You can use dig for testing. If dig successfully resolves the ip address, dns configuration is successful.
Start setting up the email server
Mail serverIn192.168.0.5Host Configuration
Postfix ----> Email transmission agent software
Install the email Receiving Software dovecot and yum install dovecot postfix-y
Postconf-e inet_interfaces = all
Postconf-e mydestination = example.com
Postconf-e myorigin = example.com
Postconf-e relayhost = stmp.example.com
}