I used this script but it does not add sieve plugin to config of roundcube. Also I get 500 error. @sahsanu
etc/roundcube/config.inc.php
// List of active plugins (in plugins/ directory)
$config[‘plugins’] = array(‘password’, ‘newmail_notifier’, ‘zipdownload’, ‘archive’);
nginx webmail domain log
XXX.432.33X.X3 - - [27/Jun/2026:14:38:16 +0300] “GET / HTTP/2.0” 500 0 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36”
XXX.432.33X.X3 - - [27/Jun/2026:14:40:12 +0300] “GET / HTTP/2.0” 500 0 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36”
XXX.432.33X.X3 - - [27/Jun/2026:14:40:16 +0300] “GET / HTTP/2.0” 500 0 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36”
nginx webmail domain error log
2026/06/27 14:38:10 [error] 1051#1051: *270 FastCGI sent in stderr: “PHP message: PHP Warning: Undefined array key “log_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “log_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “temp_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “temp_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “drafts_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “junk_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “sent_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “trash_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “log_driver” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 247; PHP message: PHP Warning: file_put_contents(/var/lib/errors.log): Failed to open stream: Permission denied in /var/lib/roundcube/program/lib/Roundcube/rcube.php on line 1381; PHP message: PHP Warning: Configuration error. Unsupported database driver: in /var/lib/roundcube/program/lib/Roundcube/rcube.php on line 1504” while reading response header from upstream, client: 188.132.133.63, server: webmail.domain.com, request: “GET / HTTP/2.0”, upstream: “fastcgi://unix:/run/php/www.sock:”, host: “webmail.domain.com”
2026/06/27 14:38:11 [error] 1051#1051: *270 FastCGI sent in stderr: “PHP message: PHP Warning: Undefined array key “log_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “log_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “temp_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “temp_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “drafts_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “junk_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “sent_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “trash_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “log_driver” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 247; PHP message: PHP Warning: file_put_contents(/var/lib/errors.log): Failed to open stream: Permission denied in /var/lib/roundcube/program/lib/Roundcube/rcube.php on line 1381; PHP message: PHP Warning: Configuration error. Unsupported database driver: in /var/lib/roundcube/program/lib/Roundcube/rcube.php on line 1504” while reading response header from upstream, client: 188.132.133.63, server: webmail.domain.com, request: “GET / HTTP/2.0”, upstream: “fastcgi://unix:/run/php/www.sock:”, host: “webmail.domain.com”
2026/06/27 14:38:16 [error] 1051#1051: *270 FastCGI sent in stderr: “PHP message: PHP Warning: Undefined array key “log_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “log_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “temp_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “temp_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “drafts_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “junk_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “sent_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “trash_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “log_driver” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 247; PHP message: PHP Warning: file_put_contents(/var/lib/errors.log): Failed to open stream: Permission denied in /var/lib/roundcube/program/lib/Roundcube/rcube.php on line 1381; PHP message: PHP Warning: Configuration error. Unsupported database driver: in /var/lib/roundcube/program/lib/Roundcube/rcube.php on line 1504” while reading response header from upstream, client: 188.132.133.63, server: webmail.domain.com, request: “GET / HTTP/2.0”, upstream: “fastcgi://unix:/run/php/www.sock:”, host: “mail.domain.com”
2026/06/27 14:40:12 [error] 17874#17874: *25 FastCGI sent in stderr: “PHP message: PHP Warning: Undefined array key “log_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “log_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “temp_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “temp_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “drafts_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “junk_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “sent_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “trash_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “log_driver” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 247; PHP message: PHP Warning: file_put_contents(/var/lib/errors.log): Failed to open stream: Permission denied in /var/lib/roundcube/program/lib/Roundcube/rcube.php on line 1381; PHP message: PHP Warning: Configuration error. Unsupported database driver: in /var/lib/roundcube/program/lib/Roundcube/rcube.php on line 1504” while reading response header from upstream, client: 188.132.133.63, server: webmail.domain.com, request: “GET / HTTP/2.0”, upstream: “fastcgi://unix:/run/php/www.sock:”, host: “mail.domain.com”
2026/06/27 14:40:16 [error] 17874#17874: *25 FastCGI sent in stderr: “PHP message: PHP Warning: Undefined array key “log_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “log_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “temp_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “temp_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “drafts_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “junk_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “sent_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “trash_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “log_driver” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 247; PHP message: PHP Warning: file_put_contents(/var/lib/errors.log): Failed to open stream: Permission denied in /var/lib/roundcube/program/lib/Roundcube/rcube.php on line 1381; PHP message: PHP Warning: Configuration error. Unsupported database driver: in /var/lib/roundcube/program/lib/Roundcube/rcube.php on line 1504” while reading response header from upstream, client: 188.132.133.63, server: webmail.domain.com, request: “GET / HTTP/2.0”, upstream: “fastcgi://unix:/run/php/www.sock:”, host: “webmail.domain.com”
2026/06/27 14:50:09 [error] 17874#17874: *680 FastCGI sent in stderr: “PHP message: PHP Warning: Undefined array key “log_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “log_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “temp_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “temp_dir” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 233; PHP message: PHP Warning: Undefined array key “drafts_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “junk_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “sent_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “trash_mbox” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 243; PHP message: PHP Warning: Undefined array key “log_driver” in /var/lib/roundcube/program/lib/Roundcube/rcube_config.php on line 247; PHP message: PHP Warning: file_put_contents(/var/lib/errors.log): Failed to open stream: Permission denied in /var/lib/roundcube/program/lib/Roundcube/rcube.php on line 1381; PHP message: PHP Warning: Configuration error. Unsupported database driver: in /var/lib/roundcube/program/lib/Roundcube/rcube.php on line 1504” while reading response header from upstream, client: 34.90.96.148, server: webmail.domain.com, request: “GET / HTTP/1.1”, upstream: “fastcgi://unix:/run/php/www.sock:”, host: “mail.domain.com”
I ran an AI analysis on the native script (/usr/local/hestia/install/upgrade/manual/install_sieve.sh) to find out why it triggers a 500 Internal Server Error on webmail, and discovered two main issues:
-
The sed Command Breaks PHP Syntax: The script looks for "archive" in double quotes to append the managesieve plugin. However, if your Roundcube config uses single quotes ('archive'), the regex match fails or corrupts the array syntax, completely breaking the configuration file.
-
Incorrect File Permissions: The script executes chmod 751 -R /etc/roundcube, which prevents www-data (the web server / PHP-FPM user) from reading the necessary configuration and database connection files.