SSL certificate Ok on 443 but not on 587

ewok2

New member
Joined
Jun 17, 2022
Messages
2
Hi
I have a mail server on an Ubuntu VM (Postfix / dovecot / roundcube) working fine with SSL.
Roundcube use the 587 port (with TLS).
The webmail is accessible with https (443 port).
The certificates are lets'encrypt and are vaild.

If I try from another Ubuntu VM on the same local network the folowing command I get a strange response with 587 port ...

openssl s_client -showcerts -connect mail.mydomain.net:443
I get as expected :
CONNECTED(00000003)
depth=2 C = US, O = Internet Security Research Group, CN = ISRG Root X1
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = R3
verify return:1
depth=0 CN = mail.mydomain.net
verify return:1


But if a try
openssl s_client -showcerts -connect mail.mydomain.net:587 -starttls smtp
I get an error :
CONNECTED(00000003)
depth=0 CN = mail.mydomain.net
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 CN = mail.mydomain.net
verify error:num=21:unable to verify the first certificate
verify return:1
depth=0 CN = mail.mydomain.net
verify return:1

Any idea why openssl did not succed to find the CA of mail.mydomain.net on 587 but succeed on 443 port ? (the certificate is the same...)

Thanks
 
Back
Top