日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux postfix 搭建,linux 下搭建postfix服务器

發(fā)布時(shí)間:2023/12/10 linux 38 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux postfix 搭建,linux 下搭建postfix服务器 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

linux 下postfix郵箱的安裝linux

一、首先關(guān)閉sendmail服務(wù)

service sendmail stop

二、chkconfig sendmail off(關(guān)閉開機(jī)自啟動(dòng))

三、修改DNS正解文件,使DNS可以解析郵箱服務(wù)

添加下面兩行

mail.zhubf.com. IN A ? ? ? ? ? ?172.17.17.2

zhubf.com. ? ? ?IN MX ? 10 ? ? ?mail.zhubf.com.

重啟DNS服務(wù)

service named ?restart

chkconfig named on

echo "" > /etc/resolv.conf

測試DNS設(shè)置是否正確

host mail.zhubf.com

mail.zhubf.com has address 172.17.17.2

4安裝postfix 軟件包(前提安裝yum,配置yum源)

yum install -y postfix

修改postfix配置文件

vim /etc/postfix/main.cf

主要內(nèi)容以下

五、配置saslauthd,這個(gè)軟件默認(rèn)是安裝的

修改saslauthd 配置文件

vi /etc/sysconfig/saslauthd

設(shè)置MECH=shadow

service saslauthd restart

chkconfig saslauthd on

建立郵箱用戶

useradd zhubf

passwd ?zhubf

echo zhubf |passwd --stdin zhubf

進(jìn)行密碼驗(yàn)證測試

testsaslauthd -u zhubf -p 'zhubf'

0: OK "Success."

若沒有經(jīng)過,多是防火墻或selinux的設(shè)置問題。

在postfix的主配置文件/etc/postfix/main.cf添加以下權(quán)限設(shè)置

smtpd_sasl_auth_enable = yes

smtpd_sasl_local_domain = ''

smtpd_recipient_restrictions =

permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination

broken_sasl_auth_clients = yes

smtpd_client_restrictions = permit_sasl_authenticated

smtpd_sasl_security_options = noanonymous

重啟postfix 服務(wù)

service postfix restart

chkconfig postfix on

六、smtp認(rèn)證的配置

perl -MMIME::Base64 -e 'print encode_base64

(zhubf)'

emh1YmY=

telnet mail.zhubf.com ?25

ehlo zhubf.com

進(jìn)行加密驗(yàn)證

auth login

334 VXNlcm5hbWU6

emh1YmY=

334 UGFzc3dvcmQ6

emh1YmY=

235 2.0.0 Authentication successful

八、安裝 ?dovecot服務(wù)

yum install ?-y dovecot

修改postfix主配置文件

vim /etc/postfix/main.cf

修改dovecot的配置文件

去掉注釋

vim /etc/dovecot.conf

protocol pop3 {

listen = *:10100

# ? ? ..

}

修改protocols = ?pop3 pop3s

重啟dovecot服務(wù)

/etc/init.d/dovecot restart

chkconfig dovecot on

九、安裝cyrus-impad 服務(wù)

yum install -y cyrus-imapd cyrus-imapd-devel

修改postfix主配置文件

vim /etc/postfix/main.cf

去掉下面一行的注釋

mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp

重啟服務(wù)

/etc/init.d/cyrus-imapd restart

passwd cyrus

添加郵箱用戶

# cyradm -u cyrus localhost

cm user.zhubf

cm user.zhubf.Send

cm user.zhubf.Trash

cm user.zhubf.Drafts

十、安裝 ?squirrelmail軟件

yum install -y squirrelmail

進(jìn)行squirrelmail配置

執(zhí)行該文件

/usr/share/squirrelmail/config/conf.pl

修改語言、郵箱基本設(shè)置等。

十一、郵箱測試

http://mail.zhubf.com/webmail/

使用剛剛建立的zhubf帳號進(jìn)行登陸,發(fā)送一封郵件給本身,看看可否接收到,若是能接收到,則配置完成。

總結(jié)

以上是生活随笔為你收集整理的linux postfix 搭建,linux 下搭建postfix服务器的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。