freebsd-dev/contrib/sendmail/libmilter/docs/xxfi_body.html

98 lines
2.9 KiB
HTML
Raw Normal View History

2007-04-09 01:38:51 +00:00
<HTML>
<HEAD><TITLE>xxfi_body</TITLE></HEAD>
<BODY>
2004-08-01 01:04:57 +00:00
<!--
2007-04-09 01:38:51 +00:00
$Id: xxfi_body.html,v 1.17 2007/03/26 20:12:46 ca Exp $
2004-08-01 01:04:57 +00:00
-->
2007-04-09 01:38:51 +00:00
<H1>xxfi_body</H1>
2002-02-17 21:56:45 +00:00
2007-04-09 01:38:51 +00:00
<TABLE border="0" cellspacing=4 cellpadding=4>
2002-02-17 21:56:45 +00:00
<!---------- Synopsis ----------->
2007-04-09 01:38:51 +00:00
<TR><TH valign="top" align=left width=100>SYNOPSIS</TH><TD>
<PRE>
2002-02-17 21:56:45 +00:00
#include &lt;libmilter/mfapi.h&gt;
sfsistat (*xxfi_body)(
2007-04-09 01:38:51 +00:00
SMFICTX *ctx,
unsigned char *bodyp,
2002-02-17 21:56:45 +00:00
size_t len
);
2007-04-09 01:38:51 +00:00
</PRE>
2002-02-17 21:56:45 +00:00
Handle a piece of a message's body.
2007-04-09 01:38:51 +00:00
</TD></TR>
2002-02-17 21:56:45 +00:00
<!----------- Description ---------->
2007-04-09 01:38:51 +00:00
<TR><TH valign="top" align=left>DESCRIPTION</TH><TD>
<TABLE border="1" cellspacing=1 cellpadding=4>
<TR align="left" valign=top>
<TH width="80">Called When</TH>
<TD>xxfi_body is called zero or more times between xxfi_eoh and xxfi_eom.</TD>
</TR>
<TR align="left" valign=top>
<TH>Default Behavior</TH>
<TD>Do nothing; return SMFIS_CONTINUE.</TD>
</TR>
</TABLE>
2002-02-17 21:56:45 +00:00
<!----------- Arguments ---------->
2007-04-09 01:38:51 +00:00
<TR><TH valign="top" align=left>ARGUMENTS</TH><TD>
<TABLE border="1" cellspacing=0>
<TR bgcolor="#dddddd"><TH>Argument</TH><TH>Description</TH></TR>
<TR valign="top"><TD>ctx</TD>
<TD>Opaque context structure.
</TD></TR>
<TR valign="top"><TD>bodyp</TD>
<TD>Pointer to the start of this block of body data. bodyp is not valid outside this call to xxfi_body.
</TD></TR>
<TR valign="top"><TD>len</TD>
<TD>The amount of data pointed to by bodyp.
</TD></TR>
</TABLE>
</TD></TR>
2002-02-17 21:56:45 +00:00
<!----------- Notes ---------->
2007-04-09 01:38:51 +00:00
<TR>
<TH valign="top" align=left>NOTES</TH>
<TD>
<UL>
<LI>bodyp points to a sequence of bytes.
It is <EM>not</EM> a C string (a sequence of characters that is terminated by '\0').
Therefore, do not use the usual C string functions like <CODE>strlen(3)</CODE>
on this byte block.
2002-02-17 21:56:45 +00:00
Moreover, the byte sequence may contain '\0' characters inside the block.
Hence even if a trailing '\0' is added, C string functions may still fail
to work as expected.
2007-04-09 01:38:51 +00:00
<LI>Since message bodies can be very large, defining xxfi_body can
2002-02-17 21:56:45 +00:00
significantly impact filter performance.
2007-04-09 01:38:51 +00:00
<LI>End-of-lines are represented as received from SMTP (normally CR/LF).
<LI>Later filters will see body changes made by earlier ones.
<LI>Message bodies may be sent in multiple chunks, with one call to
2002-02-17 21:56:45 +00:00
xxfi_body per chunk.
2007-04-09 01:38:51 +00:00
<LI>Return
<A HREF="api.html#SMFIS_SKIP">SMFIS_SKIP</A>
if a milter has received sufficiently many
body chunks to make a decision,
but still wants to invoke
message modification functions that are only allowed to be called from
<A HREF="xxfi_eom.html">xxfi_eom()</A>.
Note: the milter <EM>must</EM>
<A HREF="xxfi_negotiate.html">negotiate</A>
this behavior with the MTA, i.e., it must check whether
the protocol action
<A HREF="xxfi_negotiate.html#SMFIP_SKIP"><CODE>SMFIP_SKIP</CODE></A>
is available and if so, the milter must request it.
</UL>
</TD>
</TR>
</TABLE>
2002-02-17 21:56:45 +00:00
2007-04-09 01:38:51 +00:00
<HR size="1">
<FONT size="-1">
Copyright (c) 2000-2003, 2007 Sendmail, Inc. and its suppliers.
2002-02-17 21:56:45 +00:00
All rights reserved.
2007-04-09 01:38:51 +00:00
<BR>
2002-02-17 21:56:45 +00:00
By using this file, you agree to the terms and conditions set
2003-03-29 19:12:53 +00:00
forth in the LICENSE.
2007-04-09 01:38:51 +00:00
</FONT>
</BODY>
</HTML>