diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-10-07 07:55:18 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2009-10-07 07:55:18 +0400 |
commit | 79f25c80c34fe4d92ad584b5c37806bcdd6b2eef (patch) | |
tree | 145ef33f8d2e7c2ee409e0dfc999310605d666a8 /src | |
parent | a7ea14b733201d1c9e8e38f716d315c489d9484d (diff) | |
download | rspamd-79f25c80c34fe4d92ad584b5c37806bcdd6b2eef.tar.gz rspamd-79f25c80c34fe4d92ad584b5c37806bcdd6b2eef.zip |
* Forgotten header
Diffstat (limited to 'src')
-rw-r--r-- | src/spf.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/spf.h b/src/spf.h new file mode 100644 index 000000000..6c98f85ef --- /dev/null +++ b/src/spf.h @@ -0,0 +1,49 @@ +#ifndef RSPAMD_SPF_H +#define RSPAMD_SPF_H + +#include "config.h" + +struct worker_task; +struct spf_record; + +typedef void (*spf_cb_t)(struct spf_record *record, struct worker_task *task); + +typedef enum spf_mech_e { + SPF_FAIL, + SPF_SOFT_FAIL, + SPF_PASS, + SPF_NEUTRAL +} spf_mech_t; + +typedef enum spf_action_e { + SPF_RESOLVE_MX, + SPF_RESOLVE_A, + SPF_RESOLVE_PTR, + SPF_RESOLVE_REDIRECT, + SPF_RESOLVE_INCLUDE, + SPF_RESOLVE_EXP +} spf_action_t; + +struct spf_addr { + uint32_t addr; + uint32_t mask; + spf_mech_t mech; +}; + +struct spf_record { + char **elts; + + char **cur_elt; + spf_action_t cur_action; + + GList *addrs; + char *cur_domain; + struct worker_task *task; + spf_cb_t callback; +}; + + +gboolean resolve_spf (struct worker_task *task, spf_cb_t callback); + + +#endif |