I have my own email server where I use Let`s Encrypt SSL certificates. I have Debian, Nginx Postfix and Dovecot.
I have a problem like this that I haven’t been able to find a solution to. I would need a crontab command to reload the Nginx, Dovecot and Postfix programs in order to automatically enable the automatically renewed Let`s Encrypt certificate. I want the certbot crontab to run once a day at 00:00 at night.
I would be very grateful if someone could give me the command I needed so I could just attach it. I don’t have much knowledge of the Crontab command, and I have a little poor English proficiency. I have to use quite a lot of google compiler.
--deploy-hook DEPLOY_HOOK
Command to be run in a shell once for each
successfully issued certificate. For this command, the
shell variable $RENEWED_LINEAGE will point to the
config live subdirectory (for example,
"/etc/letsencrypt/live/example.com") containing the
new certificates and keys; the shell variable
$RENEWED_DOMAINS will contain a space-delimited list
of renewed certificate domains (for example,
"example.com www.example.com" (default: None)
Yes, that’s exactly what I mean. My current Crontab command is in this image. To this should only be added the launch of Dovecot, Postfix and Nginx after automatic renewal so that the new SSL certificate will be applied automatically.
However, I’m not sure how I should edit this command to make sure everything is correct.
So is there something wrong with the settings? I haven’t configured the entire server myself. Let`s Encrypt and all mail programs have been configured by a virmach.com company technician.
However, the auto-renewed certificate is not enabled automatically and that is my problem.
Google translator may also mix things up, and I apologize if I have understood something wrong.
You didn’t seem to understand my problem. I’m sorry if google translator because of embarrassment.
I want Postfix, Nginx and Dovecot to reload automatically when Certbot renews my certificate. After all, the renewed certificate will not be used unless the programs I mentioned are reloaded. So how should I modify this command so that Postfix, Nginx and Dovecot are reloaded when Let`s Encryt SSL is reload automatically. This is my command: 0 */12 * * * root test -x /usr/bin/certbot -a ! -d /run/systemd/system && perl -e ‘sleep int(rand(43200))’ && certbot -q renew
I understand that this file is OK: /etc/letsencrypt/renewal/your_cert_name.conf
that line in your crontab does nothing because your system uses systemd and certbot uses a systemd timer to handle automatic renewals.
by adding that line in your /etc/letsencrypt/renewal/mail.isosomppi.fi.conf you tell certbot “whenever you have renewed this certificate, run this command”
So I add this command renew-hook = systemctl Reload postfix dovecot nginx to this file ?: /etc/letsencrypt/renewal/mail.isosomppi.fi.conf
mail.isosomppi.fi is the webmail and iredadmin subdomain of my email server. isosomppi.fi is my domain. Will I also add that command to /etc/letsencrypt/renewal/isosomppi.fi.conf?