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.logat 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.
- Connect to the server via SSH.
-
Check the currently installed version and what the configured repositories offer:
# rpm -q roundcubemail
# yum list available roundcubemail
-
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.
- Connect to the server via SSH.
-
Copy the
mlocati/ip-liblibrary from Plesk's own Roundcube installation into the Kolab one:# cp -a /usr/share/psa-roundcube/vendor/mlocati /usr/share/roundcubemail/vendor/mlocati
-
Add the following line to
/etc/roundcubemail/config.inc.phpso the library is loaded:CONFIG_TEXT: require_once('/usr/share/roundcubemail/vendor/mlocati/ip-lib/ip-lib.php');
- Open one of the previously failing messages in webmail to confirm it now renders, and check that no new
IPLiberrors appear in/var/log/roundcubemail/errors.log.
Comments
Please sign in to leave a comment.