新聞中心
這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
CentOS6中安裝postfix具體方法
Postfix 是一種開源的電子郵件服務(wù)器軟件,它是改良sendmail郵件服務(wù)器而產(chǎn)生的,Postfix 試圖更快、更容易管理、更安全,同時(shí)還與 sendmail 保持足夠的兼容性,下面講解一下CentOS6中安裝postfix具體方法。

西和網(wǎng)站制作公司哪家好,找創(chuàng)新互聯(lián)!從網(wǎng)頁設(shè)計(jì)、網(wǎng)站建設(shè)、微信開發(fā)、APP開發(fā)、成都響應(yīng)式網(wǎng)站建設(shè)公司等網(wǎng)站項(xiàng)目制作,到程序開發(fā),運(yùn)營(yíng)維護(hù)。創(chuàng)新互聯(lián)公司2013年成立到現(xiàn)在10年的時(shí)間,我們擁有了豐富的建站經(jīng)驗(yàn)和運(yùn)維經(jīng)驗(yàn),來保證我們的工作的順利進(jìn)行。專注于網(wǎng)站建設(shè)就選創(chuàng)新互聯(lián)。
1 . CentOS6默認(rèn)安裝了postfix.如果系統(tǒng)沒有postfix,可以用以下命令安裝。
[root@mail ~]# yum -y install postfix
2 . 配置postfix的main.cf,配置smtp-auth采用dovecot的sasl功能。
[root@mail ~]# vi /etc/postfix/main.cf
# 第75行: 去掉注釋,并設(shè)置主機(jī)名。
myhostname = mail.opsky.top
# 第83行: 去掉注釋,并設(shè)置域名。
mydomain = opsky.top
# 第99行: 去掉注釋。
myorigin = $mydomain
# 第116行:
inet_interfaces = all
# 第119行: 如果只使用ipv4,那么設(shè)置如下。
inet_protocols = ipv4
# 第164行: 配置可接收郵件的域名。
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
# 第264行: 去掉注釋,并設(shè)置本地網(wǎng)絡(luò)號(hào)段.
mynetworks = 127.0.0.0/8, 10.0.0.0/24
# 第419行: 去掉注釋,采用Maildir格式。
home_mailbox = Maildir/
# 第571行:
smtpd_banner = $myhostname ESMTP
# 添加如下配置到文件末尾
# 一封郵件大小限制為10M
message_size_limit = 10485760
# 一個(gè)郵箱大小限制為1G
mailbox_size_limit = 1073741824
# 配置SMTP-Auth采用dovecot的sasl功能
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject
main.cf配置完畢后,啟動(dòng)postfix,并設(shè)置自動(dòng)啟動(dòng)。
[root@mail ~]# /etc/rc.d/init.d/postfix start
Starting postfix: [ OK ]
[root@mail ~]# chkconfig postfix on
3 . 如果iptables在開啟狀態(tài),那么設(shè)置iptables開放smtp的25端口。
[root@dlp ~]# iptables -I INPUT 5 -p tcp -m state --state NEW -m tcp --dport 25 -j ACCEPT
文章題目:CentOS6中安裝postfix具體方法
網(wǎng)站路徑:http://fisionsoft.com.cn/article/djpjgoo.html


咨詢
建站咨詢
