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

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

邮件服务器postfix+cyrus

發布時間:2025/6/15 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 邮件服务器postfix+cyrus 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

郵件服務器

Cyrus+postfix

?

1 2 yum?install?postfix yum?install?cyrus

?

postfix 不能和 sendmail? 同時使用

?

服務器版本CentOS 7----1611? 內核版本3.10.0-514.el7.x86_64

Centos7與之前的版本不一樣的命令systemctl和 防火墻firewall-cmd命令

firewalld與iptables-service無法共存

?

采用教程參考

http://www.cnblogs.com/apexchu/p/4271264.html

http://blog.csdn.net/clyao_123456/article/details/46693579

?

?

配置修改:

1、Postfix配置文件/etc/postfix/main.cf

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 [root@mailmonitor?postfix]#?vim?/etc/postfix/main.cf?? myhostname?=?localhost??//76行,后邊寫郵箱主機名即mail.****.***?? mydomain?=?51yip.com???//83行,設置域名?? myorigin?=?$mydomain???//99行,去掉注釋#?? inet_interfaces?=?all??//113行,把后面的localhost改成all?? mydestination?=?$myhostname,?localhost.$mydomain,?localhost,$mydomain?//164行,把前面的注釋拿掉,并加一下$mydomain?? mynetworks?=?192.168.0.0/16,?127.0.0.0/8??//264行,設置內網和本地IP?? local_recipient_maps?=??//210行,去掉注釋#?? smtpd_banner?=?$myhostname?ESMTP?unknow?//573行,去掉注釋#,然后把$mail_name?($mail_version)改成unknow?? ??? //在main.cf文件的底部加上以下內容?? smtpd_sasl_auth_enable?=?yes?????//使用SMTP認證?? broken_sasl_auth_clients?=?yes???//讓不支持RFC2554的smtpclient也可以跟postfix做交互。?? smtpd_sasl_local_domain?=?$myhostname??//?指定SMTP認證的本地域名?? smtpd_sasl_security_options?=?noanonymous?//取消匿名登陸方式?? smtpd_recipient_restrictions?=?permit_mynetworks,?permit_sasl_authenticated,?reject_unauth_destination?//設定郵件中有關收件人部分的限制?? smtpd_sasl_security_restrictions?=?permit_mynetworks,?permit_sasl_authenticated,?reject_unauth_destination?//設置允許范圍?未生效? message_size_limit?=?15728640?????//郵件大小?? mailbox_transport=lmtp:unix:/var/lib/imap/socket/lmtp???//設置連接cyrus-imapd的路徑

?

參考兩位的配置中有個參數在實際使用中無法生效 ?smtpd_sasl_security_restrictions ?加上該選項postfix無法正常使用,因此我給注釋掉了。

?

2、cyrus配置更改

???????? Cyrus-sasl配置

1 2 3 [root@localhost?postfix]#?vim?/etc/sasl2/smtpd.conf??//在文件尾部加上以下內容?? log_level:?3?????//記錄log的模式?? saslauthd_path:/var/run/saslauthd/mux?????//設置一下smtp尋找cyrus-sasl的路徑

cyrus-imapd配置文件/etc/sysconfig/cyrus-imapd,/etc/cyrus.conf,/etc/imapd.conf。imapd.conf還包含非常多的參數,例如郵件存儲目錄、管理員賬號、連接認證方式等等。

?

?

啟動命令:

1 2 3 systemctl?startpostfix systemctl?startsasl-authd systemctl?startcyrus-imapd

?

?

防火墻需要添加的命令

1 firewall-cmd?–zone=public??--add-port=25/tcp?–permanent?//永久添加25端口

or

1 firewall-cmd??--addservice=smtp??–permanent?//直接添加服務

?

firewall-cmd –get-services? 可以得到所有存在的服務

firewall-cmd –list-all列出所有信息

防火墻動態更新命令 firewall-cmd–reload

?

查看端口監聽

1 netstat?–tpnl?|grep??port

?

測試郵件命令

1 mail?-s?‘title’*****@**mail?<?/root/test(郵件內容)


添加賬號





? ? ?本文轉自forsk 51CTO博客,原文鏈接:http://blog.51cto.com/forsk/1914448,如需轉載請自行聯系原作者





總結

以上是生活随笔為你收集整理的邮件服务器postfix+cyrus的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。