1喇辽、修改hosts及hostname名稱爱致,再重啟Linux
[root@mail ~] vim/etc/hosts
[root@mail ~] 127.0.0.1?? mail.huhunet.com mx
[root@mail ~] vim/etc/sysconfig/network
[root@mail ~] HOSTNAME=mail.huhunet.com
[root@mail ~] reboot
2撰茎、下載iRedMail,并安裝及重啟Linux
[root@mail ~]# wgethttps://bitbucket.org/zhb/iredmail/downloads/iRedMail-0.9.2.tar.bz2
[root@mail ~]# tar xf iRedMail-0.9.2.tar.bz2
[root@mail ~]# cd iRedMail-0.9.2
[root@mail iRedMail-0.9.2]# bash iRedMail.sh
[root@mail ~] reboot
3、修改amavisd的密鑰長度為1024
[root@mail ~]# service amavisd stop
[root@mail ~]# rm -rf /var/lib/dkim/huhunet.com.pem
[root@mail ~]# amavisd -c /etc/amavisd/amavisd.conf genrsa /var/lib/dkim/huhunet.com.pem 1024
[root@mail ~]# service amavisd start
[root@mail ~]# amavisd -c /etc/amavisd/amavisd.conf showkeys
; key#1, domain huhunet.com, /var/lib/dkim/huhunet.com.pem
dkim._domainkey.huhunet.com.??? 3600 TXT (
"v=DKIM1; p="
"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDHTzUcLMRdBiGtt/f1bRmQu6fR"
"HAZZ9XY16uGmq+pe10eyxpBlERmJ1+DybmyaFDsHB4JscuYIhIvXbojlsg14P+RC"
"Crvc/xjVbc0G6RPqqnywEKCb/mQR+NiUKex7SSzsRufE9IXFAPHIg+T9PYVqPzOG"
"WIZbYveJm+/PRvmnMQIDAQAB")
#dkim為:配置域名的txt時旭绒,需要使用
v=DKIM1; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDHTzUcLMRdBiGtt/f1bRmQu6fRHAZZ9XY16uGmq+pe10eyxpBlERmJ1+DybmyaFDsHB4JscuYIhIvXbojlsg14P+RCCrvc/xjVbc0G6RPqqnywEKCb/mQR+NiUKex7SSzsRufE9IXFAPHIg+T9PYVqPzOGWIZbYveJm+/PRvmnMQIDAQAB
4、修改postfix并重啟postfix
[root@mail ~]# vim /etc/postfix/main.cf
#smtpd_tls_auth_only
[root@mail ~]# service postfix restart
5焦人、對外發(fā)郵件時挥吵,禁用垃圾掃描、病毒掃描
[root@mail ~]# vim /etc/amavisd/amavisd.conf
#將下面配置花椭,添加到 $policy_bank{'MYUSERS'} 配置里忽匈,例如:
$policy_bank{'MYUSERS'} = {
[...此處省略其它配置參數(shù)...]
# 不執(zhí)行垃圾掃描、病毒掃描矿辽、郵件頭檢測
bypass_spam_checks_maps => [1],
bypass_virus_checks_maps => [1],
bypass_header_checks_maps => [1],
# 不檢查被禁止的文件名和文件類型
bypass_banned_checks_maps => [1],
}
[root@mail ~]# service amavisd restart
6丹允、配置DNS,參考:
http://www.iredmail.com/docs/setup.dns.html
7袋倔、測試郵件服務(wù)器
[root@mail ~]# amavisd -c /etc/amavisd/amavisd.conf testkeys
TESTING#1: dkim._domainkey.huhunet.com?????? => pass
#測試SPF雕蔽、DKIM等是否生效
http://www.mail-tester.com
check-auth@verifier.port25.com
郵件系統(tǒng),可登錄發(fā)送郵件
https://mail.huhunet.com/mail/
iRedMail管理后臺宾娜,可添加郵箱賬號
https://mail.huhunet.com/iredadmin/
賬號:postmaster@huhunet.com
密碼:xxxxxx(安裝iRedMail時批狐,設(shè)置的密碼)
參考文檔:
下載鏈接
http://www.iredmail.com/download.html
國內(nèi)安裝:
http://www.iredmail.com/bbs/topic3079-iredmail-iredmail092.html
官方文檔:
http://www.iredmail.com/docs/index.html
http://www.iredmail.com/bbs/forum3-iredmail.html
dkim配置
http://www.iredmail.com/docs/sign.dkim.signature.for.new.domain.html
發(fā)送慢原因:
http://www.iredmail.com/bbs/topic2229-iredmail-iredmail.html