Ubuntu 18.04.5 安装iredmail 邮件服务器

vi /etc/hostname #编辑文件写入域名

mail.ex.com

vi /etc/hosts  #mail.ex.com写在最前面

127.0.0.1 mail.ex.com 

hostname mail.ex.com 

hostname  -f

cd /root/
wget https://github.com/iredmail/iRedMail/archive/1.3.2.tar.gz

tar -zxvf 1.3.2.tar.gz
cd iRedMail-1.3.2/

bash iRedMail.sh

#安装参考 https://docs.iredmail.org/install.iredmail.on.debian.ubuntu-zh_CN.html

安装域名设置为ex.com 

#替换ssl证书 证书位置在

 /etc/ssl/private/iRedMail.key     /etc/ssl/certs/iRedMail.crt

最后重启

#配置域名解析

 spf ip更改为公网IP

#最后设置 dkim

 amavisd-new  showkeys #显示key

完了在DNS记录中添加对应的txt记录

重启机器 #完

原文地址:https://www.cnblogs.com/ligang0357/p/14241305.html