Install Postfix + Dovecot in 64-bit CentOS to configure Mail Server notes, centosdovecot

Source: Internet
Author: User
Tags dovecot mx record nslookup

Install Postfix + Dovecot in 64-bit CentOS to configure Mail Server notes, centosdovecot

The Postfix and Dovecot functions are really powerful. They support various authentication methods and the configuration is very flexible. Because they are too flexible, there are various traps in the configuration installation process, the log is the best solution to the problem. Assume that the domain name you applied for is example.com.

I set domain name resolution at the domain name service provider, and my example.com set three domain name resolution:

The first one is: A record, RR value is @, pointing to the server IP Address

The second is: MX record. The RR value is @, pointing to example.com

The third is: A record, whose RR value is www, pointing to the IP address of the server


After the configuration is complete, ping www.example.com to check whether the IP address of your server is valid.

Check whether the MX record takes effect. Use nslookup to check whether the MX record is correct.

In windows, enter nslookup-qt = mx example.com and press Enter,

If your domain name example.com is displayed, your MX record is correctly configured.

If the MX record configuration is incorrect, send an email via QQ mail, and you will receive a bounce message. The reason for rejection is as follows:

The domain name to which the recipient (zhang@example.com) belongs does not exist and the email cannot be delivered. Name service error for name = example.com type = MX: Host found but no data record of requested type

After domain name resolution is completed, you can install and configure postfix and dovecot.


I did not download the source code for installation and directly used yum for installation.


Yum install postfix

Yum install dovecot

Yum install cyrus-sals


After the installation is complete, there are not many configuration items to be configured, and only two configuration files need to be modified.


The first one is: the configuration file/etc/postifx/main. cf of postfix. The content to be modified is as follows. For others, use the default value.

myhostname = mail.example.commydomain = example.commyorigin = $mydomaininet_interfaces = allinet_protocols = allmydestination = $myhostname, localhost.$mydomain, localhost, $mydomainmynetworks = 0.0.0.0/0home_mailbox = Maildir/smtpd_sender_restrictions = permit_mynetworks,  permit_sasl_authenticated,  reject_sender_login_mismatch, reject_authenticated_sender_login_mismatch, reject_unauthenticated_sender_login_mismatch smtpd_sasl_auth_enable = yessmtpd_sender_login_maps = hash:/etc/postfix/sender_login_maps

The second one is: the configuration file/etc/dovecot. conf of dovecot. The content to be modified is as follows. You can use other methods by default.

protocols = imap pop3 lmtp imaps pop3sssl_disable = nomail_location = Maildir:~/Maildirdisable_plaintext_auth = no

After dovecot. conf is configured, if you start service dovecot start directly, a warning is displayed:

Aug 14 17:55:54 master: Warning: Killed with signal 15 (by pid=12829 uid=0 code=kill)Aug 14 17:55:55 config: Warning: NOTE: You can get a new clean config file with: doveconf -n > dovecot-new.confAug 14 17:55:55 config: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:81: login_user has been replaced by service { user }Aug 14 17:55:55 config: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:88: add auth_ prefix to all settings inside auth {} and remove the auth {} section completely

In this case, run the following command in the/etc/dovecot/directory:

doveconf -n > dovecot-new.conf

This command will convert dovecot. conf to a standard configuration file. We can replace dovecont. conf with the new file dovecot-new.conf.


Note the following details during Configuration:

That is, set the default MTA, uninstall sendmail, set the MTA to postfix, and set the automatic start of postfix and dovecot.

Then run the useradd command to add a user named zhang and set the password to 123456.


Start the service:

Service postfix restart

Service dovecot restart

Service saslauthd restart


Configure outlook, enter the email address as: zhang@example.com

Select POP3 as the Account type, the receiving mail server is example.com, And the sending mail server is example.com.

Then the username is zhang and the password is 123456.


If there is no accident, you should be able to send and receive emails normally.

The new email is saved in the/home/zhang/Maildir/new directory on the server.


My configuration is simple, and I use the password verification mechanism of the server itself. Postfix is powerful and supports multiple authentication methods and other encryption methods.

I originally wanted to use postfixadmin for web management, but that configuration would be more complicated. After adding users through web, you need to create a folder with the corresponding username in the home directory to save the email. There are related scripts to be executed, and the authentication mode must be changed to mysql authentication. The configuration is slightly complicated, wait for the next article to write about postfixadmin.



You cannot receive emails using outlook when installing postfix and dovecot on centos.

Outlook pop3 port is set correctly. No 110

How can I send emails after the centos Mail Server (postfix) is set up? Need to install the mail client?

This problem ...... It means that you do not know much about the mail system. You need to first understand the basics and then solve the problem of sending emails.
 

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.