Background
Development environment for the local area network, the work content needs to view the mail file (*.eml) frequently, abominable Foxmail must verify the account to enter the main interface, can open the Eml file view.
Helpless to take a LAN within the mail system bar. Minimalist construction, only for verification by Foxmail.
Environment
cat /etc/redhat-7.2. 1511 (Core)
Installation
Download Server Software:
SMTP server Postfix
Pop/imap Server Dovecot
DNS Server DNSMASQ
Yum Install dovecot postfix DNSMASQ
Version information
[Email protected] ~]# RPM-qi Dovecotname:dovecotepoch:1Version:2.2.TenRelease:5. El7
[[Email protected]~]# RPM-qi dnsmasqname:dnsmasqversion:2.66Release: -. el7_2.1
[[Email protected]~]# RPM-qi Postfixname:postfixepoch:2Version:2.10.1Release:6. el7
Configure hostname
[Email protected] ~]# vim/etc/hostname
Change here to
Mail.nidey.com
Restart takes effect
[email protected] ~]# reboot
Configure DNSMASQ
Adding local ip<==> domain name mappings in the Hosts file
[Email protected] ~]# vim/etc/hosts
Fill in the following content
192.168. 118.101 mail.nidey.com
For testing purposes, DNSMASQ does not need to do other configuration, the default is to use/etc/hosts for address resolution (equivalent to sharing this file on the LAN).
[Email protected] ~~]# systemctl enable DNSMASQ
Configure Postfix
[Email protected] ~]# VIM/ETC/POSTFIX/MAIN.CF
Uncomment and set Myhostname, MyDomain, Myorigin, Inet_interfaces, Inet_protocols, Mydestination,
The contents are as follows
Myhostname == = = All
= $myhostname, $mydomain
Start the server
[Email protected] ~~]# systemctl enable Postfix
Configure Dovecot
[Email protected] ~]# vim/etc/dovecot/dovecot.conf
Uncomment and set Listen (Enable IPV4 Mail Service only)
Setting up a logon trust network (with clear text authentication password)
Listen = *Login_trusted_networks = 0.0.0.0/0
Set the mail file location
[Email protected] ~]# vim/etc/dovecot/conf.d/-mail.conf
Uncomment, and set
Mail_location = mbox:~/mail:inbox=/var/mail/%u
Create a mail account
Use the local System account here to set up your account Ted, password Ted
[Email protected] ~echopasswd -- for user Ted. passwd: All authentication tokens updated successfully.
Create a mail folder for your Ted account
Su~]$ cd ~mkdir -Pmail/.imap/su
Start the service
[[Email protected] ~]# systemctl start dovecot[[email protected] ~]# systemctl enable Dovecot
Use
Mail server IP-->192.168.118.101
XP Client IP-->192.168.118.10
The following operations are done on the XP machine
Configure DNS
Using the Foxmail Client
Pop protocol Login
Write an email to yourself
Pop protocol receive mail
IMAP protocol Login
IMAP protocol to receive mail
Almost so, and then complete the full point of the mail, DNS system.
Special thanks
That's what Linux should learn.
Use Postfix + Dovecot + DNSMASQ to build a minimalist LAN mail system under CentOS