CENTOS7 Installation configuration Postfix

Source: Internet
Author: User
Tags dovecot

Yum install postfix dovecot CYRUS-SASL


# VI/ETC/POSTFIX/MAIN.CF

Myhostname = mail.wc365.com

MyDomain = wc365.com

Myorigin = $mydomain

Inet_interfaces = All

Inet_protocols = IPv4

mydestination = $myhostname, localhost. $mydomain, localhost, $mydomain,

Mail. $mydomain, www. $mydomain, ftp. $mydomain

Mynetworks = 127.0.0.0/8

Relay_domains = $mydestination

Message_size_limit = 1073741824

Default_process_limit = 50

Default_destination_concurrency_limit = 20

Smtpd_sasl_auth_enable = yes

Smtpd_sasl_local_domain = $myhostname

Smtpd_sasl_application_name = smtpd

Broken_sasl_auth_clients = yes

Smtpd_recipient_restrictions = Permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination

Smtpd_client_restrictions = permit_sasl_authenticated

Smtpd_sasl_security_options = noanonymous

# Systemctl Start Postfix.server (check Port No. 25th)


# vi/etc/dovecot/dovecot.conf

protocols = IMAP POP3 LMTP

Listen = *

# Systemctl Start Dovecot.server (check Port No. 110,143)


# VI/ETC/SYSCONFIG/SASLAUTHD

Socketdir=/var/run/saslauthd

Mech=shadow


# cat/etc/sasl2/smtpd.conf

Pwcheck_method:saslauthd

Mech_list:plain Login

# Systemctl Start Saslauthd.server


Test 1:

# telnet mail.wc365.com 25

Trying 192.168.1.2 ...

Connected to Mail.wc365.com (192.168.1.2).

Escape character is ' ^] '.

Mail.yjw.com ESMTP Postfix

EHLO 163.com (you just need to enter the line, it's real information)

250-mail.wc365.com

250-pipelining

250-size 10240000

250-vrfy

250-etrn

250-auth LOGIN PLAIN

250-auth=login PLAIN

250-enhancedstatuscodes

250-8bitmime

DSN

Quit (Enter Exit command)

221 2.0.0 Bye

Connection closed by foreign host.


Test 2:

echo "This is a test mail" | Mail-s mailname QQ No. @qq.com (check QQ mailbox for new mail)


Error 1:postfix/sendmail[13310]: Fatal:parameter Inet_interfaces:no local interface found for:: 1

Resolution 1:

Vi/etc/postfix/main.cf

#inet_protocols = All (comment out the line)

#wc ADD1

Inet_protocols = IPv4

Systemctl start postfix (check port number to see if it is up)


Error 2:error 2002 (HY000): Can ' t connect to local MySQL server through socket '/tmp/mysql.sock ' (111)

Solve 2:ln-s/var/lib/mysql/mysql.sock/tmp/mysql.sock


CENTOS7 Installation configuration Postfix

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.