Roundcubemail: RC shows raw base64 message body with Yandex IMAP server

Created on 28 Apr 2018  路  5Comments  路  Source: roundcube/roundcubemail

Any RC from 1.1.1 to 1.3.6.
PHP 5.6.x on Debian 8-9

  • There are two identical .EML files: the first one on my own dovecot (i've tested it with imappro.zoho.com too) and second one on the popular free imap.yandex.com hosting.
  • The first EML file shows perfectly (tested with Zoho and four different Dovecot servers)
  • The second EML file (on imap.yandex.com) shows as raw base64 message
  • The attachments also downloads as raw-base64 source
  • Roundcube was the same in both cases.

Connection params:

$config['default_host'] = 'ssl://imap.yandex.com';
$config['default_port'] = 993;
$config['imap_auth_type'] = 'LOGIN';
$config['imap_delimiter'] = '/';

P.S.: Just for fun, in the file
program/lib/Roundcube/rcube_message.php
dirty replacing the
return $body;
with the
return base64_decode($body);
temporally solves the problem

Don't you have any ideas?
I'm really confused.

need feedback

Most helpful comment

So, there are some differences. One is BODYSTRUCTURE response. Another one is that on faulty server the BINARY extension is used.

C: A0006 UID FETCH 630 (BINARY.PEEK[1])
S: * 111 FETCH (UID 630 BINARY[1] {42}
S: UlU6INCf0YDQvtCy0LXRgNC60LANCkVOOiBUZXN0
S: )

Do you see this text as the message body? I guess th problem is here. You can try to workaround this issue with $config['imap_disabled_caps'] = array('BINARY');

All 5 comments

Enable imap_debug in Roundcube for the moment you open the message. This will create imap file in logs folder. Maybe that will give you some clues. If not attach the file here.

Ok, done.

So, there're two logs of IMAP opening of the same message:

Yandex.ru IMAP log (raw base64 shown):
https://pastebin.com/raw/hcYcHfxd

Mail.ru IMAP log (everything is ok):
https://pastebin.com/raw/d7c2C319

So, there are some differences. One is BODYSTRUCTURE response. Another one is that on faulty server the BINARY extension is used.

C: A0006 UID FETCH 630 (BINARY.PEEK[1])
S: * 111 FETCH (UID 630 BINARY[1] {42}
S: UlU6INCf0YDQvtCy0LXRgNC60LANCkVOOiBUZXN0
S: )

Do you see this text as the message body? I guess th problem is here. You can try to workaround this issue with $config['imap_disabled_caps'] = array('BINARY');

Wow, you're genius! Hats off to you, sir.

The string
$config['imap_disabled_caps'] = array('BINARY');
Solved the problem.

Thanks a lot for your time!

Wow, you're genius! Hats off to you, sir.

The string
$config['imap_disabled_caps'] = array('BINARY');
Solved the problem.

Thanks a lot for your time!

maybe this should be added to the FAQ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Rotzbua picture Rotzbua  路  5Comments

Takika picture Takika  路  3Comments

julianwap picture julianwap  路  3Comments

Takika picture Takika  路  7Comments

marclaporte picture marclaporte  路  6Comments