Messages Are Not Displayed in Roundcube Inbox

How the Issue Manifests

After logging into Roundcube, the inbox does not display any messages.

Common Cause of the Issue

The internal memory settings for Dovecot are being reached when accessing the mailbox.

Troubleshooting

Check the Dovecot Log for Memory Errors

  1. Log in to the server at the CLI as root, either via SSH or from the terminal

  2. With a text editor, open /var/log/dovecot/dovecot.log. The following example uses the Vim text editor:

    vim /var/log/dovecot/dovecot.log
    
  3. Search the log for output similar to the following–this indicates that the internal memory settings for Dovecot are being reached:

    Sep 25 21:55:59 imap(info@example.com)<3642565><mV5ph6A/YWt/AAAB>: Fatal: master: service(imap): child 3642565
    returned error 83 (Out of memory (service imap { vsz_limit=256 MB }, you may need to increase it) -
    set CORE_OUTOFMEM=1 environment to get core dump)
    

How to Resolve

  1. Log in to the server at the CLI as root, either via SSH or from the terminal

  2. At the CLI, navigate to /etc/dovecot/conf.d

  3. Using a text editor, create a new conf file named 99-vsz_limit.conf. The following example uses the Vim text editor:

    vim 99-vsz_limit.conf
    
  4. Add the following to the file, replacing {256M} (which is the default setting) with the desired limit:

    Note

    The most common practice when raising a setting like this is to double it. So, for example, as the default is 256M, the next setting to try would be 512M. This may require some trial and error to identify the correct setting. If the error still occurs after raising to 512M and restarting or reloading Dovecot, trying again with 1024 may be needed, etc.

    default_vsz_limit = {256M}
    
    service imap {
    vsz_limit = {256M}
    }
    
    service imap login{
    vsz_limit = {256M}
    }
    
  5. Save the file, and exit the text editor

  6. Restart or reload Dovecot

    systemctl restart dovecot
    

    or

    systemctl reload dovecot
    

Things to Think About

A very common cause of this issue is that the inbox for the account is very large and/or has hundreds of thousands of messages. If this is the case, having the user clean up their inbox is a good way to prevent the issue from reoccurring in the future.

To Check the Size of the inbox

  1. Log in to the server at the CLI as root, either via SSH or from the terminal

  2. At the CLI, check the number of messages in /home/{user}/var/{domain.com}/mail/{email user}/Maildir/cur, replacing {user}, {domain.com}, and {email user} with the corresponding information

    • The cur directory is where ‘read’ messages in the inbox are stored

    • Adding | wc -l to the end of the ls -la command is recommended. This will show the total number of files, without listing all of the individual files. Example:

      [root@server ~]# ls -la /home/examplec/var/example.com/mail/info/Maildir/cur/ | wc -l
      1314528
      [root@server ~]#