140266059SGregory Neil Shapiro<html> 240266059SGregory Neil Shapiro<head><title>smfi_addheader</title></head> 340266059SGregory Neil Shapiro<body> 440266059SGregory Neil Shapiro<h1>smfi_addheader</h1> 540266059SGregory Neil Shapiro 640266059SGregory Neil Shapiro<table border="0" cellspacing=4 cellpadding=4> 740266059SGregory Neil Shapiro<!---------- Synopsis -----------> 840266059SGregory Neil Shapiro<tr><th valign="top" align=left width=150>SYNOPSIS</th><td> 940266059SGregory Neil Shapiro<pre> 1040266059SGregory Neil Shapiro#include <libmilter/mfapi.h> 1140266059SGregory Neil Shapiroint smfi_addheader( 1240266059SGregory Neil Shapiro SMFICTX *ctx, 1340266059SGregory Neil Shapiro char *headerf, 1440266059SGregory Neil Shapiro char *headerv 1540266059SGregory Neil Shapiro); 1640266059SGregory Neil Shapiro</pre> 1740266059SGregory Neil ShapiroAdd a header to the current message. 1840266059SGregory Neil Shapiro</td></tr> 1940266059SGregory Neil Shapiro 2040266059SGregory Neil Shapiro<!----------- Description ----------> 2140266059SGregory Neil Shapiro<tr><th valign="top" align=left>DESCRIPTION</th><td> 2240266059SGregory Neil Shapiro<table border="1" cellspacing=1 cellpadding=4> 2340266059SGregory Neil Shapiro<tr align="left" valign=top> 2440266059SGregory Neil Shapiro<th width="80">Called When</th> 2540266059SGregory Neil Shapiro<td>Called only from <a href="xxfi_eom.html">xxfi_eom</a>.</td> 2640266059SGregory Neil Shapiro</tr> 2740266059SGregory Neil Shapiro<tr align="left" valign=top> 2840266059SGregory Neil Shapiro<th width="80">Effects</th> 2940266059SGregory Neil Shapiro<td>Adds a header to the current message.</td> 3040266059SGregory Neil Shapiro</tr> 3140266059SGregory Neil Shapiro</table> 3240266059SGregory Neil Shapiro 3340266059SGregory Neil Shapiro<!----------- Arguments ----------> 3440266059SGregory Neil Shapiro<tr><th valign="top" align=left>ARGUMENTS</th><td> 3540266059SGregory Neil Shapiro <table border="1" cellspacing=0> 3640266059SGregory Neil Shapiro <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr> 3740266059SGregory Neil Shapiro <tr valign="top"><td>ctx</td> 3840266059SGregory Neil Shapiro <td>Opaque context structure. 3940266059SGregory Neil Shapiro </td></tr> 4040266059SGregory Neil Shapiro <tr valign="top"><td>headerf</td> 4140266059SGregory Neil Shapiro <td>The header name, a non-NULL, null-terminated string. 4240266059SGregory Neil Shapiro </td></tr> 4340266059SGregory Neil Shapiro <tr valign="top"><td>headerv</td> 4440266059SGregory Neil Shapiro <td>The header value to be added, a non-NULL, null-terminated string. This may be the empty string. 4540266059SGregory Neil Shapiro </td></tr> 4640266059SGregory Neil Shapiro </table> 4740266059SGregory Neil Shapiro</td></tr> 4840266059SGregory Neil Shapiro 4940266059SGregory Neil Shapiro<!----------- Return values ----------> 5040266059SGregory Neil Shapiro<tr> 5140266059SGregory Neil Shapiro<th valign="top" align=left>RETURN VALUES</th> 5240266059SGregory Neil Shapiro 5340266059SGregory Neil Shapiro<td>smfi_addheader returns MI_FAILURE if: 5440266059SGregory Neil Shapiro<ul><li>headerf or headerv is NULL. 5540266059SGregory Neil Shapiro <li>Adding headers in the current connection state is invalid. 5640266059SGregory Neil Shapiro <li>Memory allocation fails. 5740266059SGregory Neil Shapiro <li>A network error occurs. 5840266059SGregory Neil Shapiro <li>SMFIF_ADDHDRS was not set when <a href="smfi_register.html">smfi_register</a> was called. 5940266059SGregory Neil Shapiro</ul> 6040266059SGregory Neil ShapiroOtherwise, it returns MI_SUCCESS. 6140266059SGregory Neil Shapiro</td> 6240266059SGregory Neil Shapiro</tr> 6340266059SGregory Neil Shapiro 6440266059SGregory Neil Shapiro<!----------- Notes ----------> 6540266059SGregory Neil Shapiro<tr align="left" valign=top> 6640266059SGregory Neil Shapiro<th>NOTES</th> 6740266059SGregory Neil Shapiro<td> 6840266059SGregory Neil Shapiro<ul><li>smfi_addheader does not change a message's existing headers. 6940266059SGregory Neil ShapiroTo change a header's current value, use <a 7040266059SGregory Neil Shapirohref="smfi_chgheader.html">smfi_chgheader</a>. 7140266059SGregory Neil Shapiro <li>A filter which calls smfi_addheader must have set the SMFIF_ADDHDRS flag in the smfiDesc_str passed to <a href="smfi_register.html">smfi_register</a>. 7240266059SGregory Neil Shapiro <li>For smfi_chgheader, filter order is important. <b>Later filters will see the header changes made by earlier ones.</b> 7340266059SGregory Neil Shapiro <li>Neither the name nor the value of the header is checked for 7440266059SGregory Neil Shapiro standards compliance. However, each line of the header must be under 7540266059SGregory Neil Shapiro 2048 characters and should be under 998 characters. If longer headers 7640266059SGregory Neil Shapiro are needed, make them multiline. 7740266059SGregory Neil Shapiro <b>It is the filter writer's responsibility to ensure that no standards 7840266059SGregory Neil Shapiro are violated.</b> 7940266059SGregory Neil Shapiro</ul> 8040266059SGregory Neil Shapiro</td> 8140266059SGregory Neil Shapiro</tr> 8240266059SGregory Neil Shapiro 8340266059SGregory Neil Shapiro</table> 8440266059SGregory Neil Shapiro 8540266059SGregory Neil Shapiro<hr size="1"> 8640266059SGregory Neil Shapiro<font size="-1"> 8740266059SGregory Neil ShapiroCopyright (c) 2000-2001 Sendmail, Inc. and its suppliers. 8840266059SGregory Neil ShapiroAll rights reserved. 8940266059SGregory Neil Shapiro<br> 9040266059SGregory Neil ShapiroBy using this file, you agree to the terms and conditions set 9140266059SGregory Neil Shapiroforth in the <a href="LICENSE.txt">LICENSE</a>. 9240266059SGregory Neil Shapiro</font> 9340266059SGregory Neil Shapiro</body> 9440266059SGregory Neil Shapiro</html> 95