Update zoneinfo database.
[dragonfly/netmp.git] / contrib / sendmail / libmilter / docs / smfi_replacebody.html
blob2ef0f49335296934823b26d794b850ce9daf7676
1 <html>
2 <head><title>smfi_replacebody</title></head>
3 <body>
4 <h1>smfi_replacebody</h1>
6 <table border="0" cellspacing=4 cellpadding=4>
7 <!---------- Synopsis ----------->
8 <tr><th valign="top" align=left width=150>SYNOPSIS</th><td>
9 <pre>
10 #include &lt;libmilter/mfapi.h&gt;
11 int smfi_replacebody(
12 SMFICTX *ctx,
13 unsigned char *bodyp,
14 int bodylen
16 </pre>
17 Replace message-body data.
18 </td></tr>
20 <!----------- Description ---------->
21 <tr><th valign="top" align=left>DESCRIPTION</th><td>
22 <table border="1" cellspacing=1 cellpadding=4>
23 <tr align="left" valign=top>
24 <th width="80">Called When</th>
25 <td>Called only from <a href="xxfi_eom.html">xxfi_eom</a>. smfi_replacebody may be called more than once.</td>
26 </tr>
27 <tr align="left" valign=top>
28 <th width="80">Effects</th>
29 <td>smfi_replacebody replaces the body of the current message. If called
30 more than once, subsequent calls result in data being appended to the new
31 body.
32 </td>
33 </tr>
34 </table>
36 <!----------- Arguments ---------->
37 <tr><th valign="top" align=left>ARGUMENTS</th><td>
38 <table border="1" cellspacing=0>
39 <tr bgcolor="#dddddd"><th>Argument</th><th>Description</th></tr>
40 <tr valign="top"><td>ctx</td>
41 <td>Opaque context structure.
42 </td></tr>
43 <tr valign="top"><td>bodyp</td>
44 <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.
45 </td></tr>
46 <tr valign="top"><td>bodylen</td>
47 <td>The number of data bytes pointed to by bodyp.
48 </td></tr>
49 </table>
50 </td></tr>
52 <!----------- Return values ---------->
53 <tr>
54 <th valign="top" align=left>RETURN VALUES</th>
56 <td>smfi_replacebody fails and returns MI_FAILURE if:
57 <ul>
58 <li>bodyp == NULL and bodylen &gt; 0.
59 <li>Changing the body in the current connection state is invalid.
60 <li>A network error occurs.
61 <li>SMFIF_CHGBODY was not set when <a href="smfi_register.html">smfi_register</a> was called.
62 </ul>
63 Otherwise, it will return MI_SUCCESS.
64 </td>
65 </tr>
67 <!----------- Notes ---------->
68 <tr align="left" valign=top>
69 <th>NOTES</th>
70 <td>
71 <ul>
72 <li>Since the message body may be very large, setting SMFIF_CHGBODY may significantly affect filter performance.
73 <li>If a filter sets SMFIF_CHGBODY but does not call smfi_replacebody, the original body remains unchanged.
74 <li>For smfi_replacebody, filter order is important. <b>Later filters will see the new body contents created by earlier ones.</b>
75 </ul>
76 </td>
77 </tr>
79 </table>
81 <hr size="1">
82 <font size="-1">
83 Copyright (c) 2000-2001, 2003 Sendmail, Inc. and its suppliers.
84 All rights reserved.
85 <br>
86 By using this file, you agree to the terms and conditions set
87 forth in the LICENSE.
88 </font>
89 </body>
90 </html>