Bug #61846 [Opn->Nab]: imap timeout not working with ssl

From: Date: Fri, 16 Oct 2020 13:24:49 +0000
Subject: Bug #61846 [Opn->Nab]: imap timeout not working with ssl
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229659@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=61846&edit=1

 ID:                 61846
 Updated by:         cmb@php.net
 Reported by:        rahul dot mishra at webyog dot com
 Summary:            imap timeout not working with ssl
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            IMAP related
 Operating System:   linux
 PHP Version:        5.4.0
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

It seems to me that ext/imap does the right thing, by calling
mail_parameters() to set the respective timeouts, and by calling
mail_open() to open the IMAP stream.  If the timeout is not heeded
for some kinds of connections, that would appear to be a bug in
libc-client, but not in PHP.


Previous Comments:
------------------------------------------------------------------------
[2015-11-05 12:07:57] info at phpgangsta dot de

Same problem here, imap_open() takes forever on SSL servers that don't send a "connection
refused", but just drop the packets in their firewall or so...

$connectionString = '{imap4.versatel.de:993/imap4rev1/novalidate-cert/ssl}INBOX';
imap_timeout(IMAP_OPENTIMEOUT, 5);
imap_timeout(IMAP_READTIMEOUT, 5);
imap_timeout(IMAP_WRITETIMEOUT, 5);
imap_timeout(IMAP_CLOSETIMEOUT, 5);
$mbox = imap_open($connectionString, 'someone', 'somepass', OP_HALFOPEN, 1);

------------------------------------------------------------------------
[2012-06-07 15:14:45] nicolas dot badia at ymail dot com

Same problem for me.

------------------------------------------------------------------------
[2012-04-25 05:18:19] rahul dot mishra at webyog dot com

Description:
------------
imap timeout not working if i have used ssl in server name. In case i have not  used ssl then after
10s it will be timeout but its not working with ssl.

Test script:
---------------
imap_timeout(IMAP_READTIMEOUT, 10);
imap_timeout(IMAP_OPENTIMEOUT, 10);
$imap_connect = imap_open("{mail.yahoo.com:993/ssl/novalidate-cert}", $user, $pwd);

Expected result:
----------------
After 10s imap_open show show timeout even server address having ssl.

Actual result:
--------------
If i have used ssl then imap_open takes hell lot of time to return a response. timeout is ignored.


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



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


Thread (4 messages)

« previous php.bugs (#229659) next »