aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libserver/protocol.c')
-rw-r--r--src/libserver/protocol.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c
index e702bfc14..1b38c2b2c 100644
--- a/src/libserver/protocol.c
+++ b/src/libserver/protocol.c
@@ -428,6 +428,11 @@ rspamd_protocol_handle_headers (struct rspamd_task *task,
return FALSE;
}
+ if (task->hostname == NULL || task->hostname[0] == '\0') {
+ /* We assume that hostname is either "unknown" or existing */
+ task->hostname = rspamd_mempool_strdup (task->task_pool, "unknown");
+ }
+
return TRUE;
}