DMARC_POLICY_T

[back to index]

DESCRIPTION
Purpose The DMARC_POLICY_T is an opaque structure used to communicate on a per message basis with the library. It is to enter information into policy and to receive information from policy.
Synopsis
#include <dmarc.h>

DMARC_POLICY_T *pctx;

DMARC_POLICY_T This opaque data type must be initialized using opendmarc_policy_connect_init() and later freed using opendmarc_policy_connect_shutdown().

In generally you may initialize it when the connection is first accepted and keep it active until the remote client disconnects. If there are multiple envelopes per envelope, you may call opendmarc_policy_connect_rset() to reset the opaque structure for re-use with the next message.

Usage Each connection from a client to your SMTP server will require its own DMARC_POLICY_T pointer. Be certain to free this structure by calling when the connection is discontinued to avoid a memory leak.
NOTES
  • DMARC_POLICY_T is thread safe provided it is not used concurrently by two or more threads. There should be a minimum of one DMARC_POLICY_T pointer per thread.

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.