Use Postfix + Dovecot + DNSMASQ to build a minimalist LAN mail system under CentOS

Source: Internet
Author: User
Tags imap dovecot mail account

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.