1 /*************************************************
2 * Exim - an Internet mail transport agent *
3 *************************************************/
5 /* Experimental DMARC support.
6 Copyright (c) Todd Lyons <tlyons@exim.org> 2012 - 2014
9 /* Portions Copyright (c) 2012, 2013, The Trusted Domain Project;
10 All rights reserved, licensed for use per LICENSE.opendmarc. */
12 #ifdef EXPERIMENTAL_DMARC
14 # include "opendmarc/dmarc.h"
16 # include "spf2/spf.h"
17 # endif /* SUPPORT_SPF */
21 int dmarc_store_data(header_line *);
23 uschar *dmarc_exim_expand_query(int);
24 uschar *dmarc_exim_expand_defaults(int);
25 uschar *dmarc_auth_results_header(header_line *,uschar *);
26 static int dmarc_write_history_file();
28 #define DMARC_AR_HEADER US"Authentication-Results:"
29 #define DMARC_VERIFY_STATUS 1
31 #define DMARC_HIST_OK 1
32 #define DMARC_HIST_DISABLED 2
33 #define DMARC_HIST_EMPTY 3
34 #define DMARC_HIST_FILE_ERR 4
35 #define DMARC_HIST_WRITE_ERR 5
37 /* From opendmarc.c */
38 #define DMARC_RESULT_REJECT 0
39 #define DMARC_RESULT_DISCARD 1
40 #define DMARC_RESULT_ACCEPT 2
41 #define DMARC_RESULT_TEMPFAIL 3
42 #define DMARC_RESULT_QUARANTINE 4
44 /* From opendmarc-ar.h */
45 /* ARES_RESULT_T -- type for specifying an authentication result */
46 #define ARES_RESULT_UNDEFINED (-1)
47 #define ARES_RESULT_PASS 0
48 #define ARES_RESULT_UNUSED 1
49 #define ARES_RESULT_SOFTFAIL 2
50 #define ARES_RESULT_NEUTRAL 3
51 #define ARES_RESULT_TEMPERROR 4
52 #define ARES_RESULT_PERMERROR 5
53 #define ARES_RESULT_NONE 6
54 #define ARES_RESULT_FAIL 7
55 #define ARES_RESULT_POLICY 8
56 #define ARES_RESULT_NXDOMAIN 9
57 #define ARES_RESULT_SIGNED 10
58 #define ARES_RESULT_UNKNOWN 11
59 #define ARES_RESULT_DISCARD 12
61 #endif /* EXPERIMENTAL_DMARC */