Commit 02448be2 authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

When logging sender address forgeries, log the address being forged

Helpful for debugging issues with this forgery detection logic (if there are any).
parent 02297d1a
...@@ -3621,8 +3621,8 @@ static void smtp_thread(void* arg) ...@@ -3621,8 +3621,8 @@ static void smtp_thread(void* arg)
if(relay_user.number == 0 if(relay_user.number == 0
&& strchr(sender, '@') != NULL && strchr(sender, '@') != NULL
&& compare_addrs(sender, sender_addr) != 0) { && compare_addrs(sender, sender_addr) != 0) {
lprintf(LOG_WARNING,"%04d %s %s !FORGED mail header 'FROM' field (%lu total)" lprintf(LOG_WARNING,"%04d %s %s !FORGED mail header 'FROM' field ('%s' vs '%s', %lu total)"
,socket, client.protocol, client_id, ++stats.msgs_refused); ,socket, client.protocol, client_id, sender, sender_addr, ++stats.msgs_refused);
sockprintf(socket,client.protocol,session, "554 Mail header contains mismatched 'FROM' field"); sockprintf(socket,client.protocol,session, "554 Mail header contains mismatched 'FROM' field");
subnum=INVALID_SUB; subnum=INVALID_SUB;
continue; continue;
......
Markdown is supported
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