Postfix and Dovecot Some records of the mail server 1

Source: Internet
Author: User
Tags aliases imap dovecot

Install Postfix, with centos6.7 included, directly in the graphical interface of the management software appended to the server project mail server, add postfix related, as well as dovecot, in order to receive the letter. Of course, because SendMail and postfix can only have a presence, the installation of Postfix, the SendMail related all removed. This is the simplest, no need to modify the system default MTA, the installation process is automatically modified.

You can also use the command

Alternatives--config MTA

To modify.

You can then turn postfix and dovecot into automatic execution in the services of the graphical management interface, and all start up. Run level 3 above all to choose. If you want to use authentication letters, then you must turn SASLAUTHD into automatic execution, the default is not auto-start.

Of course, if you have to use a command

Chkconfig Postfix on
Also OK


Initially, the simplest single-domain email server was built, using the Linux system account as a user, with minimal configuration modifications.

Let's start with the command line to see how the Postfix is now configured

Postconf-n

This command shows the configuration and the default different parts, if you want to see all do not use-N to display all

Alias_database = hash:/etc/aliases//This is a database of aliases
Alias_maps = hash:/etc/aliases//alias correspondence list
Broken_sasl_auth_clients = yes//For old-fashioned email client is not correspondence, is not adhere to the RFC rules
Command_directory =/usr/sbin
Config_directory =/etc/postfix
Daemon_directory =/usr/libexec/postfix
Data_directory =/var/lib/postfix
Debug_peer_level = 2
Home_mailbox = maildir///This is to specify the form of each user message, so that each letter is a file, the user's email is placed under the/home/username/maildir

Html_directory = No
Inet_interfaces = ALL//default is localhost, if you want to run externally, you must modify
Inet_protocols = All
Mail_owner = Postfix
Mail_spool_directory =/var/spool/mail//directory for thread cache Exchange
Mailq_path =/usr/bin/mailq.postfix
Manpage_directory =/usr/share/man
Mydestination = $mydomain//domain name to accept the letter
MyDomain = shenxu.com//own domain name
Mynetworks = 127.0.0.0/8//Specify intranet or trusted network address
Myorigin = $mydomain//This domain, if the letter is not with its own domain, it hangs on the back of this
Newaliases_path =/usr/bin/newaliases.postfix
Queue_directory =/var/spool/postfix
Readme_directory =/usr/share/doc/postfix-2.6.6/readme_files
Sample_directory =/usr/share/doc/postfix-2.6.6/samples
Sender_canonical_maps = hash:/etc/postfix/sender_canonical_maps//Replace sender's Map list
Sendmail_path =/usr/sbin/sendmail.postfix
Setgid_group = Postdrop
Smtpd_client_restrictions = Permit_mynetworks, check_client_access hash:/etc/postfix/access, Permit_sasl_ Authenticated//Allow those clients to be able to access, here can be used to anti-spam, such as: Reject_rbl_client zen.spamhaus.org behind the domain name is anti-spam organization domain name

Smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated, reject_unauth_destination// The scope of the license to relay email
Smtpd_sasl_auth_enable = yes//can be authenticated
Smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access, permit_sasl_authenticated//Sender's Confirmation

Unknown_local_recipient_reject_code = 550

In fact, some of the default is also very important

Smtpd_sasl_path = SMTPD//This is the default path to use the system

Smtpd_sasl_security_options = noanonymous//Prohibit Anonymous authentication

Smtpd_sasl_type = Cyrus//This is the use of the system default user authentication method

This is the default, so there is no need to modify, sometimes in order to cooperate with DOVECOT certification

Smtpd_sasl_type = Dovecot
Smtpd_sasl_path = Private/auth

Of course, if Dovecot is also used by default, there is no need to change, usually to use the virtual domain, you can not use the Linux account for identity authentication when the modification.


The following is a look at the default Dovecot

Dovecot-n

# 2.0.9:/etc/dovecot/dovecot.conf
# os:linux 2.6.32-573.22.1.el6.x86_64 x86_64 CentOS release 6.7 (Final)
Auth_mechanisms = Plain Login//Authentication of the basic two methods, must have, and other complex not to mention
Disable_plaintext_auth = no//must not be lost, otherwise the old client cannot authenticate
managesieve_notify_capability = mailto
Managesieve_sieve_capability = Fileinto reject envelope encoded-character vacation subaddress comparator-i; Ascii-numeric relational regex imap4flags copy include variables body enotify environment Mailbox Date
Mbox_write_locks = Fcntl
Passdb {
Driver = PAM//Support System identity authentication
}
Plugin {
Sieve = ~/.dovecot.sieve
Sieve_dir = ~/sieve
}
protocols = IMAP POP3//Supported protocols
Ssl_cert = </ETC/PKI/DOVECOT/CERTS/DOVECOT.PEM//file for E-cert
Ssl_key = </ETC/PKI/DOVECOT/PRIVATE/DOVECOT.PEM//file for E-cert

UserDB {
Driver = passwd//Support System identity authentication

}

This content modification, because the version raises the reason, some already is not in the/etc/dovecot/dovecot.conf, but in the/etc/dovecot/conf.d below the many files, modifies the time to need one to revise.

For example Disable_plaintext_auth = No is in the 10-auth.conf file, but most of them do not need to be modified.

/etc/dovecot/dovecot.conf only modified The Protocols = IMAP POP3 A place, a total of 2 changed, you can use, set up a server quickly.

If the authentication method Smtpd_sasl_type = Dovecot is modified in the postfix, then the corresponding dovecot also need to make corresponding changes,/etc/dovecot/conf.d/10-master.conf

Service Auth {

Unix_listener Auth-userdb {

}

Unix_listener/var/spool/postfix/private/auth {

mode = 0666

user = Postfix

Group = Postfix

}


This article from "Genius without that 1% is absolutely impossible" blog, please be sure to keep this source http://xushen.blog.51cto.com/1673219/1766593

Postfix and Dovecot Some records of the mail server 1

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.