Author Topic: IMAP login works, but Roundcube shows no mails, no settings  (Read 2624 times)

Offline tech_

  • Newbie
  • *
  • Posts: 4
IMAP login works, but Roundcube shows no mails, no settings
« on: November 21, 2020, 06:34:25 AM »
Hi there. Usually I manage to work out my problems by checking my logs and googling, but this time I cannot find anything. I hope someone here can point me in the right direction. It seems like something must be going wrong quite fundamentally, but I cannot figure out what it is.

I am running Raspbian GNU/Linux 9.11 (stretch).
I am using MariaDB/mysql, apache2 and php 7.3 on the webserver side.
On the mail server side, there is dovecot and postfix.

The mail server works absolutely fine with external clients such as Thunderbird and one webmail interface I tested (nextcloud mail plugin).

I used /installer/ to set up Roundcube initially. All prerequisites were met.
I had some problems to get the IMAP login to work initially, but eventually got it to work using
[code$config['default_host'] = 'ssl://domain.tld:993';][/code]

Now I can see from the logs that the IMAP login seems to work just fine.
from roundcube imap log (debug log level):
Code: [Select]
[21-Nov-2020 10:39:22 +0100]: <8qlmp8vt> [DBC6] S: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
[21-Nov-2020 10:39:22 +0100]: <8qlmp8vt> [DBC6] C: A0001 ID ("name" "Roundcube" "version" "1.3.15" "php" "7.4.12" "os" "Linux" "command" "/roundcube/?_task=login")
[21-Nov-2020 10:39:22 +0100]: <8qlmp8vt> [DBC6] S: * ID ("name" "Dovecot")
[21-Nov-2020 10:39:22 +0100]: <8qlmp8vt> [DBC6] S: A0001 OK ID completed.
[21-Nov-2020 10:39:22 +0100]: <8qlmp8vt> [DBC6] C: A0002 AUTHENTICATE PLAIN ****** [49]
[21-Nov-2020 10:39:22 +0100]: <8qlmp8vt> [DBC6] S: A0002 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNS$
[21-Nov-2020 10:39:22 +0100]: <8qlmp8vt> [DBC6] C: A0003 NAMESPACE
[21-Nov-2020 10:39:22 +0100]: <8qlmp8vt> [DBC6] S: * NAMESPACE (("" ".")) NIL NIL
[21-Nov-2020 10:39:22 +0100]: <8qlmp8vt> [DBC6] S: A0003 OK Namespace completed (0.000 + 0.000 secs).
[21-Nov-2020 10:39:22 +0100]: <8qlmp8vt> [DBC6] C: A0004 LIST (SPECIAL-USE) "" "*" RETURN (SUBSCRIBED)
[21-Nov-2020 10:39:22 +0100]: <8qlmp8vt> [DBC6] S: * LIST (\Subscribed \Drafts) "." Drafts
[21-Nov-2020 10:39:22 +0100]: <8qlmp8vt> [DBC6] S: * LIST (\Subscribed \Junk) "." Junk
[21-Nov-2020 10:39:22 +0100]: <8qlmp8vt> [DBC6] S: * LIST (\Subscribed \Sent) "." Sent
[21-Nov-2020 10:39:22 +0100]: <8qlmp8vt> [DBC6] S: * LIST (\Subscribed \Trash) "." Trash
[21-Nov-2020 10:39:22 +0100]: <8qlmp8vt> [DBC6] S: A0004 OK List completed (0.000 + 0.000 secs).
[21-Nov-2020 10:39:22 +0100]: <kj8d6ag8> [DBC6] C: A0005 LOGOUT

and from mail.log (ssl debug log level, some ssl initiation lines removed):
Code: [Select]
Nov 21 10:39:22  dovecot: imap-login: Debug: SSL: elliptic curve secp384r1 will be used for ECDH and ECDHE key exchanges
Nov 21 10:39:22  dovecot: auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth
Nov 21 10:39:22  dovecot: auth: Debug: Module loaded: /usr/lib/dovecot/modules/auth/libdriver_mysql.so
Nov 21 10:39:22  dovecot: auth: Debug: Read auth token secret from /var/run/dovecot/auth-token-secret.dat
Nov 21 10:39:22  dovecot: auth: Debug: auth client connected (pid=12071)
Nov 21 10:39:22  dovecot: imap-login: Debug: SSL: where=0x2002, ret=1: SSL negotiation finished successfully [IPv6:address]
Nov 21 10:39:22  dovecot: auth: Debug: client in: AUTH#0111#011PLAIN#011service=imap#011secured#011session=5f5rvJq0JLkgAQvwwAMAQAAAAAAAAAFY#011lip=IPv6:address#011rip=IPv6:address#011lport=993#011rport=47396#011l$
Nov 21 10:39:22  dovecot: auth-worker(12075): Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth
Nov 21 10:39:22  dovecot: auth-worker(12075): Debug: Module loaded: /usr/lib/dovecot/modules/auth/libdriver_mysql.so
Nov 21 10:39:22  dovecot: auth-worker(12075): Debug: sql(user@domain.tld,IPv6:address,<5f5rvJq0JLkgAQvwwAMAQAAAAAAAAAFY>): query: SELECT email as user, password FROM virtual_users WHERE email='user@domain.tld';
Nov 21 10:39:22  dovecot: auth: Debug: client passdb out: OK#0111#011user=user@domain.tld
Nov 21 10:39:22  dovecot: auth: Debug: master in: REQUEST#011430309377#01112071#0111#011e593f9c2e646090905e112d9f07f4354#011session_pid=12076#011request_auth_token
Nov 21 10:39:22  dovecot: auth: Debug: master userdb out: USER#011430309377#011user@domain.tld#011uid=8#011gid=8#011home=/maildir/domain.tld/user#011auth_token=9d1013c3ebdcaba95dbe339393adc89b47fb31$
Nov 21 10:39:22  dovecot: imap-login: Login: user=<user@domain.tld>, method=PLAIN, rip=IPv6:address, lip=IPv6:address, mpid=12076, TLS, session=<5f5rvJq0JLkgAQvwwAMAQAAAAAAAAAFY>
Nov 21 10:39:22  dovecot: imap(user@domain.tld): Debug: Effective uid=8, gid=8, home=/maildir/domain.tld/user
Nov 21 10:39:22  dovecot: imap(user@domain.tld): Debug: Namespace inbox: type=private, prefix=, sep=, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:/maildir/domain.tld/user
Nov 21 10:39:22  dovecot: imap(user@domain.tld): Debug: maildir++: root=/maildir/domain.tld/user, index=, indexpvt=, control=, inbox=/maildir/domain.tld/user, alt=
Nov 21 10:39:22  dovecot: imap(user@domain.tld): Logged out in=82 out=709

The whole process takes only one second, then the connection is terminated. This is weird, but I suspect the problem is somewhere else, as not seeing any mails is only part of the problem. As I said above, I also know that the problem cannot be on the mail server side, as it works fine with other clients. The positive thing here is that the folders the user has are correctly communicated from Dovecot to Roundcube.

So this is what I see when I login to Roundcube:


As you can see, I can see the user's folders, but absolutely no mails.

And this is what I see in "settings":


For the "second tier" menu items, where the mouse pointer is in the screenshot above, nothing happens when I click them.

I do not see any errors in apache log, php log, mysql log, syslog.

Does anyone have any idea what could be the problem here? Could it be a php issue?

Thank you for your help.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,845
Re: IMAP login works, but Roundcube shows no mails, no settings
« Reply #1 on: November 23, 2020, 04:37:01 AM »
Sounds like you are missing the javascript dependencies. What method did you use to install Roundcube? If you did not use the complete package from the website then did you run bin/install-jsdeps.sh?
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline tech_

  • Newbie
  • *
  • Posts: 4
Re: IMAP login works, but Roundcube shows no mails, no settings
« Reply #2 on: November 23, 2020, 04:50:33 AM »
Hi JohnDo, thank you so much for taking time to look at my issue and respond!
Your assessment sounds very reasonable to me.
I installed Roundcube following step 6 of this guide: https://www.rosehosting.com/blog/how-to-install-roundcube-webmail-on-debian-9/
(But I installed version 1.3.15 instead of 1.3.9)
Indeed there was no step that would build js dependencies.

Trying to run bin/install-jsdeps.sh, I get the following error:

Code: [Select]
Installing jQuery...
Wrote file /var/www/roundcube/program/js/jquery.min.js
Done.

Installing jsTimezoneDetect...
Fetching https://bitbucket.org/pellepim/jstimezonedetect/raw/6c427658686c664da52c6a87cd62ec910baab276/dist/jstz.min.js
ERROR: Incorrect sha1 sum of /var/www/roundcube/temp/js_cache/jstz-1.0.6.js. Expected: 4291cd3b259d2060460c2a6ab99f428d3c0c9537, got: fca8addd68a6d2a08ea0b53677f8f90802e63f80

I am trying to work out how to fix this using my usual method of googling the error message, but if you have any ideas, please let me know how to proceed.

Thanks!

edit: actually, the main problem is already fixed now, I can see emails, settings and so on! I will still try to work out the hash check error.
« Last Edit: November 23, 2020, 04:56:27 AM by tech_ »

Offline tech_

  • Newbie
  • *
  • Posts: 4
Re: IMAP login works, but Roundcube shows no mails, no settings
« Reply #3 on: November 23, 2020, 05:22:43 AM »
So obviously, the url to download jsTimezoneDetect in jsdeps.json is outdated.

I removed the block of code installing jsTimezoneDetect from bin/install-jsdeps.sh, and the script ran fine.

Then I tried installing jsTimezoneDetect manually, but the recommended way of installing it via npm would require me to install a bunch of otherwise unwanted dependencies, so for now I think I will ignore it, until it causes a problem (unless someone has a better suggestion).

The main issue has been solved thanks to JohnDoh. The problem was caused by missing javascript dependencies, which can be fixed by running bin/install-jsdeps.sh.

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: IMAP login works, but Roundcube shows no mails, no settings
« Reply #4 on: November 23, 2020, 05:41:03 AM »
1.3 is not really supported. The jstz installation has been fixed in 1.4.9.

Offline tech_

  • Newbie
  • *
  • Posts: 4
Re: IMAP login works, but Roundcube shows no mails, no settings
« Reply #5 on: November 23, 2020, 08:59:33 AM »
@alec: I upgraded to 1.4.9 based on your comment. Everything seems to run fine.

Thank you for the input.

Do I mark this issue as solved, or do the mods do it?