1<HTML> 2<HEAD><TITLE>xxfi_body</TITLE></HEAD> 3<BODY> 4<!-- 5$Id: xxfi_body.html,v 1.17 2007/03/26 20:12:46 ca Exp $ 6--> 7<H1>xxfi_body</H1> 8 9<TABLE border="0" cellspacing=4 cellpadding=4> 10<!---------- Synopsis -----------> 11<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD> 12<PRE> 13#include <libmilter/mfapi.h> 14sfsistat (*xxfi_body)( 15 SMFICTX *ctx, 16 unsigned char *bodyp, 17 size_t len 18); 19</PRE> 20Handle a piece of a message's body. 21</TD></TR> 22 23<!----------- Description ----------> 24<TR><TH valign="top" align=left>DESCRIPTION</TH><TD> 25<TABLE border="1" cellspacing=1 cellpadding=4> 26<TR align="left" valign=top> 27<TH width="80">Called When</TH> 28<TD>xxfi_body is called zero or more times between xxfi_eoh and xxfi_eom.</TD> 29</TR> 30<TR align="left" valign=top> 31<TH>Default Behavior</TH> 32<TD>Do nothing; return SMFIS_CONTINUE.</TD> 33</TR> 34</TABLE> 35 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>Pointer to the start of this block of body data. bodyp is not valid outside this call to xxfi_body. 45 </TD></TR> 46 <TR valign="top"><TD>len</TD> 47 <TD>The amount of data pointed to by bodyp. 48 </TD></TR> 49 </TABLE> 50</TD></TR> 51 52<!----------- Notes ----------> 53<TR> 54<TH valign="top" align=left>NOTES</TH> 55<TD> 56<UL> 57<LI>bodyp points to a sequence of bytes. 58It is <EM>not</EM> a C string (a sequence of characters that is terminated by '\0'). 59Therefore, do not use the usual C string functions like <CODE>strlen(3)</CODE> 60on this byte block. 61Moreover, the byte sequence may contain '\0' characters inside the block. 62Hence even if a trailing '\0' is added, C string functions may still fail 63to work as expected. 64<LI>Since message bodies can be very large, defining xxfi_body can 65significantly impact filter performance. 66<LI>End-of-lines are represented as received from SMTP (normally CR/LF). 67<LI>Later filters will see body changes made by earlier ones. 68<LI>Message bodies may be sent in multiple chunks, with one call to 69 xxfi_body per chunk. 70<LI>Return 71<A HREF="api.html#SMFIS_SKIP">SMFIS_SKIP</A> 72if a milter has received sufficiently many 73body chunks to make a decision, 74but still wants to invoke 75message modification functions that are only allowed to be called from 76<A HREF="xxfi_eom.html">xxfi_eom()</A>. 77Note: the milter <EM>must</EM> 78<A HREF="xxfi_negotiate.html">negotiate</A> 79this behavior with the MTA, i.e., it must check whether 80the protocol action 81<A HREF="xxfi_negotiate.html#SMFIP_SKIP"><CODE>SMFIP_SKIP</CODE></A> 82is available and if so, the milter must request it. 83</UL> 84</TD> 85</TR> 86</TABLE> 87 88<HR size="1"> 89<FONT size="-1"> 90Copyright (c) 2000-2003, 2007 Sendmail, Inc. and its suppliers. 91All rights reserved. 92<BR> 93By using this file, you agree to the terms and conditions set 94forth in the LICENSE. 95</FONT> 96</BODY> 97</HTML> 98