How to renew SSL certificate on iRedMail

I will give an example of updating a self-signed 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"

See also my article:
Install SSL Certificate for iRedMail

Leave a comment

Leave a Reply