![]() ![]()
This does not mean that the server is not performing some change to its state but that the client did not request it. This entry was posted in Linux on 18 April 2015 by jejb. It does not request any change to the state of the system in any form or way. Simply fixing squirrelmail to connect to imaps over the fully qualified hostname instead of localhost gets everything working again. In this case, because I’m connecting over the loopback device (localhost) instead of the internet to the DNS name, that CN check has failed and lead to the results I’m seeing. #Squirrelmail imsa verificationSo that’s it: php has tightened up the certificate verification not only to validate the certificate itself, but also to check that the CN matches the requested service. #Squirrelmail imsa codePHP Warning: fsockopen(): unable to connect to tls://localhost:993 (Unknown error) in php shell code on line 1 PHP Warning: fsockopen(): Failed to enable crypto in php shell code on line 1 PHP Warning: fsockopen(): Peer certificate CN=`' did not match expected CN=`localhost' in php shell code on line 1 executing this echo 'fsockopen("tls://localhost",993,$errno,$errmsg,15) '|php -aįinally tells me what’s wrong Interactive mode enabled After several hours of casting about with the fairly useless php documentation, it turns out that php has an interactive mode where it will actually give you all the errors. It’s failing because $imap_stream is empty, but, as squirrelmail claims, it’s actually failing with a zero error code. Digging into the sources of squirrelmail, it turns out this php statement (with the variables substituted) is the failing one $imap_stream = 993, $errno, $errstr, 15) I know I ran into this a long time ago, so the self signed certificate my version of dovecot is using is present in the /etc/ssl/certs directory where php looks for authoritative certificates. Long ago, when php first started using openssl, it pretty much did no peer verification. The answer, it seems, is buried deep inside php. ![]() Everything else works with imaps on this system, so why not squirrelmail? This is what it actually shows Error connecting to IMAP server "localhost:993".Server error: (0) The problem is that I’m getting a connect failure but an error code of zero and no error message. I only ever use webmail as a last resort, so the problem may be left over from years ago. # vi /etc/httpd/conf/httpd.Somewhere along the way squirrelmail stopped working with my dovecot imap server, which runs only on the secure port (imaps). Note: If these lines are already added at the end of file SKIP this step. Now add following lines at the end of nf file. Now go to squirrelmail folder and configure it according to your server # cd /usr/share/squirrelmail/config/Īfter changes press S to save settings and press Q to exit. #Squirrelmail imsa installNow install Squirrelmail # yum install squirrelmail -y # systemctl enable dovecot Step 4: Install and Configure Squirrelmailįirst install and start apache service # yum install httpd -y Now restart Dovecot # systemctl restart dovecot Group = postfix # uncomment line 92 and enter postfix User = postfix # uncomment line 91 and enter postfix Make following changes to file /etc/dovecot/conf.d/nf # vi /etc/dovecot/conf.d/nf Make following changes at the end of file /etc/dovecot/conf.d/nf # vi /etc/dovecot/conf.d/nf Make following changes at the end of file /etc/dovecot/nf # vi /etc/dovecot/nf # systemctl enable postfix Step 3: Install and Configure Dovecot # yum install dovecot Restart Postfix # systemctl restart postfix Mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain # Now Go to line no 164 add $domain at the end ![]() # vi /etc/postfix/main.cf # Enter your hostname ![]() Now make following changes to posfix file using below command at the end. Now install Postfix # yum install postfix -y #Squirrelmail imsa updateThe last update to SquirrelMail was May 30, 2013, with their last release being on July 12, 2011. Why do you ask SquirrelMail is developed and maintained by an open-source project devoted to its progression and an all too common story with open source project is a loss of developers. You must install Epel Repository using below command # yum install epel-release -y Unfortunately, SquirrelMail is being removed. And reboot the server using below command # reboot Step 2: Install and Configure Postfix ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |