Bug 1168922

Summary: mail_search_full function always returns false
Product: Red Hat Enterprise Linux 6 Reporter: jpswade
Component: libc-clientAssignee: Joe Orton <jorton>
Status: CLOSED UPSTREAM QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.6CC: jorton, jpswade
Target Milestone: rcFlags: jpswade: needinfo-
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-12 16:42:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description jpswade 2014-11-28 12:32:20 UTC
Description of problem:
Using the implementation of the libc-client library in php-imap, the mail_search_full function always returns false.

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

How reproducible:
<?php
ini_set('display_errors', 'On');
error_reporting(E_ALL);
include 'settings.php';
echo '<pre>';
echo shell_exec('cat /etc/redhat-release') . "\n";
echo 'PHP ' . phpversion() . "\n";
$inbox = 'INBOX';
$_mailbox = '{%s/imap/notls/norsh/novalidate-cert/readonly}%s';
$mailbox = sprintf($_mailbox, $host, $inbox);
$stream = imap_open($mailbox, $user, $pass, OP_SILENT);
echo "imap_mailboxmsginfo->Nmsgs\n";
var_dump(imap_mailboxmsginfo($stream)->Nmsgs);
echo "\n";
$search = 'ALL';
echo "imap_search $search\n";
var_dump(imap_search($stream, $search)); //bool(false)
if (imap_last_error()) {
    echo 'Error: ' . imap_last_error() . "\n";
}
echo "\n";
echo "imap_alerts\n";
var_dump(imap_alerts());
echo "imap_errors\n";
var_dump(imap_errors());
?>

Actual results:
CentOS release 6.6 (Final)

PHP 5.4.33
imap_mailboxmsginfo->Nmsgs
int(100)

imap_search ALL
bool(false)
Error: SECURITY PROBLEM: insecure server advertised AUTH=PLAIN

imap_alerts
bool(false)
imap_errors
array(1) {
  [0]=>
  string(55) "SECURITY PROBLEM: insecure server advertised AUTH=PLAIN"
}

Expected results:
imap_search should return an array of message numbers or UIDs.

If it failed, I would expect there to be a fatal error.

Comment 2 Joe Orton 2014-11-28 13:20:50 UTC
Please show a reproduction recipe running on RHEL rather than CentOS.

If this issue is critical or in any way time sensitive, please raise a ticket
through your regular Red Hat support channels to make certain it receives the
proper attention and prioritization to assure a timely resolution.

For information on how to contact the Red Hat production support team, please
visit: https://www.redhat.com/support/process/production/#howto

Comment 3 jpswade 2014-12-08 13:25:44 UTC
Hi Joe,

Please provide access to a RHEL sandbox system for me to reproduce the bug.

Thanks.

Comment 4 Joe Orton 2015-01-12 16:42:29 UTC
jpswade, if you just want to report a bug in the upstream software please feel free to file it directly upstream.  This bugzilla instance is for tracking issues faced by Red Hat customers.

Comment 5 jpswade 2015-01-12 17:54:58 UTC
Thanks, opened here:
http://bugs.centos.org/view.php?id=8072