The domain name of a192.168.100.102/24 is mail.rhce.com.
The domain name of b192.168.100.10/24 is mail.example.com.
DNS192.168.100.98 has the following configuration on the.
/etc/mail/local-host-names is used to define host aliases for sending and receiving mail.
# local-host-names-All aliases of your computer are included here.
Rhce.com # Note: This is essential, otherwise you won't receive an email, although you can send it.
Mail.rhce.com # Note: Do you want this file /etc/mail/access # to restrict which clients can use this mail server to forward mail (none of them are allowed, the default is forwarding).
Rhce.com relay
Example.com relay
192.168.100. relay
192.168.10. Reject # Set the message of192.168.10. Note: Other options can be set: OK/REJECT/DISCARD/ERROR:550.
B has the following configuration
/etc/mail/local-host-name (optional)
# local-host-names-All aliases of your computer are included here.
example.com
mail.example.com/etc/mail/access
Rhce.com relay
Example.com relay
192.168.100. both relays a and b have opened the service of sendmail/dovecot. Note: Only when dovecot is used can the settings of /etc/mail/sendmail.cf be changed through POP3/IMAP protocol using Foxmail/OutLokk, etc.
O DaemonPortOptions=Port=smtp,Addr=0.0.0.0,Name=MTA
Service sendmail restart Note: Listen for 0.0.0.0.
Service dovecot Restart Note: Check whether the port11143 is open, but the port 993 (IMAP-SSL)/995 (POP3-SSL) is actually opened;
Both parties set192.168.100.98 as the IP of dns.
In addition, both parties should use makemaphashaccess.db
In addition, the host names of both parties and the domain names in /etc/sysconfig/network should be set as corresponding domain names. The settings in DNS are as follows.
If the DNS server is also used as a gateway, DNS must first turn on the ip forwarding function;
named.confoptions {
Directory "/var/named";
Dump file "/var/named/data/cache _ dump.db";
statistics-file“/var/named/data/named _ stats . txt”;
};
Contains "/etc/rndc.key"; Area "". {
Type a hint;
The file "named.ca";
}; Area "example.com" {
Main type;
The file "example.com.zone";
Allow transfer {
192. 168. 1. 177;
192. 168.7. 17;
};
};
Area "rhce.com" {
Main type;
The file "rhce.com.zone";
Allow transfer {
192. 168. 1. 177;
192. 168.7. 17;
};
}; example.com.zone$ttl 38400
example.com。 In SOA dns.example.com. admin.example.com。 (
2005090503 ; uninterrupted
10800 ; recover one's spirit
3600 ; retry
604800 ; expire
38400 ) ; Negative buffer TTL
example.com。 In South dns.example.com.
Rhel4 in CNAME dns
CNAME forum www
Samba of CNAME
example.com。 In MX 5 mail
The email address is192.168.100.101
rhce.com.zone$ttl 38400
rhce.com。 In SOA dns.rhce.com. admin.rhce.com。 (
2005090503 ; uninterrupted
10800 ; recover one's spirit
3600 ; retry
604800 ; expire
38400 ) ; Negative buffer TTL
rhce.com。 In South dns.rhce.com.
www.rhce.com。 192. 168. 100.29
Rhel4 in CNAME dns
CNAME forum www
Samba of CNAME
rhce.com。 In MX 5 mail
The email is in a192.168.100.102. Note: linux does not allow users to log in as root by default, and can be changed to alading or other users;
You can use the Host-T MX example.com to find out the MX records of example.com, and set the POP3S and IMAPS servers to generate corresponding keys and certificates. Pop3 port 1 10, imap port 143, pop3s port 995, imaps port 993;
The server uses the private key to encrypt the mail, and when the client receives the mail, it uses the public key in the certificate to decrypt the mail, so that the mail can be read normally;
Making private key and self-signed certificate
cd /etc/pki/tls/certs/
Make dovecot.pem # This file saves the private key and public key information of the mail server;
vi /etc/dovecot.conf
will
SSL _ cert _ file =/etc/PKI/dovecot/certs/dovecot . PEM
SSL _ key _ file =/etc/PKI/dovecot/private/dovecot . PEM
replace
SSL _ cert _ file =/etc/PKI/TLS/certs/dovecot . PEM
SSL _ key _ file =/etc/PKI/TLS/certs/dovecot . PEM
On the use of Foxmail
1 You can't log in to root's mailbox by default, but you can use it to send.
2 If ordinary users can't log in to email, set password with passwd, then open foxmail email account settings, set advanced settings in the mail server, and click SSL connection between SMTP and POP3 to try again; TLS transport layer security
PKI public key infrastructure