aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-09-24 18:18:55 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-09-24 18:18:55 +0100
commita2c77f08ab99e184fc8463ae7243b78b25569f3b (patch)
tree79993832360646a0b74486a3ba5f3806ea8edaa7
parent1b45af7caff3eeee8ba6df87fd08ea79db7cc31e (diff)
downloadrspamd-a2c77f08ab99e184fc8463ae7243b78b25569f3b.tar.gz
rspamd-a2c77f08ab99e184fc8463ae7243b78b25569f3b.zip
Remove noise about TXT records that are not SPF records.
-rw-r--r--src/spf.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/spf.c b/src/spf.c
index 4455fb55e..755156d4e 100644
--- a/src/spf.c
+++ b/src/spf.c
@@ -364,7 +364,7 @@ parse_spf_hostmask (struct worker_task *task, const gchar *begin, struct spf_add
if (p != NULL) {
/* Extract mask */
rspamd_strlcpy (mask_buf, p + 1, sizeof (mask_buf));
- addr->data.normal.mask = mask_buf[0] * 10 + mask_buf[1];
+ addr->data.normal.mask = strtoul (mask_buf, NULL, 10);
if (addr->data.normal.mask > 32) {
msg_info ("<%s>: spf error for domain %s: too long mask",
rec->task->message_id, rec->sender_domain);
@@ -410,7 +410,8 @@ spf_record_dns_callback (struct rspamd_dns_reply *reply, gpointer arg)
case SPF_RESOLVE_MX:
if (reply->type == DNS_REQUEST_MX) {
/* Now resolve A record for this MX */
- if (make_dns_request (task->resolver, task->s, task->task_pool, spf_record_dns_callback, (void *)cb, DNS_REQUEST_A, elt_data->mx.name)) {
+ if (make_dns_request (task->resolver, task->s, task->task_pool,
+ spf_record_dns_callback, (void *)cb, DNS_REQUEST_A, elt_data->mx.name)) {
task->dns_requests ++;
cb->rec->requests_inflight ++;
}
@@ -1335,7 +1336,7 @@ start_spf_parse (struct spf_record *rec, gchar *begin)
}
}
else {
- msg_info ("<%s>: spf error for domain %s: bad spf record version: %*s",
+ msg_debug ("<%s>: spf error for domain %s: bad spf record version: %*s",
rec->task->message_id, rec->sender_domain, sizeof (SPF_VER1_STR) - 1, begin);
}
}