<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal>Hi,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>in my old PHP 5.6 Horde Setup, I have a client with activeSync errors: The users iphone (several devices, so it is device independent) stopps syncing emails premature and throws warnings in Horde and crashes the dovecot mail server. When accessing the emails via pure imap (webmailer or imap client), everything works as expected. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm'><p class=MsoNormal style='border:none;padding:0cm'>The Horde logs a lot of this errors („The email server reported an error“):<o:p></o:p></p></div><p class=MsoNormal>2016-12-31T22:30:48+01:00 ERR: Der E-Mail-Server hat einen IMAP-Fehler gemeldet.<o:p></o:p></p><p class=MsoNormal>2016-12-31T22:30:48+01:00 ERR: [19643] Unknown backend error skipping message: Der E-Mail-Server hat einen IMAP-Fehler gemeldet.<o:p></o:p></p><p class=MsoNormal>2016-12-31T22:30:48+01:00 ERR: [19643] Unable to fetch message: Der E-Mail-Server hat einen IMAP-Fehler gemeldet.<o:p></o:p></p><div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm'><p class=MsoNormal style='border:none;padding:0cm'>2016-12-31T22:30:48+01:00 ERR: Der E-Mail-Server hat einen IMAP-Fehler gemeldet.<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>, usually followed by<o:p></o:p></p><div style='mso-element:para-border-div;border-top:solid windowtext 1.0pt;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:none;padding:1.0pt 0cm 1.0pt 0cm'><p class=MsoNormal style='border:none;padding:0cm'>2016-12-31T22:32:22+01:00 ERR: [21693] Horde_ActiveSync_Collections::getBackendIdForFolderUid failed because folder was not found in cache.<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm'><p class=MsoNormal style='border:none;padding:0cm'>I watched simultaneous the imap server’s standard log and got lots of this messages:<o:p></o:p></p></div><p class=MsoNormal>Dec 31 22:42:54 jeeves dovecot: imap-login: Login: user=<user@domain.tld>, method=PLAIN, rip=IPv6-ADDRESS, lip=IPv6-ADDRESS, mpid=24524, TLS, TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)<o:p></o:p></p><p class=MsoNormal>Dec 31 22:42:54 jeeves dovecot: imap(user@domain.tld): Disconnected: Logged out in=6119 out=6906<o:p></o:p></p><p class=MsoNormal>Dec 31 22:42:55 jeeves dovecot: imap-login: Login: user=<user@domain.tld>, method=PLAIN, rip=IPv6-ADDRESS, lip=IPv6-ADDRESS, mpid=24526, TLS, TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)<o:p></o:p></p><p class=MsoNormal>Dec 31 22:42:55 jeeves dovecot: imap(user@domain.tld): Disconnected: Logged out in=2757 out=78187<o:p></o:p></p><p class=MsoNormal>Dec 31 22:42:55 jeeves dovecot: imap-login: Login: user=<user@domain.tld>, method=PLAIN, rip=IPv6-ADDRESS, lip=IPv6-ADDRESS, mpid=24528, TLS, TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)<o:p></o:p></p><p class=MsoNormal>Dec 31 22:42:55 jeeves dovecot: imap(user@domain.tld): Disconnected: Logged out in=6119 out=7995<o:p></o:p></p><p class=MsoNormal>Dec 31 22:42:56 jeeves dovecot: imap-login: Login: user=<user@domain.tld>, method=PLAIN, rip=IPv6-ADDRESS, lip=IPv6-ADDRESS, mpid=24530, TLS, TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)<o:p></o:p></p><p class=MsoNormal>Dec 31 22:42:56 jeeves dovecot: imap(user@domain.tld): Disconnected: Logged out in=2585 out=89960<o:p></o:p></p><p class=MsoNormal>Dec 31 22:42:56 jeeves dovecot: imap-login: Login: user=<user@domain.tld>, method=PLAIN, rip=IPv6-ADDRESS, lip=IPv6-ADDRESS, mpid=24532, TLS, TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)<o:p></o:p></p><div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm'><p class=MsoNormal style='border:none;padding:0cm'>Dec 31 22:42:56 jeeves dovecot: imap(user@domain.tld): Disconnected: Logged out in=6119 out=9188<o:p></o:p></p></div><p class=MsoNormal>Is it normal that EAS uasage triggers a high frequency of imap logins/logouts?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm'><p class=MsoNormal style='border:none;padding:0cm'>Additionally I observerd in the mailservers error log the following crash report (happens immediatly after the hi frequency logins stop):<o:p></o:p></p></div><p class=MsoNormal>Dec 31 22:46:58 jeeves dovecot: imap(user@domain.tld): Panic: file istream-qp-decoder.c: line 102 (i_stream_qp_decoder_read): assertion failed: (ret < 0)<o:p></o:p></p><p class=MsoNormal>Dec 31 22:46:58 jeeves dovecot: imap(user@domain.tld): Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(+0x6b6fe) [0x7fc2481d66fe] -> /usr/lib/dovecot/libdovecot.so.0(+0x6b7ec) [0x7fc2481d67ec] -> /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0x7fc24818d8fb] -> /usr/lib/dovecot/libdovecot.so.0(+0x58c2f) [0x7fc2481c3c2f] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_read+0x53) [0x7fc2481df7b3] -> /usr/lib/dovecot/libdovecot.so.0(+0x7a08a) [0x7fc2481e508a] -> /usr/lib/dovecot/libdovecot.so.0(+0x7a1e5) [0x7fc2481e51e5] -> /usr/lib/dovecot/libdovecot.so.0(+0x7a383) [0x7fc2481e5383] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_read+0x53) [0x7fc2481df7b3] -> /usr/lib/dovecot/libdovecot.so.0(i_stream_read_data+0x3d) [0x7fc2481e007d] -> /usr/lib/dovecot/libdovecot-storage.so.0(+0xa139e) [0x7fc2484e639e] -> /usr/lib/dovecot/libdovecot-storage.so.0(index_mail_get_binary_stream+0x76) [0x7 fc2484e6876] -> /usr/lib/dovecot/libdovecot-storage.so.0(mail_get_binary_stream+0x5e) [0x7fc2484bd42e] -> /usr/lib/dovecot/libdovecot-storage.so.0(imap_msgpart_open+0x139) [0x7fc24851e5e9] -> dovecot/imap [user@domain.tld IPv6-ADDRESS UID FETCH](+0x1c0de) [0x7fc2489a50de] -> dovecot/imap [user@domain.tld IPv6-ADDRESS UID FETCH](+0x1a85a) [0x7fc2489a385a] -> dovecot/imap [user@domain.tld IPv6-ADDRESS UID FETCH](imap_fetch_more+0x37) [0x7fc2489a4957] -> dovecot/imap [user@domain.tld IPv6-ADDRESS UID FETCH](cmd_fetch+0x340) [0x7fc248998070] -> dovecot/imap [user@domain.tld IPv6-ADDRESS UID FETCH](command_exec+0x3c) [0x7fc2489a209c] -> dovecot/imap [user@domain.tld IPv6-ADDRESS UID FETCH](+0x17fb2) [0x7fc2489a0fb2] -> dovecot/imap [user@domain.tld IPv6-ADDRESS UID FETCH](+0x18066) [0x7fc2489a1066] -> dovecot/imap [user@domain.tld IPv6-ADDRESS UID FETCH](client_handle_input+0x13d) [0x7fc2489a139d] -> dovecot/imap [user@domain.tld IPv6-ADDRESS UID FETCH](client_input+0x85) [0x7fc2489a1745] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x3f) [0x7fc2481e7d0f] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run_internal+0xf9) [0x7fc2481e8d09] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0x9) [0x7fc2481e7d79] -> /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x38) [0x7fc2481e7df8] -> /usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13) [0x7fc248192dc3]<o:p></o:p></p><div style='mso-element:para-border-div;border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm'><p class=MsoNormal style='border:none;padding:0cm'>Dec 31 22:46:58 jeeves dovecot: imap(user@domain.tld): Fatal: master: service(imap): child 24952 killed with signal 6 (core dumps disabled)<o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>What makes dovecot crash when using exchange activesync, but it works as expected when using imap directly? What does horde EAS while accing the imap backend?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>My setup is: <o:p></o:p></p><p class=MsoNormal>Debian Jessie<o:p></o:p></p><p class=MsoNormal>Dovecot 2.2.13-12<o:p></o:p></p><p class=MsoNormal>Apache 2.4.10<o:p></o:p></p><p class=MsoNormal>PHP 5.6.29<o:p></o:p></p><p class=MsoNormal>Horde current stable releases<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Has anyone a idea where to go on searching? It seems a bit strange and I’m currently out of ideas..<o:p></o:p></p><p class=MsoNormal>Ill sent this in copy to dovecot list.  <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks and happy new year!<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Torben<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>