<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.frotmail.nl/index.php?action=history&amp;feed=atom&amp;title=Courier_SSL_certificaten</id>
	<title>Courier SSL certificaten - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.frotmail.nl/index.php?action=history&amp;feed=atom&amp;title=Courier_SSL_certificaten"/>
	<link rel="alternate" type="text/html" href="https://wiki.frotmail.nl/index.php?title=Courier_SSL_certificaten&amp;action=history"/>
	<updated>2026-04-05T13:21:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.frotmail.nl/index.php?title=Courier_SSL_certificaten&amp;diff=55&amp;oldid=prev</id>
		<title>Eric: Created page with &quot;Category:Linux  You&#039;ll need the following packages installed to do this:      * openssl     * mod_ssl  =Eventueel aanmaken ROOT Cert= Eerst maken we een RSA private key   openssl genrsa -des3 -out ca.key 2048  De output van het commando is ongeveer als volgt:   Generating RSA private key, 2048 bit long modulus  .....+++  .........................+++  e is 65537 (0x10001)  Enter PEM pass phrase: enter a password here  Verifying password - Enter PEM pass phrase: re-ent...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.frotmail.nl/index.php?title=Courier_SSL_certificaten&amp;diff=55&amp;oldid=prev"/>
		<updated>2022-04-05T09:15:21Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/index.php/Category:Linux&quot; title=&quot;Category:Linux&quot;&gt;Category:Linux&lt;/a&gt;  You&amp;#039;ll need the following packages installed to do this:      * openssl     * mod_ssl  =Eventueel aanmaken ROOT Cert= Eerst maken we een RSA private key   openssl genrsa -des3 -out ca.key 2048  De output van het commando is ongeveer als volgt:   Generating RSA private key, 2048 bit long modulus  .....+++  .........................+++  e is 65537 (0x10001)  Enter PEM pass phrase: enter a password here  Verifying password - Enter PEM pass phrase: re-ent...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Linux]]&lt;br /&gt;
&lt;br /&gt;
You&amp;#039;ll need the following packages installed to do this:&lt;br /&gt;
&lt;br /&gt;
    * openssl&lt;br /&gt;
    * mod_ssl&lt;br /&gt;
&lt;br /&gt;
=Eventueel aanmaken ROOT Cert=&lt;br /&gt;
Eerst maken we een RSA private key&lt;br /&gt;
&lt;br /&gt;
 openssl genrsa -des3 -out ca.key 2048&lt;br /&gt;
&lt;br /&gt;
De output van het commando is ongeveer als volgt:&lt;br /&gt;
&lt;br /&gt;
 Generating RSA private key, 2048 bit long modulus&lt;br /&gt;
 .....+++&lt;br /&gt;
 .........................+++&lt;br /&gt;
 e is 65537 (0x10001)&lt;br /&gt;
 Enter PEM pass phrase: enter a password here&lt;br /&gt;
 Verifying password - Enter PEM pass phrase: re-enter your password here&lt;br /&gt;
&lt;br /&gt;
Nu maken we een self-signed CA certificaat&lt;br /&gt;
&lt;br /&gt;
 openssl req -new -x509 -days 3652 -key ca.key -out ca.crt&lt;br /&gt;
&lt;br /&gt;
Output:&lt;br /&gt;
&lt;br /&gt;
 Using configuration from /usr/lib/ssl/openssl.cnf&lt;br /&gt;
 Enter PEM pass phrase: enter your password for the key here&lt;br /&gt;
 You are about to be asked to enter information that will be incorporated&lt;br /&gt;
 into your certificate request.&lt;br /&gt;
 What you are about to enter is what is called a Distinguished Name or a DN.&lt;br /&gt;
 There are quite a few fields but you can leave some blank&lt;br /&gt;
 For some fields there will be a default value,&lt;br /&gt;
 If you enter &amp;#039;.&amp;#039;, the field will be left blank.&lt;br /&gt;
 -----&lt;br /&gt;
 Country Name (2 letter code) [AU]:US&lt;br /&gt;
 State or Province Name (full name) [Some-State]:Pennsylvania&lt;br /&gt;
 Locality Name (eg, city) []:Horsham&lt;br /&gt;
 Organization Name (eg, company) [Internet Widgits Pty Ltd]:WebMasters, Inc.&lt;br /&gt;
 Organizational Unit Name (eg, section) []:&lt;br /&gt;
 Common Name (eg, YOUR name) []:WebMasters, Inc.&lt;br /&gt;
 Email Address []:certs@webmast.com &lt;br /&gt;
&lt;br /&gt;
Dit certificaat is 10 jaar geldig.&lt;br /&gt;
 This will create a self-signed certificate called ca.crt valid for 10 years. &lt;br /&gt;
 The file names (ca.key and ca.crt) are important, as  the sign.sh shell script that &lt;br /&gt;
 comes with mod_ssl looks for these specific file names. &lt;br /&gt;
 That&amp;#039;s it, you&amp;#039;re now have a root certificate ready to be used to sign other &lt;br /&gt;
 certificates or to be installed in a browser!&lt;br /&gt;
&lt;br /&gt;
=Maak een certificaat request voor POP3/IMAP=&lt;br /&gt;
&lt;br /&gt;
Ok, now that you&amp;#039;ve created a self-signed CA certificate, it&amp;#039;s time to generate the certificate(s) for your pop and imap servers. The number of certificates you need depends on how many host names you are using. If you use the same host name (i.e., mail.example.com) then you only need a single certificate. Basicly, you need a certificate for each unique host name. The instructions are the same for each. The only difference is the Common Name, and possibly Organizational Unit Name. Let&amp;#039;s get started!&lt;br /&gt;
&lt;br /&gt;
 openssl genrsa -out pop3d.key 2048&lt;br /&gt;
&lt;br /&gt;
This will create a 2048-bit RSA key that doesn&amp;#039;t require you to enter the password when the pop3d-ssl or imapd-sll server starts. The output from this command is very similar to when you created the key for the CA, except you won&amp;#039;t be prompted for a password.&lt;br /&gt;
&lt;br /&gt;
Now that you have a key, let&amp;#039;s generate a Certificate Signing Request (CSR)&lt;br /&gt;
&lt;br /&gt;
 openssl req -new -key pop3d.key -out pop3d.csr&lt;br /&gt;
&lt;br /&gt;
 Using configuration from /usr/lib/ssl/openssl.cnf&lt;br /&gt;
 You are about to be asked to enter information that will be incorporated&lt;br /&gt;
 into your certificate request.&lt;br /&gt;
 What you are about to enter is what is called a Distinguished Name or a DN.&lt;br /&gt;
 There are quite a few fields but you can leave some blank&lt;br /&gt;
 For some fields there will be a default value,&lt;br /&gt;
 If you enter &amp;#039;.&amp;#039;, the field will be left blank.&lt;br /&gt;
 -----&lt;br /&gt;
 Country Name (2 letter code) [AU]:US&lt;br /&gt;
 State or Province Name (full name) [Some-State]:Pennsylvania&lt;br /&gt;
 Locality Name (eg, city) []:Horsham&lt;br /&gt;
 Organization Name (eg, company) [Internet Widgits Pty Ltd]:WebMasters, Inc.&lt;br /&gt;
 Organizational Unit Name (eg, section) []:WMI pop-3 mail server&lt;br /&gt;
 Common Name (eg, YOUR name) []:pop3.webmast.com&lt;br /&gt;
 Email Address []:postmaster@webmast.com &lt;br /&gt;
 &lt;br /&gt;
 Please enter the following &amp;#039;extra&amp;#039; attributes&lt;br /&gt;
 to be sent with your certificate request&lt;br /&gt;
 A challenge password []:&lt;br /&gt;
 An optional company name []: &lt;br /&gt;
&lt;br /&gt;
=Onderteken de requests met het root certificaat=&lt;br /&gt;
&lt;br /&gt;
CA.pl verwacht newreq.pem als requestnaam, ff het straks gemaakte request hernoemen:&lt;br /&gt;
&lt;br /&gt;
 cp pop3d.csr newreq.pem&lt;br /&gt;
&lt;br /&gt;
sign je request:&lt;br /&gt;
&lt;br /&gt;
 /etc/ssl/misc/CA.pl -signCA&lt;br /&gt;
 mv newcert.pem pop3d.crt&lt;br /&gt;
&lt;br /&gt;
=Voltooi het certificaat=&lt;br /&gt;
&lt;br /&gt;
Om courier gebruik te laten maken van het certificaat moeten we een pem file genereren. De pop3d.crt bevat nog wat overbodige regels (de &amp;#039;human readable&amp;#039; regels) en deze moeten worden verwijderd.&lt;br /&gt;
Zorg ervoor dat je uiteindelijk alleen dit overhoud:&lt;br /&gt;
&lt;br /&gt;
 -----BEGIN CERTIFICATE-----&lt;br /&gt;
 MIIDtzCCAp8CAQEwDQYJKoZIhvcNAQEEBQAwgY4xCzAJBgNVBAYTAlVTMRUwEwYD&lt;br /&gt;
 VQQIEwxQZW5uc3lsdmFuaWExEDAOBgNVBAcTB0hvcnNoYW0xGTAXBgNVBAoTEFdl&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 .&lt;br /&gt;
 BBL3CLqzb6ZMHSm+6eVr2RrsaePChPhb+/1PCgvJESqVEoR4RO5RHywiyg==&lt;br /&gt;
 -----END CERTIFICATE-----&lt;br /&gt;
&lt;br /&gt;
Ok nu plakken we de key + het certificaat aan elkaar om de goede pop3d.pem te genereren&lt;br /&gt;
&lt;br /&gt;
 cat pop3d.key pop3d.crt &amp;gt; pop3d.pem&lt;br /&gt;
&lt;br /&gt;
Kopieer de file naar de goede lokatie en zorg ervoor dat niet iedereen deze kan lezen:&lt;br /&gt;
&lt;br /&gt;
 cp pop3d.pem /usr/lib/courier-imap/share/&lt;br /&gt;
 chmod 0600 /usr/lib/courier-imap/share/pop3d.pem&lt;br /&gt;
 cp /usr/lib/courier-imap/share/pop3d.pem /usr/lib/courier-imap/share/imapd.pem&lt;br /&gt;
&lt;br /&gt;
[[Category:Mail Related]]&lt;/div&gt;</summary>
		<author><name>Eric</name></author>
	</entry>
</feed>