2 <head><title>smfi_replacebody
</title></head>
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>
10 #include
<libmilter/mfapi.h
>
17 Replace message-body data.
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>
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
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.
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.
46 <tr valign=
"top"><td>bodylen
</td>
47 <td>The number of data bytes pointed to by bodyp.
52 <!----------- Return values ---------->
54 <th valign=
"top" align=left
>RETURN VALUES
</th>
56 <td>smfi_replacebody fails and returns MI_FAILURE if:
58 <li>bodyp == NULL and bodylen
> 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.
63 Otherwise, it will return MI_SUCCESS.
67 <!----------- Notes ---------->
68 <tr align=
"left" valign=top
>
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>
83 Copyright (c)
2000-
2001,
2003 Sendmail, Inc. and its suppliers.
86 By using this file, you agree to the terms and conditions set