dkim_set_policy_lookup()

SYNOPSIS
#include <dkim.h>
DKIM_STAT dkim_set_policy_lookup(
	DKIM_LIB *libdkim,
        DKIM_CBSTAT (*func) (DKIM *dkim,
	             unsigned char *query,
	             unsigned char *buf,
	             size_t buflen,
	             int *qstat));
);
Defines a function which should do policy lookups rather than implementing the DKIM specification (e.g a DNS lookup).
DESCRIPTION
Called When dkim_set_policy_lookup() can be called at any time.
ARGUMENTS
ArgumentDescription
libdkim Library-specific handle, returned by dkim_init().
func A pointer to a function which the library should use in place of its own code to do policy lookups. The function will receive five things: A DKIM handle referencing the job being processed, a pointer to the string that should be queried, a pointer to a buffer that should receive the result of the policy lookup, the number of bytes available there, and a pointer to an integer which should receive the result of the query attempt, and should be one of the known constants used to report the status of a DNS query (e.g. NXDOMAIN, NOERROR, SERVFAIL, etc.). The function should return a valid DKIM_CBSTAT constant; in particular, if no policy is found, the contents of buf should be unchanged and DKIM_CBSTAT_CONTINUE should be returned. If func is NULL, the internal policy lookup implementation will be used.
RETURN VALUES
  • DKIM_STAT_OK -- success
NOTES
  • This function is a local addition to the formal API specification and is experimental only. It may not appear in other implementations.

Copyright (c) 2007 Sendmail, Inc. and its suppliers. All rights reserved.
By using this file, you agree to the terms and conditions set forth in the LICENSE.