diff src/context.cpp @ 419:91f2a127ec69 stable-6-0-57

spf code now handles mx,exists,ptr tags, multiple A records, %{i} macro
author Carl Byington <carl@five-ten-sg.com>
date Wed, 26 Apr 2017 09:20:35 -0700
parents d1976e04f5ba
children 22027ad2a28f
line wrap: on
line diff
--- a/src/context.cpp	Tue Apr 25 21:57:42 2017 -0700
+++ b/src/context.cpp	Wed Apr 26 09:20:35 2017 -0700
@@ -1213,6 +1213,10 @@
                         size_t c = a[0];
                         for (size_t i=1; i<=c; i++) {
                             uint32_t ipy = ntohl(a[i]);
+                            char adr[sizeof "255.255.255.255   "];                          //!!
+                            adr[0] = '\0';                                                  //!!
+                            inet_ntop(AF_INET, (const u_char *)&(a[i]), adr, sizeof(adr));  //!!
+                            log(priv->queueid, "found mx a %s", adr);                       //!!
                             if (ipy == ip) {
                                 log(priv->queueid, "match mx:%s", name);
                                 return true;