Commit 4991d0e5 authored by Jesse Norell's avatar Jesse Norell
Browse files

rspamd: fix user_settings_update loop

parent c40198b1
......@@ -200,6 +200,8 @@ class rspamd_plugin {
$is_domain = true;
}
$app->log("rspamd: user_settings_update() for $type $email_address", LOGLEVEL_DEBUG);
if($settings_name == '') {
// missing settings file name
$app->log('Empty rspamd identifier in rspamd_plugin from identifier: ' . $use_data . '/' . $identifier, LOGLEVEL_WARN);
......@@ -217,7 +219,7 @@ class rspamd_plugin {
$entries_to_update['mail_user'] = $mailusers;
}
$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);
$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);
if(is_array($forwardings) && !empty($forwardings)) {
$entries_to_update['mail_forwarding'] = $forwardings;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment