{"id":438,"date":"2020-05-03T05:41:28","date_gmt":"2020-05-02T19:41:28","guid":{"rendered":"https:\/\/ghiassy.net\/?p=438"},"modified":"2020-05-03T05:52:22","modified_gmt":"2020-05-02T19:52:22","slug":"roundcube-webmail-client","status":"publish","type":"post","link":"https:\/\/ghiassy.net\/?p=438","title":{"rendered":"Roundcube Webmail Client"},"content":{"rendered":"<p><span style=\"color: #00ff00;\">I was installing roundcube webclinet on my server and both SMTP and IMAP server using TTLS for encrypted connection. However, I used Lets Encrypt SSL certificate. The PHP couldn\u2019t validate the certificate when configuring roundcube. Therefore, it couldn\u2019t establish connection to SMTP and IMAP.<\/span><\/p>\n<p><span style=\"color: #00ff00;\">here is the command to test the SSL on you SMTP and IMAP servers:<\/span><\/p>\n<pre class=\"lang:sh decode:true\">~$ openssl s_client -connect example.ir:25 -starttls smtp<\/pre>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #00ff00;\">To fix this issue ( after long hours of search ) the PHP SSL validation must be switched off in the config.inc.php file. Here is the lines that need to be added:<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><!--more--><\/p>\n<pre class=\"lang:php decode:true \" title=\"config.inc.php\">\/\/\/\/\/\/\/\/\/\/\/\/\/ disbaled Certificate file check, otherwise wont loging\r\n\/\/\/\/\/\/\/\/\/\/\/\/\/  added by Saeed\r\n$config['default_host'] = 'localhost'; \/\/yourimap server address\r\n$config['default_port'] = 143;\r\n\/\/ IMAP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or null to use\r\n\/\/ best server supported one)\r\n$config['imap_conn_options'] = array(\r\n  'ssl' =&gt; array(\r\n          'verify_peer'  =&gt; false,\r\n          'verify_peer_name' =&gt; false,\r\n          'verify_depth' =&gt; 3,\r\n          'cafile'       =&gt; '\/etc\/openssl\/certs\/ca.crt',\r\n  ),\r\n);\r\n\r\n$config['smtp_server'] = 'tls:\/\/localhost';\r\n$config['smtp_conn_options'] = array(\r\n  'ssl' =&gt; array(\r\n          'verify_peer'  =&gt; false,\r\n          'verify_peer_name' =&gt; false,\r\n          'verify_depth' =&gt; 3,\r\n          'cafile'       =&gt; '\/etc\/openssl\/certs\/ca.crt',\r\n  ),\r\n);\r\n<\/pre>\n<p><span style=\"color: #00ff00;\">Best of luck.<\/span><br \/>\n<span style=\"color: #00ff00;\">&#8212; Saeed \ud83d\ude42<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was installing roundcube webclinet on my server and both SMTP and IMAP server using TTLS for encrypted connection. However, I used Lets Encrypt SSL certificate. The PHP couldn\u2019t validate the certificate when configuring roundcube. Therefore, it couldn\u2019t establish connection to SMTP and IMAP. here is the command to test the SSL on you SMTP [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,6],"tags":[15],"class_list":["post-438","post","type-post","status-publish","format-standard","hentry","category-linux","category-servers","tag-roundcube"],"_links":{"self":[{"href":"https:\/\/ghiassy.net\/index.php?rest_route=\/wp\/v2\/posts\/438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ghiassy.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ghiassy.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ghiassy.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ghiassy.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=438"}],"version-history":[{"count":5,"href":"https:\/\/ghiassy.net\/index.php?rest_route=\/wp\/v2\/posts\/438\/revisions"}],"predecessor-version":[{"id":443,"href":"https:\/\/ghiassy.net\/index.php?rest_route=\/wp\/v2\/posts\/438\/revisions\/443"}],"wp:attachment":[{"href":"https:\/\/ghiassy.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ghiassy.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ghiassy.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}