[imp] Mail server closed the connection unexpectedly

John Kramer john.kramer at neys.org
Sun Sep 28 10:40:44 UTC 2014


Hi guys,

I do have the same error since updating PHP from 5.4.32 to 5.4.33 on 
FreeBSD 10. I think, it is related to 
https://bugs.php.net/bug.php?id=41631 so it should be fixed with the 
next release. I temporary solved it by disabling tls on the imap connection.

Kind regards,
John


On 09/22/2014 02:25 PM, Jan Schneider wrote:
>
> Zitat von Gert Lynge <horde at lynge.org>:
>
>> Hi
>>
>> Normally when I login I end up in Imp directly, now I'm getting: "Mail
>> server closed the connection unexpectedly"-error.
>> I'm simply thrown back to the login page with this error shown.
>>
>> Imap is working perfectly from other devices (Outlook on my PC and
>> mail on
>> my android phone).
>>
>> Horde is version 5.2.1
>> Imp is version 6.2.2
>> Apache is version 2.4.10
>> OS is FreeBSD 9.3-RELEASE-p2
>>
>> I recently upgraded php from 5.4.32 to 5.4.33. But I don't know if that's
>> related to this error.
>>
>> I've created a backends.local.php with:
>> <?php
>> $servers['imap']['debug'] = true;
>> $servers['imap']['timeout'] = 120;
>> ?>
>>
>> ...and the log shows:
>> ---
>> ------------------------------
>>>> Sat, 20 Sep 2014 19:40:10 +0200
>>>> Connection to: imap://localhost/
>>>> Server connection took 0,0006 seconds.
>> S: * OK [CAPABILITY IMAP4REV1 I18NLEVEL=1 LITERAL+ SASL-IR
>> LOGIN-REFERRALS
>> STARTTLS] localhost IMAP4rev1 2007f.404 at Sat, 20 Sep 2014 19:40:10
>> +0200
>> (CEST)
>> C: 1 STARTTLS
>> S: 1 OK STARTTLS completed
>>>> Command 1 took 0,0013 seconds.
>>>> Successfully completed TLS negotiation.
>> C: 2 [INITIAL CLIENT RESPONSE (username: lynge)]
>> S: +
>> C: xxxxxxxxxxxxxxxxxxxxxxxxx
>> S: 2 OK [CAPABILITY IMAP4REV1 I18NLEVEL=1 LITERAL+ IDLE UIDPLUS NAMESPACE
>> CHILDREN MAILBOX-REFERRALS BINARY UNSELECT ESEARCH WITHIN SCAN SORT
>> THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND] User lynge
>> authenticated
>>>> Command 2 took 0,0107 seconds.
>>>> CACHE: Using the Horde_Imap_Client_Cache_Backend_Cache storage driver.
>> C: 3 LSUB "" INBOX
>> C: 4 LSUB "" *
>> C: 5 LSUB "" #mhinbox*
>> C: 6 LSUB "" #mh/*
>> C: 7 LSUB "" ~*
>> C: 8 LSUB "" #shared/*
>> C: 9 LSUB "" #ftp/*
>> C: 10 LSUB "" #news.*
>> C: 11 LSUB "" #public/*
>> S: * LSUB (\NoInferiors) NIL INBOX
>> S: 3 OK LSUB completed
>>>> Command 3 took 0,0023 seconds.
>> S: * LSUB () "/" sent-mail
>> S: * LSUB () "/" Kladder
>> S: * LSUB () "/" Trashcan
>> S: * LSUB () "/" Sent
>> S: * LSUB () "/" Sendt
>> S: * LSUB () "/" Spam
>> S: * LSUB () "/" Templates
>> S: * LSUB () "/" Trash
>> S: * LSUB (\NoInferiors) NIL INBOX
>> S: * LSUB () "/" "Sent Items"
>> S: * LSUB () "/" "Deleted Items"
>> S: * LSUB () "/" Drafts
>> S: * LSUB () "/" "Junk E-mail"
>> S: * LSUB () "/" "U&APg-nsket e-mail"
>> S: * LSUB () "/" Papirkurv
>> S: * LSUB () "/" "Slettet post"
>> S: * LSUB () "/" Arkiv
>> S: * LSUB () "/" "Sent Messages"
>> S: * LSUB () "/" "Deleted Messages"
>> S: 4 OK LSUB completed
>>>> Command 4 took 0,0066 seconds.
>> S: 5 OK LSUB completed
>>>> Command 5 took 0,0066 seconds.
>> S: 6 OK /home/lynge/mail/.mh_profile not found, mh format names disabled
>>>> Command 6 took 0,1012 seconds.
>> S: 7 OK LSUB completed
>>>> Command 7 took 0,1015 seconds.
>> S: 8 OK LSUB completed
>>>> Command 8 took 0,1017 seconds.
>> S: 9 OK LSUB completed
>>>> Command 9 took 0,1019 seconds.
>> S: 10 OK LSUB completed
>>>> Command 10 took 0,1021 seconds.
>>>> Slow Command: 120,003 seconds
>>>> ERROR: read/timeout error.
>>>> ERROR: Server closed the connection.
>> ---
>>
>> At first the timeout was after 30 sec. That is why I tried to increase
>> it.
>>
>> Any ideas?
>>
>> Thank You in advantage for any help
>
> Since command 10 succeeded, it's probably command 11 that causes this:
> C: 11 LSUB "" #public/*
> Sounds like your mail server is too slow. And it looks like you are
> using a 7 years old UW-IMAP version, so don't hold your breathe to get
> any more support for this setup than this response.
>



More information about the imp mailing list