[back to index]

#include <dmarc.h>
OPENDMARC_STATUS_T opendmarc_policy_store_dmarc(
	u_char *dmarc_record, u_char *domain, u_char *organizationaldomain
Provide the library with a DMARC record with which to determine policy.
Called When opendmarc_policy_store_dmarc() must be called before you call opendmarc_get_policy_to_enforce().
pctx The address of a structure of type DMARC_POLICY_T as returned from opendmarc_policy_connect_init().
dmarc_record A string containing the DMARC record that the library should parse.
domain A string containing the domain for which you looked up the DMARC record.
organizationaldomain If you found the record using the Organizational Domain instead of the From: domain, provide that domain here. Else leave as NULL.
  • DMARC_PARSE_OKAY -- Success.
  • DMARC_PARSE_ERROR_NULL_CTX -- If you passed in a pctx value that was NULL.
  • DMARC_PARSE_ERROR_EMPTY -- If the DMARC record was NULL.
  • DMARC_PARSE_ERROR_NO_DOMAIN -- If the domain was NULL.
  • DMARC_PARSE_ERROR_BAD_VERSION -- If the DMARC record's v= was bad.
  • DMARC_PARSE_ERROR_BAD_VALUE -- If a value following an = was bad or illegal.
  • DMARC_PARSE_ERROR_NO_REQUIRED_P -- The required p= was absent.
  • This function expects the DMARC record to be supplied as a single line of text. If the record appeared in DNS as a collection of quoted parts, you must assemble those parts into a single string before calling this function.

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.