1 /*************************************************
2 * Exim - an Internet mail transport agent *
3 *************************************************/
5 /* Experimental DMARC support.
6 Copyright (c) The Exim Maintainers 2021 - 2023
7 Copyright (c) Todd Lyons <tlyons@exim.org> 2012 - 2014
9 /* SPDX-License-Identifier: GPL-2.0-or-later */
11 /* Portions Copyright (c) 2012, 2013, The Trusted Domain Project;
12 All rights reserved, licensed for use per LICENSE.opendmarc. */
16 # include "opendmarc/dmarc.h"
18 # include "spf2/spf.h"
19 # endif /* SUPPORT_SPF */
22 gstring * dmarc_version_report(gstring *);
24 int dmarc_conn_init(void);
25 int dmarc_store_data(header_line *);
26 int dmarc_process(void);
27 uschar *dmarc_exim_expand_query(int);
28 uschar *dmarc_exim_expand_defaults(int);
30 #define DMARC_VERIFY_STATUS 1
32 #define DMARC_HIST_OK 1
33 #define DMARC_HIST_DISABLED 2
34 #define DMARC_HIST_EMPTY 3
35 #define DMARC_HIST_FILE_ERR 4
36 #define DMARC_HIST_WRITE_ERR 5
38 /* From opendmarc.c */
39 #define DMARC_RESULT_REJECT 0
40 #define DMARC_RESULT_DISCARD 1
41 #define DMARC_RESULT_ACCEPT 2
42 #define DMARC_RESULT_TEMPFAIL 3
43 #define DMARC_RESULT_QUARANTINE 4
45 /* From opendmarc-ar.h */
46 /* ARES_RESULT_T -- type for specifying an authentication result */
47 #define ARES_RESULT_UNDEFINED (-1)
48 #define ARES_RESULT_PASS 0
49 #define ARES_RESULT_UNUSED 1
50 #define ARES_RESULT_SOFTFAIL 2
51 #define ARES_RESULT_NEUTRAL 3
52 #define ARES_RESULT_TEMPERROR 4
53 #define ARES_RESULT_PERMERROR 5
54 #define ARES_RESULT_NONE 6
55 #define ARES_RESULT_FAIL 7
56 #define ARES_RESULT_POLICY 8
57 #define ARES_RESULT_NXDOMAIN 9
58 #define ARES_RESULT_SIGNED 10
59 #define ARES_RESULT_UNKNOWN 11
60 #define ARES_RESULT_DISCARD 12
62 #define DMARC_ARC_POLICY_RESULT_PASS 0
63 #define DMARC_ARC_POLICY_RESULT_UNUSED 1
64 #define DMARC_ARC_POLICY_RESULT_FAIL 2
66 #endif /* SUPPORT_DMARC */