# opendmarc_policy_fetch_alignment()

[back to index]

SYNOPSIS |
    #include <dmarc.h>
    OPENDMARC_STATUS_T opendmarc_policy_fetch_alignment(
    	DMARC_POLICY_T *pctx,
    	int *dkim_alignment, int *spf_alignment
    );
Find out the Alignment results for the SPF and DKIM checks.
DESCRIPTION |
Called When | `opendmarc_policy_fetch_alignment()` is called after the DMARC record has been fetched and parsed.
ARGUMENTS |
Argument | Description
--- | ---
pctx | The address of a structure of type `DMARC_POLICY_T` as returned from opendmarc_policy_connect_init().
dkim_alignment | The address of an integer that will be set to either `DMARC_POLICY_DKIM_ALIGNMENT_PASS` or `DMARC_POLICY_DKIM_ALIGNMENT_FAIL`
spf_alignment | The address of an integer that will be set to either `DMARC_POLICY_SPF_ALIGNMENT_PASS` or `DMARC_POLICY_SPF_ALIGNMENT_FAIL`
RETURN VALUES | `DMARC_PARSE_OKAY` -- Success. `DMARC_PARSE_ERROR_NULL_CTX` -- If you passed in a `pctx` value that was NULL.
NOTES | This function should only be called after feeding the library the SPF and DKIM results with opendmarc_policy_store_spf() or opendmarc_policy_store_dkim(). And should only be called after providing the From header domain with opendmarc_policy_store_from_domain(). And should only be called after the DMARC record has been fetched with opendmarc_policy_query_dmarc() or supplied to the library with opendmarc_policy_store_dmarc(). And shoud only be called after the policy to enforce has been retrieved and processed using opendmarc_get_policy_to_enforce().

Copyright (c) 2012, The Trusted Domain Project. All rights reserved.
By using this file, you agree to the terms and conditions set forth in the license.