一、Postfix簡(jiǎn)介
Postfix 是一種電子郵件服務(wù)器,它是由任職于IBM華生研究中心(T.J. Watson Research Center)的荷蘭籍研究員Wietse Venema為了改良sendmail郵件服務(wù)器而產(chǎn)生的。最早在1990年代晚期出現(xiàn),是一個(gè)開放源代碼的軟件。
Postfix 官方網(wǎng)站:http://www.postfix.org/Postfix 下載地址:http://www.postfix.org/download.html二、Postfix安裝
安裝Postfix以配置SMTP服務(wù)器
[1] 即使CentOS系統(tǒng)安裝了[最小安裝],也會(huì)安裝Postfix,但如果Postfix不安裝,請(qǐng)先安裝它,如下所示。[root@linuxprobe ~]# yum -y install postfix[2] 此示例顯示配置SMTP-Auth以使用Dovecot的SASL函數(shù)。
[root@linuxprobe ~]# vi /etc/postfix/main.cf# line 75: uncomment and specify hostnamemyhostname = linuxprobe.srv.world# line 83: uncomment and specify domain namemydomain = srv.world# line 99: uncommentmyorigin = $mydomain# line 116: changeinet_interfaces = all# line 164: addmydestination = $myhostname, localhost.$mydomain, localhost, $mydomain# line 264: uncomment and specify your local networkmynetworks = 127.0.0.0/8, 10.0.0.0/24# line 419: uncomment (use mailboxdir)home_mailbox = mailbox/# line 574: addsmtpd_banner = $myhostname ESMTP# add follows to the end# limit an email size for 10Mmessage_size_limit = 10485760# limit a mailbox for 1Gmailbox_size_limit = 1073741824# for SMTP-Authsmtpd_sasl_type = dovecotsmtpd_sasl_path = private/authsmtpd_sasl_auth_enable = yessmtpd_sasl_security_options = noanonymoussmtpd_sasl_local_domain = $myhostnamesmtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject[root@linuxprobe ~]# systemctl restart postfix[root@linuxprobe ~]# systemctl enable postfix
[3]如果Firewalld正在運(yùn)行,請(qǐng)?jiān)试SSMTP服務(wù)。 SMTP使用25 / TCP。
[root@dlp ~]# firewall-cmd --add-service=smtp --permanentsuccess[root@dlp ~]# firewall-cmd --reloadsuccess
三、Dovecot 安裝
安裝Dovecot以配置POP / IMAP服務(wù)器
[1] 安裝Dovecot.[root@linuxprobe ~]# yum -y install dovecot[2] 此示例顯示配置為向Postfix提供SASL功能 .
[root@linuxprobe ~]# vi /etc/dovecot/dovecot.conf# line 24: uncommentprotocols = imap pop3 lmtp# line 30: uncomment and change ( if not use IPv6 )listen = *[root@linuxprobe ~]# vi /etc/dovecot/conf.d/10-auth.conf# line 10: uncomment and change ( allow plain text auth )disable_plaintext_auth = no# line 100: addauth_mechanisms = plain login[root@linuxprobe ~]# vi /etc/dovecot/conf.d/10-mail.conf# line 30: uncomment and addmail_location = maildir:~/Maildir[root@linuxprobe ~]# vi /etc/dovecot/conf.d/10-master.conf# line 96-98: uncomment and add like follows# Postfix smtp-authunix_listener /var/spool/postfix/private/auth { mode = 0666 user = postfix group = postfix}[root@linuxprobe ~]# vi /etc/dovecot/conf.d/10-ssl.conf# line 8: change (not require SSL)ssl = no[root@linuxprobe ~]# systemctl start dovecot[root@linuxprobe ~]# systemctl enable dovecot[3] 如果Firewalld正在運(yùn)行,請(qǐng)?jiān)试SPOP / IMAP服務(wù)。 POP使用110 / TCP,IMAP使用143 / TCP.
新聞熱點(diǎn)
疑難解答
圖片精選
網(wǎng)友關(guān)注