xxfi_header callback Function

Purpose

The xxfi_header callback function handles the message header.

Syntax

#include <libmilter/mfapi.h>
sfsistat (*xxfi_header)(
	SMFICTX *ctx ,
	char *headerf,
	char *headerv
);

Description

The xxfi_header callback function is called once for each message header and returns SMFIS_CONTINUE flag.

Note:
  • Starting with sendmail 8.14, spaces after the colon in a header field are preserved if requested by using the SMFIP_HDR_LEADSPC flag. For example, the following header:
    From: sender <f@example.com>
    To:  user <t@example.com>
    Subject:no

    would be sent to a milter parameter as follows:

    "From", " sender <f@example.com>"
    "To", "  user <t@example.com>"
    "Subject", "no"

    while previously (or without the flag SMFIP_HDR_LEADSPC) it was as follows:

    "From", "sender <f@example.com>"
    "To", "user <t@example.com>"
    "Subject", "no"
  • Old filter make header changes or additions to the new filters.
  • For more details about the header format, see RFC 822 and RFC 2822.

Arguments

Table 1. Arguments
Item Description
ctx The opaque context structure is maintained in the libmilter parameter.
headerf The header field name.
headerv The header field value. The content of the header might include folded white space, that is, multiple lines with following white space where lines are separated by LF (not CR or LF). The trailing line terminator (CR or LF) is removed.