How to use SSL for email

  • Hi all,
    I've added an SSL cert for my main control panel domain for SSL IMAPI email. I seem to be getting this error under my /var/logs/mail.log


    imapd-ssl: couriertls: /etc/imscp/imscp_services.pem: error:0906D06C:PEM routines:PEM_read_bio:no start line


    Any ideas? Cert seems fine in my main control panel.

  • Your Cert is formatted correctly?



    Code
    1. -----BEGIN CERTIFICATE-----....-----END CERTIFICATE-----

    and Is it possible that the lines are ^M-terminated (Copy from Win > Linux)

    Code
    1. vi -b /etc/apache2/domain.ssl/domain.ssl.crt/domain.com.crt
  • @_pAt


    As he said, there was no error when he added the SSL certificate. The problem can be due to the fact that he don't use the correct hostname for the imap server in his mail client. The imap server hostname must matches with one of subject alternative names set in his SSL certificate.


    @robbo007

    • What are the subject alternative names set in your SSL certificates?
    • What is the hostname you 're using for the imap server in your mail client?

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Hi Nuxwin,


    Subject alternative names: sosaria.mydomain.es and www.sosaria.mydomain.es
    Hostname in mail client: sosaria.mydomain.es


    This is the same subdomain for my control panel aceces. I've just tried https on the control panel URL and it does not resolve. Something is a miss yes.


    Cheers,
    Rob

    Edited 3 times, last by robbo007 ().

  • SSL is not enabled for the control panel. There is no switch to SSL on login page, meaning that you did something wrong. If you added the SSL certificate through customer interface, this cannot work. You must add the SSL certificate through i-MSCP installer.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • thats most probably the problem. Can you give me the cli syntax for running the installer to only install the certs?

    perl /var/www/imscp/engine/setup/imscp-reconfigure -r ssl


    This will ask you for SSL certificate to use for the services (FTP, IMAP, SMTP) and the control panel.


    Note that this will also trigger reconfiguration of the whole as there is currently no way to operate on a specific target.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206