First, installed Postfix and dovecot
yum install postfix
yum install dovecot
Second, the Postfix mail server configuration
vim /etc/postfix/main.cf
myhostname = mail.ning.com
mydomain = ning.com
myorigin = $mydomain
inet_interfaces = all
inet_protocols = all
mydestination = $mydomain
mynetworks = 0.0.0.0/0
relay_domains = $mydestination
home_mailbox = Maildir/
service postfix restart
Localhost commented inet_interfaces =
Third, use Telnet to test your mail server correctly
1. installed on the mail server Telnet
yum install telnet
2. connecting to the Server SMTP port
telnet 192.168.1.22 25
3. fill in the sender
MAIL FROM:
Carriage return
4. fill out the recipient
RCPT TO:[email protected]
Carriage return
5. composing a message
5.1 start mail content
DATA
Carriage return
5.2 enter the title
Subject: test message
Carriage return
5.3 input content, and., ended
test body .
If the following information is displayed, message to send queue
250 2.0.0 Ok: queued as 88D6D32A94
Four, configuring Dovecot mail
vim /etc/dovecot/dovecot.conf
protocols = imap pop3 lmtp
listen = *, ::
login_trusted_networks =0.0.0.0/0
vim /etc/dovecot/conf.d/10-mail.conf
Mail_location = maildir:~/Maildir # only mailbox path
vim /etc/dovecot/conf.d/10-auth.conf
Auth_mechanisms = plain login # allow authentication and log in
Disable_plaintext_auth = Yes # the allow clear text logon
vim /etc/dovecot/conf.d/10-master.conf
Unix_listener auth-UserDB {# allowed to run database
#mode = 0600
user =postfix
group =postfix
}
service dovecot restart
Five, test
521521 new useradd users
mail [email protected]
FoxMail receiving end of usability testing