dkim_set_policy_lookup()

SYNOPSIS
#include <dkim.h>
DKIM_STAT dkim_set_policy_lookup(
	DKIM_LIB *libdkim,
        int (*func) (DKIM *dkim,
	             unsigned char *buf,
	             size_t buflen));
);
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 three things: A DKIM handle referencing the job being processed, a pointer to a buffer that should receive the result of the policy lookup, and the number of bytes available there. The function should return 1 if the policy retrieval succeeded, 0 if there were no errors but no policy was found, and -1 on error. If 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.