Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Certificate error using IMAP in PHP

Tags:

php

imap

I used up all possible combinations of hostname but I always either get a certificate error or just IMAP connection broken.

Certificate failure for imap.froiden.com: Server name does not match certificate: /O=imap.mailhostbox.com/OU=Go to https://www.thawte.com/repository/index.html/OU=Thawte SSL123 certificate/OU=Domain Validated/CN=imap.mailhostbox.com

Hostname which I used is '{imap.froiden.com}INBOX'. ANy suggestion to solve this error?

like image 242
Shashank Jain Avatar asked Oct 25 '11 15:10

Shashank Jain


1 Answers

The certificate is plain invalid. You should either connect to imap.mailboxhost.com:993/imap/ssl or contact the administrator of the mail server and ask for a valid certificate.

Note that while you can use the connection string imap.froiden.com:993/imap/ssl/novalidate-cert to skip certificate validation, you should not do so as that flag will allow any Man In The Middle attacker to read and write your email.

like image 119
phihag Avatar answered Sep 30 '22 05:09

phihag