---
title: How do I create a CSR and import a third-party SSL certificate for MDaemon or Security Gateway using Certreq?
description: Windows has a command line utility, certreq.exe that will allow you to create a certificate request and import the new certificate into the Windows Certificate Store, where it can be used with MDaemon or Security Gateway.
---

[Skip to content](https://knowledge.mdaemon.com/how-to-create-a-csr-and-import-a-third-party-ssl-certificate-for-mdaemon-using-certreq#main-content)

[![](https://knowledge.mdaemon.com/hs-fs/hubfs/MDaemon-Technologies_logo.png?width=200&height=150&name=MDaemon-Technologies_logo.png)](https://mdaemon.com/)

- [Knowledge Base Home](https://knowledge.mdaemon.com/)
- [Go to www.mdaemon.com](https://mdaemon.com/)

Open main navigation

Close main navigation

- [Knowledge Base Home](https://knowledge.mdaemon.com/)
- [Go to www.mdaemon.com](https://mdaemon.com/)
- [Contact Us](https://mdaemon.com/pages/contact-us)

[Contact Us](https://mdaemon.com/pages/contact-us)

 Knowledge Base

- There are no suggestions because the search field is empty.

1. [Knowledge Base Home](https://knowledge.mdaemon.com/?hsLang=en)
2. [MDaemon Email Server](https://knowledge.mdaemon.com/mdaemon-email-server?hsLang=en)

# How do I create a CSR and import a third-party SSL certificate for MDaemon or Security Gateway using Certreq?

## Windows has a command line utility, certreq.exe that will allow you to create a certificate request and import the new certificate into the Windows Certificate Store, where it can be used with MDaemon or Security Gateway.

MDaemon does not have a method of creating a Certificate Signing Request (CSR) for you in order to obtain a third party SSL certificate issued by a Trusted Root Authority (such as Verisign or GoDaddy).  

The example below will generate a CSR for a 2048 bit key length certificate.

1. Purchase an SSL Certificate from an issuing authority.
2. Create the Certificate Signing Request (CSR):  
     - Log into your mail server using an Administrator account.
     - Create a file named **CSRParameters.inf** a directory in which the user has  permissions to read/write/interact with.  **C:\\** is used in this example.
     - Use the contents below as a template, **replacing the Subject= section with the server name/location**. 
       
       \[NewRequest\]  
       Subject="CN=mail.company.test,OU=MDaemon Technologies,O=MDaemon Technologies,S=Texas,L=Grapevine,C=US"  
       KeySpec=1  
       KeyLength=2048  
       Exportable=TRUE  
       MachineKeySet=TRUE  
       SMIME=False  
       PrivateKeyArchive=FALSE  
       UserProtected=FALSE  
       UseExistingKeySet=FALSE  
       ProviderName="Microsoft RSA SChannel Cryptographic Provider"  
       ProviderType=12  
       RequestType=PKCS10  
       KeyUsage=0xa0  
       Silent=TRUE  
       \[EnhancedKeyUsageExtension\]  
       OID=1.3.6.1.5.5.7.3.1
     - Open a command prompt.
     - Change the directory to a directory in which the command prompt can read/write/interact with.  C:\\ is used in this example.
     - Type in the following command:
       
       ```
       C:\>certreq -new CSRParameters.inf CSROutput.pem 
       ```
     - Open Windows Explorer and browse to the C:\\ directory to locate the **CSROutput.pem** file.
     - Using the CSROutput.pem file, go back to the certificate authority and use the file to request your certificate.
3. Install the certificate: 
     - Download the certificate as a CRT file 
           - If the certificate authority asks which type of server to select, choose **Apache**.
     - On the server, open a command prompt.
     - Navigate to the directory that contains the CRT file (C:\\ in this example).
     - Enter the following command (substitute mail.example.com.crt for the actual name of the .crt file you received from the certificate authority):
       
       ```
       C:\>certreq -accept mail.example.com.crt
       ```
4. The certificate will now be available in MDaemon when SSL/HTTP configurations have been created.

**Additional Comments**

For more information about the Certreq.exe utility, please see Microsoft's website: [Certreq](https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/dn296456%28v%3dws.11%29)

This article contains reference to an external link or links. MDaemon Technologies is not responsible for the content or availability of external links.

Note: The request and installation of third party SSL certificates is NOT supported by MDaemon Technical Support, and those who choose to use a third party certificate should be aware of all security issues related to installing and using SSL certificates with their Operating System. If you have questions or issues regarding your third party SSL certificate, please contact the vendor from whom you purchased the certificate.

 

- [MDaemon Email Server](https://knowledge.mdaemon.com/mdaemon-email-server?hsLang=en#main-content)

    - [Mobile Device Management](https://knowledge.mdaemon.com/mdaemon-email-server?hsLang=en#mobile-device-management)
- [MDaemon AntiVirus (SecurityPlus)](https://knowledge.mdaemon.com/mdaemon-antivirus-securityplus?hsLang=en)
- [ActiveSync for MDaemon](https://knowledge.mdaemon.com/activesync-for-mdaemon?hsLang=en)
- [MDaemon Connector for Outlook (Outlook Connector)](https://knowledge.mdaemon.com/mdaemon-connector-for-outlook-outlook-connector?hsLang=en)
- [SecurityGateway for Email Servers](https://knowledge.mdaemon.com/securitygateway-for-email-servers?hsLang=en)
- [RelayFax Network Software](https://knowledge.mdaemon.com/relayfax-network-software?hsLang=en)

[![Chill listening crop-3](https://knowledge.mdaemon.com/hs-fs/hubfs/belch.io/template-assets/MDaemon-Technologies_logo.png?width=199&height=41&name=MDaemon-Technologies_logo.png "Chill listening crop-3")](https://www.mdaemon.com)

[Knowledge Base Home](https://knowledge.mdaemon.com?hsLang=en)

<https://www.youtube.com/c/MDaemonTechnologies> <https://www.linkedin.com/company/mdaemon-technologies/> <https://www.facebook.com/MDaemon.Technologies/> <https://www.twitter.com/MDaemon_Email>

Copyright © 2025, MDaemon Technologies