美文网首页
iRedMail安装及配置

iRedMail安装及配置

作者: Mark87 | 来源:发表于2016-09-12 23:46 被阅读0次

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、对外发邮件时,禁用垃圾扫描、病毒扫描

[root@mail ~]# vim /etc/amavisd/amavisd.conf

#将下面配置,添加到 $policy_bank{'MYUSERS'} 配置里,例如:

$policy_bank{'MYUSERS'} = {

[...此处省略其它配置参数...]

# 不执行垃圾扫描、病毒扫描、邮件头检测

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、测试邮件服务器

[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

邮件系统,可登录发送邮件

https://mail.huhunet.com/mail/

iRedMail管理后台,可添加邮箱账号

https://mail.huhunet.com/iredadmin/

账号:postmaster@huhunet.com

密码:xxxxxx(安装iRedMail时,设置的密码)

参考文档:

下载链接

http://www.iredmail.com/download.html

国内安装:

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

发送慢原因:

http://www.iredmail.com/bbs/topic2229-iredmail-iredmail.html

相关文章

网友评论

      本文标题:iRedMail安装及配置

      本文链接:https://www.haomeiwen.com/subject/yqcmettx.html