Configuring the SMTP Letter Service
Postfix provides mail delivery services based on the SMTP protocol and is responsible for distributing messages to the user's mailbox space. The configuration of the Postfix service is primarily done by modifying the primary configuration file MAIN.CF.
[Root@localhost/] #vim/ETC/POSTFIX/MAIN.CF
.../omit part of the content
inet_interfaces=192.168.1.10,127.0.0.1//Monitor the IP address of the service, default to all
Host name of myhostname=mail.cshbk.com//mail server
mydomain=cshbk.com//Mail domain
myorigin= mail field in sender's address when $mydomain//outgoing message
mydestination= $mydomain, $myhostname//Allow Posting to local destination mail domain
home_maibox=maildir///Set storage format for messages
[Root@localhost] #postfix start//open Postfix service
Note: The Mail service requires DNS service and domain name support, therefore, before configuring the mail server, you need to set up a DNS server, and configure the domain name of the forward resolution, MX records and so on.
Configure Pop/imap Receipt Service
Dovecot is a safe Pop3/imap server software with fast response and good scalability. Dovecot defaults to use Linux system users, and through the PAM mechanism for identity authentication, only through authentication before allowing users to receive mail.
1. Compile and install Dovecot package
Pre-create Run service user
[Root@localhost/] #useradd-M-s/sbin/nologin dovecot
[Root@localhost/] #useradd-M-s/sbin/nologin dovenull
Source Code Compilation Installation
[Root@localhost Media] #tar zxf dovecot-2.0.12.tar.gz-c/usr/src
[Root@localhost Media] #cd/usr/src/dovecot-2.0.12
[Root@localhost dovecot-2.0.12]#./configure--sysconfdir=/etc///Specify configuration file parent directory
[Root@localhost dovecot-2.0.12] #make && make install
Add As System Services Dovecot
[Root@localhost dovecot-2.0.12] #cp Doc/dovecot-initd.sh/etc/init.d/dovecot
[Root@localhost dovecot-2.0.12] #chmod A+x/etc/init.d/dovecot
[Root@localhost dovecot-2.0.12] #chkconfig--add dovecot