fmbiete / Z-Push-contrib

Z-Push fork with changes that I will try to contrib
GNU Affero General Public License v3.0
135 stars 62 forks source link

iOS with IMAP backend: sometimes missing attachments #267

Open GuusHoutzager opened 8 years ago

GuusHoutzager commented 8 years ago

Hi,

I'm using z-push with the IMAP backend (Dovecot). It works fine, except for some mails I'm not seeing all attachments. In this case the html mail contains a picture as well as 3 attachments (2 Word docs and a PDF). iOS renders the html body with the image just fine, but there's no trace of the other 3 attachments. Apple Mail (which talks IMAP against Dovecot) does show them, just as my webmail software is doing (Roundcube). I see these attachment related messages in the WBXML logging: 06/04/2016 21:37:04 [ 1244] [DEBUG] [guus@example.com] [5r6aivvts10717l931318fgvt0] BackendIMAP->GetAttachmentData('24418b08:31219:3') 06/04/2016 21:37:04 [ 1244] [DEBUG] [guus@example.com] [5r6aivvts10717l931318fgvt0] FileStateMachine->GetState() on file: '/var/lib/z-push3/0/t/5r6aivvts10717l931318fgvt0-bs-1459971354' 06/04/2016 21:37:04 [ 1244] [DEBUG] [guus@example.com] [5r6aivvts10717l931318fgvt0] BackendIMAP->getImapIdFromFolderId('24418b08') = INBOX 06/04/2016 21:37:04 [ 1244] [ WARN] [guus@example.com] [5r6aivvts10717l931318fgvt0] /usr/share/nginx/html/z-push3/include/mimeDecode.php:714 Undefined offset: 3 (8) 06/04/2016 21:37:04 [ 1244] [ WARN] [guus@example.com] [5r6aivvts10717l931318fgvt0] /usr/share/nginx/html/z-push3/include/mimeDecode.php:716 Undefined offset: 1 (8) 06/04/2016 21:37:04 [ 1244] [ WARN] [guus@example.com] [5r6aivvts10717l931318fgvt0] /usr/share/nginx/html/z-push3/include/mimeDecode.php:717 Undefined offset: 2 (8) 06/04/2016 21:37:04 [ 1244] [ WARN] [guus@example.com] [5r6aivvts10717l931318fgvt0] /usr/share/nginx/html/z-push3/include/mimeDecode.php:714 Undefined offset: 3 (8) 06/04/2016 21:37:04 [ 1244] [ WARN] [guus@example.com] [5r6aivvts10717l931318fgvt0] /usr/share/nginx/html/z-push3/include/mimeDecode.php:716 Undefined offset: 1 (8) 06/04/2016 21:37:04 [ 1244] [ WARN] [guus@example.com] [5r6aivvts10717l931318fgvt0] /usr/share/nginx/html/z-push3/include/mimeDecode.php:717 Undefined offset: 2 (8) 06/04/2016 21:37:04 [ 1244] [ WARN] [guus@example.com] [5r6aivvts10717l931318fgvt0] /usr/share/nginx/html/z-push3/include/mimeDecode.php:714 Undefined offset: 3 (8) 06/04/2016 21:37:04 [ 1244] [ WARN] [guus@example.com] [5r6aivvts10717l931318fgvt0] /usr/share/nginx/html/z-push3/include/mimeDecode.php:716 Undefined offset: 1 (8) 06/04/2016 21:37:04 [ 1244] [ WARN] [guus@example.com] [5r6aivvts10717l931318fgvt0] /usr/share/nginx/html/z-push3/include/mimeDecode.php:717 Undefined offset: 2 (8) 06/04/2016 21:37:04 [ 1244] [DEBUG] [guus@example.com] [5r6aivvts10717l931318fgvt0] StringStreamWrapper::Open(): len = 58880 06/04/2016 21:37:04 [ 1244] [DEBUG] [guus@example.com] [5r6aivvts10717l931318fgvt0] StringStreamWrapper::Open(): Using tmpfile() 06/04/2016 21:37:04 [ 1244] [DEBUG] [guus@example.com] [5r6aivvts10717l931318fgvt0] BackendIMAP->GetAttachmentData contenttype application/octet-stream

I downloaded the code today, but I'm actually getting the same behaviour for this mail on both this code as well as with the latest official z-push release from z-push.org. Any idea what might be wrong? Any info you need to debug this? Thanks!

Cheers,

Guus

tedyjs commented 8 years ago

Hi, same happen to us here. From testing we know that if email attachment as .eml, ios seems can not read it correctly as base64 encoding / decoding in attachement. If the same email which attachment is missing than we forwarded again the email as inline, the attachement is there (you can see it if view the email source ) but as base 64 encoding seems broken, none email client can read it. Any idea how to fix it ?