Infinity run of server.php consumes all system memory when using rspamd
Summary
With rspamd enabled and creating a catchall entry the server.php on the mailserver consumes all memory and runs forever. The problem seems to be in function user_settings_update
in file rspamd_plugin.inc.php
.
I don't understand the correct behavior exectly but this select in line 220:
$forwardings = $app->db->queryAllRecords("SELECT mf.* FROM mail_forwarding as mf LEFT JOIN spamfilter_users as su ON (su.email = mf.source) WHERE mf.source LIKE ? AND su.id IS NULL", '%' . $email_address);
returns entries which are handled in line 353:
$this->user_settings_update('mail_forwarding_' . $mode, ['old' => $entry, 'new' => $entry], true);
This creates a never ending recursion.
Steps to reproduce
- Create a Mail Domain: example.com, set spamfilter to "- not enabled -"
- Create a Mailbox: info@example.com, set spamfilter to "Normal"
- Create a Catchall: @example.com --> info@example.com, select greylist
- Wait for server.php to run and look at the debug output or htop...
Environment
ISPConfig version: (3.2.3)