下載
https://www.iredmail.com/download.html
配置
https://docs.iredmail.org/install.iredmail.on.rhel.html
配置注意事項:
1、主機名
hostnamectl set-hostname mail.IRedMail.com.cn
2、安裝數據庫,配置權限,密碼
yum -y install mysql
yum -y install mariadb-server
grant all on *.* to root@'localhost' identified by '1234567890' with grant option ;
3、一些配置
/data/vmail
iredmail.com.cn
1234567890
4、解決退信問題(iredmail 能發不能收 問題)
log錯誤信息
postfix/postscreen[11355]: NOQUEUE: reject: RCPT from [58.100.201.195]:55227: 550 5.7.1 Service unavailable; client [*.*.*.*] blocked using zen.spamhaus.org;
問題:被DNSBL拒絕了,中國很多郵件服務都被DNSBL列入黑名單,所以只要禁用DNSBL功能即可
步驟:vi /etc/postfix/master.cf 修改成如下圖,然後重啓systemctl restart postfix
現在可以收信,但是非常非常非常慢,還需關鍵一步
cd /opt/iredapd/tools/
python spf_to_greylist_whitelists.py outlook.com microsoft.com 126.com 163.com qq.com foxmail.com
具體解釋url:https://blog.csdn.net/weixin_33743880/article/details/91722360
It queries SPF and MX records of specified mail domain names, then store all converted IP addresses/networks defined in SPF/MX records in SQL tableiredapd.greylisting_whitelists
.
To whitelist IP addresses/networks of some mail domain, for example,outlook.com
, microsoft.com
, please run command like below:
# cd /opt/iredapd/tools/ # python spf_to_greylist_whitelists.py outlook.com microsoft.com
If you want to whitelist more mail domains, just run the command with the domain names like above sample.
Since iRedAPD-1.8.0, we have SQL table iredapd.greylisting_whitelist_domains
to store these mail domain names. if you run spf_to_greylist_whitelists.py
without any argument, it will fetch all mail domains stored in sql table greylisting_whitelist_domains
instead of fetching from command line arguments.
# python spf_to_greylist_whitelists.py
You should setup a cron job to run this script, so that it can keep the IP addresses/networks up to date. iRedMail sets up the cron job to run every 10 minutes, like below:
*/10 * * * * /usr/bin/python /opt/iredapd/tools/spf_to_greylist_whitelists.py &>/dev/null
5、解決 POP3/IMAP ,ssl/tls登錄問題
默認客戶端需要配置ssl/tls安全連接
否則錯誤提示:Plaintext authentication disallowed on non-secure (SSL/TLS) connections
解決辦法: 修改/usr/local/etc/dovecot/dovecot.conf文件下面行,然後重啓Dovecot服務
disable_plaintext_auth=no
ssl=yes
6、解決mailx等連接錯誤 smtp-server: 503 5.5.1 Error: authentication not enabled 問題
解決辦法:修改/etc/postfix/main.cf 爲如下行,重啓服務systemctl restart postfix
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
# force all clients to use secure connection through port 25
#smtpd_tls_auth_only=yes
url:https://docs.iredmail.org/allow.insecure.pop3.imap.smtp.connections.html
7、outlook 客戶端配置
https://docs.iredmail.org/activesync.outlook.html
https://docs.iredmail.org/index.html