Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 552436

Summary: imail_open not support MS Exchange 2007
Product: Red Hat Enterprise Linux 5 Reporter: Achievement Chan <achievement.hk>
Component: phpAssignee: Joe Orton <jorton>
Status: CLOSED ERRATA QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: urgent Docs Contact:
Priority: low    
Version: 5.4CC: achievement.hk, dkutalek, lzachar
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-21 06:29:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Achievement Chan 2010-01-05 02:56:06 UTC
Description of problem:
imap_open in php 5.1.6 not able to connection MS Exchange 2007 imap service

Version-Release number of selected component (if applicable): 5.4


How reproducible:
using imap_open function to connect a exchange 2007 server.

Steps to Reproduce:
1. write a php script test.php
<?php
$mailServer = "{192.168.0.10:143/novalidate-cert}";
$userlogin = "testing1";
$password = "testingpassword";

$inbox = imap_open($mailServer,$userlogin,$password,OP_HALFOPEN);
var_dump($inbox);
?>

2. execute it
php test.php
  
Actual results:
PHP Warning:  imap_open(): Couldn't open stream {192.168.0.10:143/novalidate-cert} in /root/temp/test2.php on line 6
bool(false)


Expected results:
resource(4) of type (imap)

Additional info:

Comment 1 Joe Orton 2010-01-08 12:22:19 UTC
Could you get a packet trace?

Comment 2 Achievement Chan 2010-01-13 09:44:01 UTC
I configure in /etc/php.ini
error_reporting  =  E_ALL


[root@localhost software]# php test.php
resource(4) of type (imap)
PHP Notice:  Unknown: Unknown GSSAPI failure: An invalid name was supplied (errflg=1) in Unknown on line 0

Notice: Unknown: Unknown GSSAPI failure: An invalid name was supplied (errflg=1) in Unknown on line 0
PHP Notice:  Unknown: GSSAPI mechanism status: Unknown code krb5 216 (errflg=1) in Unknown on line 0

Notice: Unknown: GSSAPI mechanism status: Unknown code krb5 216 (errflg=1) in Unknown on line 0
PHP Notice:  Unknown: SECURITY PROBLEM: insecure server advertised AUTH=PLAIN (errflg=1) in Unknown on line 0

Notice: Unknown: SECURITY PROBLEM: insecure server advertised AUTH=PLAIN (errflg=1) in Unknown on line 0


Hope the result in tcpflow can help. Is the php bug tracker not mentioned the same story for this case?

[root@localhost software]# tcpflow port 143 -c
tcpflow[32336]: listening on eth0
114.038.018.105.00143-010.000.003.132.57468: * OK The Microsoft Exchange IMAP4 service is ready.

010.000.003.132.57468-114.038.018.105.00143: 00000000 CAPABILITY

114.038.018.105.00143-010.000.003.132.57468: * CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN STARTTLS IDLE NAMESPACE LITERAL+
00000000 OK CAPABILITY completed.

010.000.003.132.57468-114.038.018.105.00143: 00000001 AUTHENTICATE GSSAPI

114.038.018.105.00143-010.000.003.132.57468: +

010.000.003.132.57468-114.038.018.105.00143: *

114.038.018.105.00143-010.000.003.132.57468: 00000001 NO The AUTH protocol exchange was canceled by the client.

010.000.003.132.57468-114.038.018.105.00143: 00000002 AUTHENTICATE PLAIN

114.038.018.105.00143-010.000.003.132.57468: +

010.000.003.132.57468-114.038.018.105.00143: AHRnY2VzdGVzdDFAZXNmY2VudHJlLmVkdS5oawB0ZXN0MWVzZg==

114.038.018.105.00143-010.000.003.132.57468: 00000002 OK AUTHENTICATE completed.

010.000.003.132.57468-114.038.018.105.00143: 00000003 CAPABILITY

114.038.018.105.00143-010.000.003.132.57468: * CAPABILITY IMAP4 IMAP4rev1 AUTH=NTLM AUTH=GSSAPI AUTH=PLAIN STARTTLS IDLE NAMESPACE LITERAL+
00000003 OK CAPABILITY completed.

010.000.003.132.57468-114.038.018.105.00143: 00000004 LOGOUT

114.038.018.105.00143-010.000.003.132.57468: * BYE Microsoft Exchange Server 2007 IMAP4 server signing off.

Comment 3 Achievement Chan 2010-01-21 08:28:16 UTC
Is there any chance that this fix will be backported to 5.1.6 for RHEL5?

Comment 4 Achievement Chan 2010-02-03 01:49:41 UTC
Dear Joe,
Will you let me know that redhat will perform this backport with php?
If not, we need to use third party repository of php packages.

Comment 5 Joe Orton 2010-03-17 12:59:22 UTC
The solution which went into 5.3.2:

  http://svn.php.net/viewvc?view=revision&revision=294109

looks fine to backport.

Comment 7 RHEL Program Management 2010-08-09 18:25:25 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 12 errata-xmlrpc 2012-02-21 06:29:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0249.html