target->temp_failed = TRUE;
continue;
}
+ if (cur->flags & RSPAMD_SPF_FLAG_PERMFAIL) {
+ target->perm_failed = TRUE;
+ continue;
+ }
if (cur->flags & RSPAMD_SPF_FLAG_NA) {
target->na = TRUE;
continue;
task->message_id,
cb->rec->sender_domain,
cb->resolved->cur_domain);
- cb->addr->flags &= ~RSPAMD_SPF_FLAG_PARSED;
+ cb->addr->flags |= RSPAMD_SPF_FLAG_PERMFAIL;
break;
case SPF_RESOLVE_INCLUDE:
msg_debug_spf (
#define RSPAMD_SPF_FLAG_REDIRECT (1 << 7)
#define RSPAMD_SPF_FLAG_TEMPFAIL (1 << 8)
#define RSPAMD_SPF_FLAG_NA (1 << 9)
+#define RSPAMD_SPF_FLAG_PERMFAIL (1 << 10)
struct spf_addr {
guchar addr6[sizeof (struct in6_addr)];
guint ttl;
gboolean temp_failed;
gboolean na;
+ gboolean perm_failed;
GArray *elts; /* Flat list of struct spf_addr */
ref_entry_t ref; /* Refcounting */
};
1,
NULL);
}
+ else if (record && record->perm_failed) {
+ rspamd_task_insert_result (task,
+ spf_module_ctx->symbol_permfail,
+ 1,
+ NULL);
+ }
else if (record && record->elts->len == 0) {
rspamd_task_insert_result (task,
spf_module_ctx->symbol_permfail,
... -i 8.8.8.8 -F x@zzzzaaaa
Check Rspamc ${result} R_SPF_NA
-SPF DNSFAIL UNRESOLVEABLE REDIRECT
+SPF PERMFAIL UNRESOLVEABLE REDIRECT
${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml
... -i 8.8.8.8 -F x@cacophony.za.org
- Check Rspamc ${result} R_SPF_DNSFAIL
+ Check Rspamc ${result} R_SPF_PERMFAIL
SPF PERMFAIL
${result} = Scan Message With Rspamc ${TESTDIR}/messages/dmarc/bad_dkim1.eml