aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/milter.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-03-31 19:06:31 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-03-31 19:06:31 +0100
commit5a4074071d15a4eaf71bdf5947536b27a47bf0e3 (patch)
tree5e7347f31c234779662d152365b17b3f3a77834b /src/libserver/milter.c
parenta8c8550e2174a991d206dab6abd1be5562b97a55 (diff)
downloadrspamd-5a4074071d15a4eaf71bdf5947536b27a47bf0e3.tar.gz
rspamd-5a4074071d15a4eaf71bdf5947536b27a47bf0e3.zip
[Fix] Do not clean hostname on generic reset
Diffstat (limited to 'src/libserver/milter.c')
-rw-r--r--src/libserver/milter.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/libserver/milter.c b/src/libserver/milter.c
index 95355a597..7e199e1b7 100644
--- a/src/libserver/milter.c
+++ b/src/libserver/milter.c
@@ -139,11 +139,6 @@ rspamd_milter_session_reset (struct rspamd_milter_session *session,
session->helo->len = 0;
}
- if (session->hostname) {
- msg_debug_milter ("cleanup hostname");
- session->hostname->len = 0;
- }
-
if (priv->headers) {
msg_debug_milter ("cleanup headers");
g_hash_table_remove_all (priv->headers);
@@ -156,6 +151,10 @@ rspamd_milter_session_reset (struct rspamd_milter_session *session,
rspamd_inet_address_free (session->addr);
session->addr = NULL;
}
+ if (session->hostname) {
+ msg_debug_milter ("cleanup hostname");
+ session->hostname->len = 0;
+ }
}
if (how & RSPAMD_MILTER_RESET_MACRO) {