Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Squirrelmail not Sending "Can't open SMTP stream"

Here's the relevant portion of Squirrelmail configtest.php:

Checking outgoing mail service....

Warning: fsockopen() [function.fsockopen]: SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:SSL3 GETRECORD:wrong version number in /usr/share/squirrelmail/src/configtest.php on line 267

Warning: fsockopen() [function.fsockopen]: Failed to enable crypto in /usr/share/squirrelmail/src/configtest.php on line 267

Warning: fsockopen() [function.fsockopen]: unable to connect to tls://localhost:25 (Unknown error) in /usr/share/squirrelmail/src/configtest.php on line 267
ERROR: Error connecting to SMTP server "localhost:25".Server error: (0)

I've looked over the options in config.php and they seem to be okay but I could be missing something.

MAIL is sending and receiving normally.

MacBook Pro/Leopard Server, Mac OS X (10.5.1)

Posted on Dec 1, 2007 7:33 PM

Reply
2 replies

Dec 24, 2007 9:24 AM in response to Jim Putnam

Hi, I got exactly the same problem. (I assume that you too have configured smtp on
port 25 to optionally have starttls and require TLS and authentication to send or relay mail).

After much struggling I discovered that the problem it's due to the "old" squirrelmail
version present in Leopard 10.5.1. This version is not able to issue a starttls
command but it it uses SSL straight away. Therefore postfix gets confused because
of the lack of the EHLO and STARTTLS part.

Since the last version of squirrelmail can issue the STARTTLS command, you have at least three options:

a) install the latest squirrelmail and overwrite or bypass Apple's one. This should work on port
25 without touching the canonical postfix configuration.

b) use temporarily (waiting for Apple to upgrade its default squirrelmail version) the port 465
for smtps (deprecated, since now it is preferred the port 587 which, however still has the starttls
issue) enabling postfix to start with the encripted communication. You need to open the port in
the firewall, then to edit the file /etc/postfix/master.cf, uncommenting the lines corresponding
to 'smtps' and replacing smtps with 465. Of course you need to define 465 as
the smtp port in squirrelmail. After a postfix restart in my case everything worked well and
https://--mymachine--/webmail/src/configtest.php passed the tests, apart from a complaint
about magic_quotes... (which I know nothing about and do not care for the time being)

c) try to use roundcube (or bincimap) instead of squirrelmail

I preferred to use solution (b) since I am not a sys admin, I have not many users (I am
setting up a mini-group server) and in future I can easily revert to the std configuration,
replacing the -saved- original master.cf, closing the firewall port and redirecting
squirrelmail to port 25. If you prefer to not touch postfix configuration perhaps
solution (c) is worth a try.

I hope this helps.

Squirrelmail not Sending "Can't open SMTP stream"

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.