Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > b5fdf68d1ef6711be4a04d1550358feb > files > 76

libopendkim-devel-2.4.2-5.fc14.x86_64.rpm

<html>
<head><title>dkim_set_policy_lookup()</title></head>
<body>
<!--
$Id: dkim_set_policy_lookup.html,v 1.2 2010/07/24 04:52:15 cm-msk Exp $
-->
<h1>dkim_set_policy_lookup()</h1>
<p align="right"><a href="index.html">[back to index]</a></p>

<table border="0" cellspacing=4 cellpadding=4>
<!---------- Synopsis ----------->
<tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
<pre>
#include &lt;dkim.h&gt;
<a href="dkim_stat.html"><tt>DKIM_STAT</tt></a> dkim_set_policy_lookup(
	<a href="dkim_lib.html"><tt>DKIM_LIB</tt></a> *libopendkim,
        <a href="dkim_cbstat.html"><tt>DKIM_CBSTAT</tt></a> (*func) (<a href="dkim.html"><tt>DKIM</tt></a> *dkim,
	             unsigned char *query,
                     _Bool excheck,
	             unsigned char *buf,
	             size_t buflen,
	             int *qstat)
);
</pre>
Defines a function which should do policy lookups rather than implementing
the DKIM specification (e.g a DNS lookup).
</td></tr>

<!----------- Description ---------->
<tr><th valign="top" align=left>DESCRIPTION</th><td>
<table border="1" cellspacing=1 cellpadding=4>
<tr align="left" valign=top>
<th width="80">Called When</th>
<td><tt>dkim_set_policy_lookup()</tt> can be called at any time.</td>
</tr>
</table>

<!----------- Arguments ---------->
<tr><th valign="top" align=left>ARGUMENTS</th><td>
    <table border="1" cellspacing=0>
    <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
    <tr valign="top"><td>libopendkim</td>
	<td>Library-specific handle, returned by
        <a href="dkim_init.html"><tt>dkim_init()</tt></a>.
	</td></tr>
    <tr valign="top"><td>func</td>
	<td>A pointer to a function which the library should use in place
	of its own code to do policy lookups.  The function will receive
	six things:
	<ol>
	 <li> a <a href="dkim.html"><tt>DKIM</tt></a> handle referencing the
	      job being processed;
	 <li> a pointer to the string that should be queried
	 <li> a Boolean indicating whether this query should verify domain
	      existence ("true") or retrieve the policy TXT record ("false")
	 <li> a pointer to a buffer that should receive the result of the
	      policy lookup
	 <li> the number of bytes available there
	 <li> 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. <tt>NXDOMAIN</tt>,
	      <tt>NOERROR</tt>, <tt>SERVFAIL</tt>, etc., typically defined
	      in <tt>&lt;arpa/nameser.h&gt;</tt>)
	</ol>
	The function should return a valid
	<a href="dkim_cbstat.html"><tt>DKIM_CBSTAT</tt></a> constant; in
	particular, if no policy is found, the contents of <tt>buf</tt>
	should be unchanged and <tt>DKIM_CBSTAT_CONTINUE</tt> should be
	returned.  If <tt>func</tt> is NULL, the internal policy lookup
	implementation will be used.  </td></tr>
    </table>
</td></tr>

<!----------- Return Value ---------->
<tr>
<th valign="top" align=left>RETURN VALUES</th> 
<td>
<ul>
<li>DKIM_STAT_OK -- success
</ul>
</td>
</tr>

<!----------- Notes ---------->
<tr>
<th valign="top" align=left>NOTES</th> 
<td>
<ul>
<li>None.
</ul>
</td>
</tr>
</table>

<hr size="1">
<font size="-1">
Copyright (c) 2007, 2008 Sendmail, Inc. and its suppliers.
All rights reserved.
<br>
Copyright (c) 2009-2011, The OpenDKIM Project.  All rights reserved.

<br>
By using this file, you agree to the terms and conditions set
forth in the respective licenses.
</font>
</body>
</html>