int ptr = 0;
int sep = 0;
int defer_mode = PASS;
-int type = T_TXT;
+int type;
int failrc = FAIL;
uschar *outsep = US"\n";
uschar *outsep2 = NULL;
while (isspace(*keystring)) keystring++;
}
-/* SPF strings should be concatenated without a separator, thus make
-it the default if not defined (see RFC 4408 section 3.1.3).
-Multiple SPF records are forbidden (section 3.1.2) but are currently
-not handled specially, thus they are concatenated with \n by default. */
-
-if (type == T_SPF && outsep2 == NULL)
- outsep2 = US"";
-
/* Check for a defer behaviour keyword. */
if (strncmpic(keystring, US"defer_", 6) == 0)
while (isspace(*keystring)) keystring++;
}
-/* If the keystring contains an = this must be preceded by a valid type name. */
+/* Figure out the "type" value if it is not T_TXT.
+If the keystring contains an = this must be preceded by a valid type name. */
+type = T_TXT;
if ((equals = Ustrchr(keystring, '=')) != NULL)
{
int i, len;
string_is_ip_address(keystring, NULL) != 0)
sep = -1;
+/* SPF strings should be concatenated without a separator, thus make
+it the default if not defined (see RFC 4408 section 3.1.3).
+Multiple SPF records are forbidden (section 3.1.2) but are currently
+not handled specially, thus they are concatenated with \n by default. */
+
+if (type == T_SPF && outsep2 == NULL)
+ outsep2 = US"";
+
/* Now scan the list and do a lookup for each item */
while ((domain = string_nextinlist(&keystring, &sep, buffer, sizeof(buffer)))