参考这里进行安装
http://www.iredmail.com/docs/install.iredmail.on.debian.ubuntu-zh_CN.html
添加Letsencrypt安全证书
- 安装
apt-get install letsencrypt
- 生成证书(这里需要先关闭Nginx)
letsencrypt certonly
- 修改配置文件
vi /etc/dovecot/dovecot.conf
ssl_cert = </etc/letsencrypt/live/allemail.me/fullchain.pem
ssl_key = </etc/letsencrypt/live/allemail.me/privkey.pem
vi /etc/nginx/conf.d/00-default.conf
ssl_certificate /etc/letsencrypt/live/allemail.me/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/allemail.me/privkey.pem;
- 执行命令
postconf -e smtpd_tls_cert_file=’/etc/letsencrypt/live/allemail.me/cert.pem’
postconf -e smtpd_tls_key_file=’/etc/letsencrypt/live/allemail.me/privkey.pem’
postconf -e smtpd_tls_CAfile=’/etc/letsencrypt/live/allemail.me/chain.pem’
- 更新证书(证书默认只有90天有效期,可以添加到Crontab中定时执行)
letsencrypt renew
Comments are closed, but trackbacks and pingbacks are open.