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).
|
ARGUMENTS |
Argument | Description |
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. |
|