need to configure SSL certificate

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
suleman.khalil
New user
New user
Posts: 5
Joined: 2013-08-22 07:21

need to configure SSL certificate

Post by suleman.khalil » 2018-11-26 09:42

Dear All,
we had received SSL certificate from our hosting company with the file extension .pfx and its password protected (they had given the password).
need to know the procedure to configure on port 465 for SMTP.

Virinum
Normal user
Normal user
Posts: 69
Joined: 2018-11-23 14:42
Location: Germany

Re: need to configure SSL certificate

Post by Virinum » 2018-11-26 11:07

.pfx is a container format. You have to extract your certificate (e.g. into .pem) and the private key. OpenSSL should help you with this task.
Just google for "get pem and key from pfx".

Then you add your certfificate in HM (Settings -> Advanced -> SSL Certificates) and map it in TCP/IP ports (Settings -> Advanced -> TCP/IP ports). For SMTP on port 465 use connection security: SSL/TLS.

Virinum
Normal user
Normal user
Posts: 69
Joined: 2018-11-23 14:42
Location: Germany

Re: need to configure SSL certificate

Post by Virinum » 2018-11-26 11:50

Here are the commands:

Extract the private key from PFX:

Code: Select all

openssl pkcs12 -in filename.pfx -nocerts -out key.pem
openssl will ask you two things:
1. Import Password: The password you got from your hosting company
2. PEM pass phrase: Use something you want. We will remove this in the next step.

Remove the password from the key:

Code: Select all

openssl rsa -in key.pem -out server.key
Export the certificate:

Code: Select all

openssl pkcs12 -in filename.pfx -clcerts -nokeys -out cert.pem

suleman.khalil
New user
New user
Posts: 5
Joined: 2013-08-22 07:21

Re: need to configure SSL certificate

Post by suleman.khalil » 2018-11-27 13:09

Thank you very much Virinum,
i had done all the steps and now i am not getting any error message in my logs but mail are in queee.

"SMTPD" 3704 2340 "2018-11-27 15:56:32.288" "192.168.0.8" "SENT: 220 local ESMTP"
"SMTPD" 3704 2340 "2018-11-27 15:56:32.288" "192.168.0.8" "RECEIVED: EHLO SulemanKhalil"
"SMTPD" 3704 2340 "2018-11-27 15:56:32.288" "192.168.0.8" "SENT: 250-local[nl]250-SIZE 20480000[nl]250 AUTH LOGIN"
"SMTPD" 3704 2340 "2018-11-27 15:56:32.288" "192.168.0.8" "RECEIVED: AUTH LOGIN"
"SMTPD" 3704 2340 "2018-11-27 15:56:32.288" "192.168.0.8" "SENT: 334 VXNlcm5hbWU6"
"SMTPD" 3704 2340 "2018-11-27 15:56:32.288" "192.168.0.8" "RECEIVED: aXRAbW50ZXh0aWxlcy5waw=="
"SMTPD" 3704 2340 "2018-11-27 15:56:32.288" "192.168.0.8" "SENT: 334 UGFzc3dvcmQ6"
"SMTPD" 3704 2340 "2018-11-27 15:56:32.288" "192.168.0.8" "RECEIVED: ***"
"SMTPD" 3704 2340 "2018-11-27 15:56:32.288" "192.168.0.8" "SENT: 235 authenticated."
"SMTPD" 3704 2340 "2018-11-27 15:56:32.304" "192.168.0.8" "RECEIVED: MAIL FROM: <abc@abc.com>"
"SMTPD" 3704 2340 "2018-11-27 15:56:32.320" "192.168.0.8" "SENT: 250 OK"
"SMTPD" 3704 2340 "2018-11-27 15:56:32.320" "192.168.0.8" "RECEIVED: RCPT TO: <suleman.khalil@abc.com>"
"SMTPD" 3704 2340 "2018-11-27 15:56:32.320" "192.168.0.8" "SENT: 250 OK"
"SMTPD" 3704 2340 "2018-11-27 15:56:32.320" "192.168.0.8" "RECEIVED: DATA"
"SMTPD" 3704 2340 "2018-11-27 15:56:32.320" "192.168.0.8" "SENT: 354 OK, send."
"SMTPD" 1264 2340 "2018-11-27 15:56:32.335" "192.168.0.8" "SENT: 250 Queued (0.000 seconds)"

User avatar
mattg
Moderator
Moderator
Posts: 20786
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: need to configure SSL certificate

Post by mattg » 2018-11-27 15:55

Run this and post the results please >> http://www.hmailserver.com/forum/viewto ... 20&t=30914
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

suleman.khalil
New user
New user
Posts: 5
Joined: 2013-08-22 07:21

Re: need to configure SSL certificate

Post by suleman.khalil » 2018-11-30 11:46

showing below

SMTP relayer is in use.
Trying to connect to host mail.abc.com...
Trying to connect to TCP/IP address 61.61.41.41 on port 465.
Connected successfully.

suleman.khalil
New user
New user
Posts: 5
Joined: 2013-08-22 07:21

Re: need to configure SSL certificate

Post by suleman.khalil » 2018-11-30 11:47

but mails are in quee.
Note: above IP is fake..

User avatar
mattg
Moderator
Moderator
Posts: 20786
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: need to configure SSL certificate

Post by mattg » 2018-12-01 01:45

I think that you have made a configuration error
mattg wrote:
2018-11-27 15:55
Run this and post the results please >> http://www.hmailserver.com/forum/viewto ... 20&t=30914
ALSO Please show some more logs, particularly lines that start with SMTPC
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Post Reply