ID:               39654
 Updated by:       [EMAIL PROTECTED]
 Reported By:      david at blue-labs dot org
-Status:           Open
+Status:           Bogus
 Bug Type:         Sockets related
 Operating System: Linux
 PHP Version:      5.2.0
 New Comment:

These error messages mean that you're trying to speak SMTP-SSL to a
service which supports only plain SMTP.
Usually SMTP over SSL uses different port instead of 25.
Not PHP problem.


Previous Comments:
------------------------------------------------------------------------

[2006-11-28 01:19:23] david at blue-labs dot org

Description:
------------
(this is actually php 5.1.6)

using the tls target, fsockopen() tries to negotiate SSL instead of
starting a connection and negotiating STARTTLS.



Reproduce code:
---------------
Scott PHP # cat tls-test.php
<?
$fp = fsockopen("tls://mail.blue-labs.org", 25, $errno, $errstr);
?>



Expected result:
----------------
I expect it to open a connection and negotiate STARTTLS.  ssl:// should
start an SSL connection, tls:// should start a TLS connection

Actual result:
--------------
Scott PHP $ php ./tls-test.php

Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error
messages:
error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number in
/home/david/svn/BlueLabs/BlueList/PHP/tls-test.php on line 3

Warning: fsockopen(): Failed to enable crypto in
/home/david/svn/BlueLabs/BlueList/PHP/tls-test.php on line 3

Warning: fsockopen(): unable to connect to tls://mail.blue-labs.org:25
(Unknown error) in /home/david/svn/BlueLabs/BlueList/PHP/tls-test.php
on line 3

(trimmed for brevity)

NOQUEUE: connect from [69.167.98.28]
AUTH: available mech=CRAM-MD5, allowed mech=DIGEST-MD5 CRAM-MD5 LOGIN
PLAIN
 --- 220-sunny-beach.m2000inc.com ESMTP
 --- 220
 <-- \026\003\001
 --- 500 5.5.1 Command unrecognized: "\026\003\001"
 <--
 --- 500 5.5.1 Command unrecognized: ""
 --- 421 4.4.1 sunny-beach.m2000inc.com Lost input channel from
[69.167.98.28]
[69.167.98.28] did not issue MAIL/EXPN/VRFY/ETRN during connection to
MTA



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39654&edit=1

Reply via email to