From b82771f99c0e8ef236db4e9e10ca1eb665c5daba Mon Sep 17 00:00:00 2001 From: Mikhail Galanin Date: Fri, 10 Aug 2018 09:05:41 +0100 Subject: [Minor] Fixed parsing of faked mx-record: priority goes first and then the value --- src/libserver/dns.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libserver/dns.c b/src/libserver/dns.c index d75ad00e8..81b01c49b 100644 --- a/src/libserver/dns.c +++ b/src/libserver/dns.c @@ -385,8 +385,8 @@ rspamd_dns_resolver_config_ucl (struct rspamd_config *cfg, svec = g_strsplit_set (str_rep, " :", -1); if (svec && svec[0] && svec[1]) { - rep->content.mx.name = strdup (svec[0]); - rep->content.mx.priority = strtoul (svec[1], NULL, 10); + rep->content.mx.priority = strtoul (svec[0], NULL, 10); + rep->content.mx.name = strdup (svec[1]); DL_APPEND (replies, rep); } else { -- cgit v1.2.3