#define SPF_EXP "exp"
/** SPF limits for avoiding abuse **/
-#define SPF_MAX_NESTING 5
-#define SPF_MAX_DNS_REQUESTS 10
+#define SPF_MAX_NESTING 10
+#define SPF_MAX_DNS_REQUESTS 30
/**
* State machine for SPF record:
while (cur) {
v = cur->data;
if (radix32tree_find (v->client_ip_tree, ntohl (task->client_addr.s_addr)) != RADIX_NO_VALUE) {
+ msg_info ("found view for client ip %s", inet_ntoa (task->client_addr));
return v;
}
cur = g_list_next (cur);
v = cur->data;
/* First try to lookup in hashtable */
if (g_hash_table_lookup (v->from_hash, task->from) != NULL) {
+ msg_info ("found view for client from %s", task->from);
return v;
}
/* Then try to match re */
while (cur_re) {
re = cur_re->data;
if (g_regex_match (re->regexp, task->from, 0, NULL) == TRUE) {
+ msg_info ("found view for client from %s", task->from);
return v;
}
cur_re = g_list_next (cur_re);
rcpt_user[l] = '\0';
/* First try to lookup in hashtable */
if (g_hash_table_lookup (v->rcpt_hash, rcpt_user) != NULL) {
+ msg_info ("found view for client rcpt %s", rcpt_user);
return TRUE;
}
/* Then try to match re */
while (cur_re) {
re = cur_re->data;
if (g_regex_match (re->regexp, rcpt_user, 0, NULL) == TRUE) {
+ msg_info ("found view for client rcpt %s", rcpt_user);
return TRUE;
}
cur_re = g_list_next (cur_re);
}
/* Now check the whole recipient */
if (g_hash_table_lookup (v->rcpt_hash, cur->data) != NULL) {
+ msg_info ("found view for client rcpt %s", rcpt_user);
return TRUE;
}
/* Then try to match re */
while (cur_re) {
re = cur_re->data;
if (g_regex_match (re->regexp, cur->data, 0, NULL) == TRUE) {
+ msg_info ("found view for client rcpt %s", rcpt_user);
return TRUE;
}
cur_re = g_list_next (cur_re);