[CentOS] Certificates
Gordon Messmer
gordon.messmer at gmail.comSun Sep 2 05:15:44 UTC 2018
- Previous message: [CentOS] Certificates
- Next message: [CentOS] Step-by-Step Tutorial: How to Deploy cPanel Web Hosting Control Panel version 11.74 on CentOS 7.5 Linux Server version 1805 in Amazon AWS Cloud
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I use something like this script to renew my SMTP and IMAP certificates
(/etc/cron.weekly/certbot-renew):
#!/bin/sh
hostcert=/etc/letsencrypt/live/mail.example.com
certlink="$(readlink "${hostcert}/cert.pem")"
test -x /usr/bin/certbot || exit 72
certbot certonly --quiet --standalone --keep-until-expiring \
-d mail.example.com \
-d imap.example.com \
--email postmaster at example.com \
--agree-tos --expand
# Exit if the cert hasn't been updated
test "${certlink}" = "$(readlink "${hostcert}/cert.pem")" && exit
cat ${hostcert}/fullchain.pem ${hostcert}/privkey.pem >
/usr/lib/courier/share/esmtpd.pem
cat ${hostcert}/fullchain.pem ${hostcert}/privkey.pem >
/usr/lib/courier/share/imapd.pem
systemctl restart courier
- Previous message: [CentOS] Certificates
- Next message: [CentOS] Step-by-Step Tutorial: How to Deploy cPanel Web Hosting Control Panel version 11.74 on CentOS 7.5 Linux Server version 1805 in Amazon AWS Cloud
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list