Articles in this section

Some emails fail to open in Plesk Premium Email (Kolab) webmail with a 500 error or a blank page

Plesk Premium Email PPE

Symptoms

  • Opening certain email messages in Plesk Premium Email (Kolab) webmail fails with a server error, while the mailbox itself and most other messages open normally:

    PLESK_ERROR: 500 Internal Server Error

  • Only some messages are affected. The same emails opens without issues in a desktop mail client.
  • The following is logged in /var/log/roundcubemail/errors.log at the moment the message is opened:

    CONFIG_TEXT: PHP Fatal error: Uncaught Error: Class 'IPLib\ParseStringFlag' not found in /usr/share/roundcubemail/program/lib/Roundcube/rcube_utils.php:437

Cause

When Roundcube sanitizes the HTML body of a message, rcube_washtml passes every absolute link it finds to rcube_utils::is_local_url() to decide whether the target is local to the server. Since Roundcube 1.6.x that method relies on the mlocati/ip-lib PHP library (class IPLib\ParseStringFlag) to parse IP addresses and IP ranges.

The affected Kolab build of Roundcube does not ship the library.

As a result, any message whose HTML contains an absolute link to a remote resource raises an uncaught fatal error and PHP returns a 500 response. Messages without such links are unaffected, which is why the problem appears to affect only some emails.

Resolution

Update the Kolab Roundcube package which ships the required library.

  1. Connect to the server via SSH.
  2. Check the currently installed version and what the configured repositories offer:

    # rpm -q roundcubemail

    # yum list available roundcubemail

  3. Install the update and verify that the library is present:

    # yum update roundcubemail

    # ls -la /usr/share/roundcubemail/vendor/mlocati/ip-lib

If the updated package is not available for the server's OS, restore the missing library manually from the Roundcube installation shipped by Plesk:

Note: This is a manual change outside package management. It will be overwritten the next time the roundcubemail package is updated, at which point it is no longer needed.

  1. Connect to the server via SSH.
  2. Copy the mlocati/ip-lib library from Plesk's own Roundcube installation into the Kolab one:

    # cp -a /usr/share/psa-roundcube/vendor/mlocati /usr/share/roundcubemail/vendor/mlocati

  3. Add the following line to /etc/roundcubemail/config.inc.php so the library is loaded:

    CONFIG_TEXT: require_once('/usr/share/roundcubemail/vendor/mlocati/ip-lib/ip-lib.php');

  4. Open one of the previously failing messages in webmail to confirm it now renders, and check that no new IPLib errors appear in /var/log/roundcubemail/errors.log.
Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.