[Rspamd] Fix tag handling for mailboxes

master
andryyy 2020-10-28 11:06:33 +01:00
parent 781ca3c07e
commit 9034e0f3a8
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
2 changed files with 3 additions and 2 deletions

View File

@ -167,7 +167,8 @@ catch (PDOException $e) {
exit; exit;
} }
if (count($rcpt_final_mailboxes) == 1 && $rcpt_final_mailboxes[0] != $rcpt) { // Does also return the mailbox name if question == answer (query == mailbox)
if (count($rcpt_final_mailboxes) == 1) {
error_log("ALIASEXP: direct alias " . $rcpt . " expanded to " . $rcpt_final_mailboxes[0] . PHP_EOL); error_log("ALIASEXP: direct alias " . $rcpt . " expanded to " . $rcpt_final_mailboxes[0] . PHP_EOL);
echo trim($rcpt_final_mailboxes[0]); echo trim($rcpt_final_mailboxes[0]);
} }

View File

@ -234,7 +234,7 @@ rspamd_config:register_symbol({
local function http_callback(err_message, code, body, headers) local function http_callback(err_message, code, body, headers)
if body ~= nil and body ~= "" then if body ~= nil and body ~= "" then
rspamd_logger.infox(rspamd_config, "expanding alias to \"%s\"", body) rspamd_logger.infox(rspamd_config, "expanding rcpt to \"%s\"", body)
local function tag_callback_subject(err, data) local function tag_callback_subject(err, data)
if err or type(data) ~= 'string' then if err or type(data) ~= 'string' then