Skip to content

Commit 0a18e94

Browse files
author
Marius Burkard
committed
- better log messages on rspamd plugin
- ignore @/*@ targets for spamfilter_user in rspamd plugin
1 parent 70dbc16 commit 0a18e94

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

server/plugins-available/rspamd_plugin.inc.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ function user_settings_update($event_name, $data) {
131131
$is_domain = false;
132132
$email_address = $data[$use_data][$identifier];
133133
$settings_name = $email_address;
134-
if(!$email_address) {
134+
if($email_address === '*@' || $email_address === '@') {
135+
// we will ignore those global targets
136+
$app->log('Ignoring @ spamfilter_user as rspamd does not support it this way.', LOGLEVEL_DEBUG);
137+
return;
138+
} elseif(!$email_address) {
135139
// problem reading identifier
136140
$app->log('Empty email address in rspamd_plugin from identifier: ' . $use_data . '/' . $identifier, LOGLEVEL_WARN);
137141
return;
@@ -145,7 +149,7 @@ function user_settings_update($event_name, $data) {
145149

146150
if($settings_name == '') {
147151
// missing settings file name
148-
$app->log('Empty email address in rspamd_plugin from identifier: ' . $use_data . '/' . $identifier, LOGLEVEL_WARN);
152+
$app->log('Empty rspamd identifier in rspamd_plugin from identifier: ' . $use_data . '/' . $identifier, LOGLEVEL_WARN);
149153
return;
150154
}
151155

0 commit comments

Comments
 (0)