How can I filter and move mails on roundcube on hestiacp?

Hi, I have server use hestiacp server tht is used roundcube and exim4. I cant move filtered emails to spesific folder as automatically. How can I solve this problem? AI says ı should install dovecot sieve extension. But this seems complex. How can I use roundcube plugins easilly?

my current plugins that is default installed with hestiacp?

$config[‘plugins’] = array(‘password’, ‘newmail_notifier’, ‘zipdownload’, ‘archive’);

Hi,

You should install sieve.

Make a backup of /etc/exim4/, /etc/dovecot/ and /etc/roundcube/, once done, execute this script as root to install sieve.

/usr/local/hestia/install/upgrade/manual/install_sieve.sh

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:

  1. 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.

  2. 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.

Execute this as root:

chown -R hestiamail:www-data /etc/roundcube/

And show me the output of this command:

grep plugins /etc/roundcube/config.inc.php

Execute this too:

mkdir -p /var/log/roundcube/
chown -R hestiamail:www-data /var/log/roundcube/

grep plugins /etc/roundcube/config.inc.php
// List of active plugins (in plugins/ directory)
$config[‘plugins’] = array(‘password’, ‘newmail_notifier’, ‘zipdownload’, ‘archive’);

sccript does not add plugin to config and I have added manually and then restart php-fpm service. I solved my 500 error problem with this schown command, thank you.

chown -R hestiamail:www-data /etc/roundcube/

Also I used bottom command, probably logs did not come to this folder because of folder permission problem

chown -R hestiamail:www-data /var/log/roundcube/

Add it with this command:

sed -i "s/'archive'/'archive', 'managesieve'/" /etc/roundcube/config.inc.php