Generating a CSR on Zimbra Using zmcertmgr Tool

Author:Esadax
Updated:Jun 13, 2025

To generate a new CSR code for a single domain SSL certificate using the zmcertmgr tool on Zimbra:

  1. Switch to the zimbra user:

    sudo su zimbra
    
  2. Generate the CSR for a single domain: Replace server.domain.com with your actual server hostname.

    /opt/zimbra/bin/zmcertmgr createcsr comm -new -subject "/C=US/ST=CA/L=Los Angeles/O=Esadax/OU=NA/CN=server.domain.com" -noDefaultSubjectAltName
    
  3. Generate the CSR for a Wildcard certificate: Replace *.domain.com with your wildcard hostname.

    /opt/zimbra/bin/zmcertmgr createcsr comm -new -subject "/C=US/ST=CA/L=Los Angeles/O=Esadax/OU=NA/CN=*.domain.com" -noDefaultSubjectAltName
    
  4. Generate the CSR for multiple domains: Replace first.domain.com,second.domain.com with your domain names.

    /opt/zimbra/bin/zmcertmgr createcsr comm -new -subject "/C=US/ST=CA/L=Los Angeles/O=Esadax/OU=NA/CN=first.domain.com" -subjectAltNames "second.domain.com,third.domain.com"
    
  5. Open the generated CSR file:

    cat /opt/zimbra/ssl/zimbra/commercial/commercial.csr
    

    Copy the entire content from -----BEGIN CERTIFICATE REQUEST----- to -----END CERTIFICATE REQUEST-----.

  6. Save the private key: The private key is located at /opt/zimbra/ssl/zimbra/commercial/commercial.key. Ensure it is secure and backed up for SSL installation.

Notes:

  • Verify all domain names and details match Esadax's requirements.
  • Ensure correct formatting of subjectAltNames for multiple domains.