How to renew SSL certificate on iRedMail

Here is an example of updating a certificate on Ubuntu Server with iRedMail installed.

Switch to the root user:

sudo -i

In the installation directory with iRedMail there is a certificate generation script, in my case it is located here /root/iRedMail-0.9.7/tools/

Copy it to /etc/ssl/:

cp /root/iRedMail-0.9.7/tools/ /etc/ssl/

The script can be opened in the text editor nano (Ctrl+X to exit, y/n to save or cancel changes):

nano /etc/ssl/

And change some information, for example:


Make the file executable:

chmod +x /etc/ssl/


sh -e /etc/ssl/

After startup, the following files will be generated:


Restart the apache2 web server:

/etc/init.d/apache2 restart

Let’s check the certificate (where is your domain):

openssl s_client -connect  | grep "Verify return code"
Подписаться на IT Blog (RU) по Email
Subscribe to IT Blog (EN) by Email

Did my article help you? How about buying me a cup of coffee as an encouragement? Buy me a coffe.

Leave a Reply