xxfi_body

SYNOPSIS
#include <libmilter/mfapi.h>
sfsistat (*xxfi_body)(
	SMFICTX *ctx,
	unsigned char *bodyp,
	size_t len
);
Handle a piece of a message's body.
DESCRIPTION
Called When xxfi_body is called zero or more times between xxfi_eoh and xxfi_eom.
Default Behavior Do nothing; return SMFIS_CONTINUE.
ARGUMENTS
ArgumentDescription
ctx Opaque context structure.
bodyp Pointer to the start of this block of body data. bodyp is not valid outside this call to xxfi_body.
len The amount of data pointed to by bodyp.
NOTES
  • bodyp points to a sequence of bytes. It is not a C string (a sequence of characters that is terminated by '\0'). Therefore, do not use the usual C string functions like strlen(3) on this byte block. 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.
  • Since message bodies can be very large, defining xxfi_body can significantly impact filter performance.
  • End-of-lines are represented as received from SMTP (normally CR/LF).
  • Later filters will see body changes made by earlier ones.
  • Message bodies may be sent in multiple chunks, with one call to xxfi_body per chunk.
  • Return SMFIS_SKIP 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 xxfi_eom(). Note: the milter must negotiate this behavior with the MTA, i.e., it must check whether the protocol action SMFIP_SKIP is available and if so, the milter must request it.

Copyright (c) 2000-2003, 2007 Sendmail, Inc. and its suppliers. All rights reserved.
By using this file, you agree to the terms and conditions set forth in the LICENSE.