X-Git-Url: https://git.exim.org/users/jgh/exim.git/blobdiff_plain/825fae12de435166c3706fa21ea7ccc8423c48bb..4840604e4f365545a43f01d0e953ce33afd1c3d5:/src/src/receive.c diff --git a/src/src/receive.c b/src/src/receive.c index 4cea6d58e..372747360 100644 --- a/src/src/receive.c +++ b/src/src/receive.c @@ -13,6 +13,10 @@ extern int dcc_ok; #endif +#ifdef EXPERIMENTAL_DMARC +#include "dmarc.h" +#endif /* EXPERIMENTAL_DMARC */ + /************************************************* * Local static variables * *************************************************/ @@ -1480,6 +1484,10 @@ header_line *subject_header = NULL; header_line *msgid_header = NULL; header_line *received_header; +#ifdef EXPERIMENTAL_DMARC +int dmarc_up = 0; +#endif /* EXPERIMENTAL_DMARC */ + /* Variables for use when building the Received: header. */ uschar *timestamp; @@ -1536,6 +1544,11 @@ message_linecount = body_linecount = body_zerocount = if (smtp_input && !smtp_batched_input && !dkim_disable_verify) dkim_exim_verify_init(); #endif +#ifdef EXPERIMENTAL_DMARC +/* initialize libopendmarc */ +dmarc_up = dmarc_init(); +#endif + /* Remember the time of reception. Exim uses time+pid for uniqueness of message ids, and fractions of a second are required. See the comments that precede the message id creation below. */ @@ -2706,7 +2719,6 @@ if (from_header != NULL && } } - /* If there are any rewriting rules, apply them to the sender address, unless it has already been rewritten as part of verification for SMTP input. */ @@ -3238,7 +3250,6 @@ else } } } -#endif /* DISABLE_DKIM */ #ifdef WITH_CONTENT_SCAN if (recipients_count > 0 && @@ -3247,6 +3258,10 @@ else goto TIDYUP; #endif /* WITH_CONTENT_SCAN */ +#ifdef EXPERIMENTAL_DMARC + dmarc_up = dmarc_store_data(from_header); +#endif /* EXPERIMENTAL_DMARC */ + #ifdef EXPERIMENTAL_PRDR if (prdr_requested && recipients_count > 1 && acl_smtp_data_prdr != NULL ) { @@ -3411,6 +3426,8 @@ else } } +#endif /* DISABLE_DKIM */ + /* The applicable ACLs have been run */ if (deliver_freeze) frozen_by = US"ACL"; /* for later logging */