140266059SGregory Neil Shapiro<html> 240266059SGregory Neil Shapiro<head><title>smfi_replacebody</title></head> 340266059SGregory Neil Shapiro<body> 440266059SGregory Neil Shapiro<h1>smfi_replacebody</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_replacebody( 1240266059SGregory Neil Shapiro SMFICTX *ctx, 1340266059SGregory Neil Shapiro unsigned char *bodyp, 1440266059SGregory Neil Shapiro int bodylen 1540266059SGregory Neil Shapiro); 1640266059SGregory Neil Shapiro</pre> 1740266059SGregory Neil ShapiroReplace message-body data. 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>. smfi_replacebody may be called more than once.</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>smfi_replacebody replaces the body of the current message. If called 3040266059SGregory Neil Shapiromore than once, subsequent calls result in data being appended to the new 3140266059SGregory Neil Shapirobody. 3240266059SGregory Neil Shapiro</td> 3340266059SGregory Neil Shapiro</tr> 3440266059SGregory Neil Shapiro</table> 3540266059SGregory Neil Shapiro 3640266059SGregory Neil Shapiro<!----------- Arguments ----------> 3740266059SGregory Neil Shapiro<tr><th valign="top" align=left>ARGUMENTS</th><td> 3840266059SGregory Neil Shapiro <table border="1" cellspacing=0> 3940266059SGregory Neil Shapiro <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr> 4040266059SGregory Neil Shapiro <tr valign="top"><td>ctx</td> 4140266059SGregory Neil Shapiro <td>Opaque context structure. 4240266059SGregory Neil Shapiro </td></tr> 4340266059SGregory Neil Shapiro <tr valign="top"><td>bodyp</td> 4440266059SGregory Neil Shapiro <td>A pointer to the start of the new body data, which does not have to be null-terminated. If bodyp is NULL, it is treated as having length == 0. Body data should be in CR/LF form. 4540266059SGregory Neil Shapiro </td></tr> 4640266059SGregory Neil Shapiro <tr valign="top"><td>bodylen</td> 4740266059SGregory Neil Shapiro <td>The number of data bytes pointed to by bodyp. 4840266059SGregory Neil Shapiro </td></tr> 4940266059SGregory Neil Shapiro </table> 5040266059SGregory Neil Shapiro</td></tr> 5140266059SGregory Neil Shapiro 5240266059SGregory Neil Shapiro<!----------- Return values ----------> 5340266059SGregory Neil Shapiro<tr> 5440266059SGregory Neil Shapiro<th valign="top" align=left>RETURN VALUES</th> 5540266059SGregory Neil Shapiro 5640266059SGregory Neil Shapiro<td>smfi_replacebody fails and returns MI_FAILURE if: 5740266059SGregory Neil Shapiro<ul> 5840266059SGregory Neil Shapiro <li>bodyp == NULL and bodylen > 0. 5940266059SGregory Neil Shapiro <li>Changing the body in the current connection state is invalid. 6040266059SGregory Neil Shapiro <li>A network error occurs. 6140266059SGregory Neil Shapiro <li>SMFIF_CHGBODY was not set when <a href="smfi_register.html">smfi_register</a> was called. 6240266059SGregory Neil Shapiro</ul> 6340266059SGregory Neil ShapiroOtherwise, it will return MI_SUCCESS. 6440266059SGregory Neil Shapiro</td> 6540266059SGregory Neil Shapiro</tr> 6640266059SGregory Neil Shapiro 6740266059SGregory Neil Shapiro<!----------- Notes ----------> 6840266059SGregory Neil Shapiro<tr align="left" valign=top> 6940266059SGregory Neil Shapiro<th>NOTES</th> 7040266059SGregory Neil Shapiro<td> 7140266059SGregory Neil Shapiro<ul> 7240266059SGregory Neil Shapiro <li>Since the message body may be very large, setting SMFIF_CHGBODY may significantly affect filter performance. 7340266059SGregory Neil Shapiro <li>If a filter sets SMFIF_CHGBODY but does not call smfi_replacebody, the original body remains unchanged. 7440266059SGregory Neil Shapiro <li>For smfi_replacebody, filter order is important. <b>Later filters will see the new body contents created by earlier ones.</b> 7540266059SGregory Neil Shapiro</ul> 7640266059SGregory Neil Shapiro</td> 7740266059SGregory Neil Shapiro</tr> 7840266059SGregory Neil Shapiro 7940266059SGregory Neil Shapiro</table> 8040266059SGregory Neil Shapiro 8140266059SGregory Neil Shapiro<hr size="1"> 8240266059SGregory Neil Shapiro<font size="-1"> 8340266059SGregory Neil ShapiroCopyright (c) 2000-2001 Sendmail, Inc. and its suppliers. 8440266059SGregory Neil ShapiroAll rights reserved. 8540266059SGregory Neil Shapiro<br> 8640266059SGregory Neil ShapiroBy using this file, you agree to the terms and conditions set 8740266059SGregory Neil Shapiroforth in the <a href="LICENSE.txt">LICENSE</a>. 8840266059SGregory Neil Shapiro</font> 8940266059SGregory Neil Shapiro</body> 9040266059SGregory Neil Shapiro</html> 91