Skip to content
Snippets Groups Projects
Commit c7d313a3 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
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 73757c0f
No related branches found
No related tags found
No related merge requests found
......@@ -3621,8 +3621,8 @@ static void smtp_thread(void* arg)
if(relay_user.number == 0
&& strchr(sender, '@') != NULL
&& compare_addrs(sender, sender_addr) != 0) {
lprintf(LOG_WARNING,"%04d %s %s !FORGED mail header 'FROM' field (%lu total)"
,socket, client.protocol, client_id, ++stats.msgs_refused);
lprintf(LOG_WARNING,"%04d %s %s !FORGED mail header 'FROM' field ('%s' vs '%s', %lu total)"
,socket, client.protocol, client_id, sender, sender_addr, ++stats.msgs_refused);
sockprintf(socket,client.protocol,session, "554 Mail header contains mismatched 'FROM' field");
subnum=INVALID_SUB;
continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment