php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32105 imap_sort hangs up on retrieving msg numbers
Submitted: 2005-02-25 12:12 UTC Modified: 2005-02-28 06:18 UTC
From: bosco at musehub dot com Assigned:
Status: Closed Package: IMAP related
PHP Version: 4.3.10 OS: Linux RH9
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bosco at musehub dot com
New email:
PHP Version: OS:

 

 [2005-02-25 12:12 UTC] bosco at musehub dot com
Description:
------------
imap_sort hangs up when retrieving a particular email message. Not sure what is in the mail header or content that causes the hang.

PLEASE NOTE: the same imap_sort function call causes no problems at all for other e-mail (so far). It is only when I receive such an email when the php hangs up.


<mail_source>

Return-Path: <>
Received: from mail01.opesware.com ([unix socket])
	 by mail.opesware.com (Cyrus v2.2.12-1) with LMTPA;
	 Fri, 25 Feb 2005 18:33:48 +0800
X-Sieve: CMU Sieve 2.2
MIME-Version: 1.0
Subject: Considered UNSOLICITED BULK EMAIL from you
In-Reply-To: <000a01c51b25$ef4036b0$c701a8c0@BOSCOWKSTATION>
Message-Id: <SS27663-07@mx1.opesware-gateway.com>
Content-Type: multipart/report; report-type=delivery-status;
    boundary="----------=_1109327810-27663-7"
From: amavisd-new <postmaster@mx1.opesware-gateway.com>
To: <bosco.lau@twopir.com>
Date: Fri, 25 Feb 2005 18:36:50 +0800 (HKT)

This is a multi-part message in MIME format...

------------=_1109327810-27663-7
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Your message to:
-> bosco@musehub.com

was considered unsolicited bulk e-mail (UBE).
Subject: Emailing: www.yahoo.com
Return-Path: <bosco.lau@twopir.com>

Delivery of the email was stopped!

------------=_1109327810-27663-7
Content-Type: message/delivery-status
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Content-Description: Delivery error report

Reporting-MTA: dns; mx1.opesware-gateway.com
Received-From-MTA: smtp; mx1.opesware-gateway.com ([127.0.0.1])
Arrival-Date: Fri, 25 Feb 2005 18:36:43 +0800 (HKT)

Final-Recipient: rfc822; bosco@musehub.com
Action: failed
Status: 5.7.1
Diagnostic-Code: smtp; 550 5.7.1 Message content rejected, UBE, id=27663-07
Last-Attempt-Date: Fri, 25 Feb 2005 18:36:50 +0800 (HKT)

------------=_1109327810-27663-7
Content-Type: text/rfc822-headers
Content-Disposition: inline
Content-Transfer-Encoding: 7bit
Content-Description: Undelivered-message headers

Received: from BOSCOWKSTATION (unknown [210.184.55.205])
	by mx1.opesware-gateway.com (Postfix) with ESMTP id 89713572D3
	for <bosco@musehub.com>; Fri, 25 Feb 2005 18:36:42 +0800 (HKT)
Message-ID: <000a01c51b25$ef4036b0$c701a8c0@BOSCOWKSTATION>
From: "Bosco Lau" <bosco.lau@twopir.com>
To: "Bosco Lau" <bosco@musehub.com>
Subject: Emailing: www.yahoo.com
Date: Fri, 25 Feb 2005 18:36:02 +0800
MIME-Version: 1.0
Content-Type: multipart/related;
	type="multipart/alternative";
	boundary="----=_NextPart_000_0007_01C51B68.DBCE8260"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180

------------=_1109327810-27663-7--

</mail_source>

Reproduce code:
---------------
Basically making a standard and simple call of imap_sort

$sorted_array = imap_sort($mbox_stream,SORTDATE,1,SE_NOPREFETCH,"","UTF-8");

Expected result:
----------------
returning $sorted_array = array(0); <-- 0 being the msg id of the particular email

Actual result:
--------------
nothing happens .... waiting for eternity ...

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-02-25 14:21 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

If that does not work either check the c-client version you're using.

 [2005-02-28 06:18 UTC] bosco at musehub dot com
problems arisen not from imap_sort, but with parsing imap structure with imap_fetchstructure. imap_sort is OK
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 15:01:29 2024 UTC