United States-English |
|
|
HP-UX Reference > Ssmfi_addheader(3N)HP-UX 11i Version 3: February 2007 |
|
NAMEsmfi_addheader() — adds a header to the current sendmail message SYNOPSIS#include <libmilter/mfapi.h> int smfi_addheader( SMFICTX *ctx, char *headerf, char *headerv ); PARAMETERSsmfi_addheader() includes the following arguments:
DESCRIPTIONsmfi_addheader() adds a header to the current message. smfi_addheader() can be called only from the xxfi_eom() function. Notessmfi_addheader() does not change existing headers of a message. To change the current value of a header, use the smfi_chgheader() routine. A filter that calls the smfi_addheader() must set the SMFIF_ADDHDRS flag in the smfiDesc_str structure passed to the smfi_register(). For the smfi_addheader() filter, the order in which filters are placed is important. Filters placed later in the sequence will observe the changes already done by the earlier filters. The name and the value of the header are not checked for standards compliance. However, each line of the header must be under 2048 characters. If longer headers are needed, multi-line header must be used. To make a multi-line header, insert a line feed (ASCII 0x0a, or \n in C) followed by at least one whitespace character, such as, a space (ASCII 0x20) or tab (ASCII 0x09, or \t in C). The line feed must not be preceded by a carriage return (ASCII 0x0d); the MTA adds this automatically. It is the responsibility of the filter writer to ensure that standards are not violated. RETURN VALUEsmfi_addheader() returns MI_FAILURE due to the following reasons:
smfi_addheader() returns MI_SUCCESS on success. EXAMPLESFollowing is an example to add a header: int ret; SMFICTX *ctx; ... ret = smfi_addheader(ctx, "Content-Type", "multipart/mixed;\n\tboundary='foobar'"); SEE ALSOsmfi_chgheader(3N), smfi_insheader(3N), smfi_addrcpt(3N), smfi_delrcpt(3N), smfi_replacebody(3N). Sendmail 8.13.3 Programmer's Guide on docs.hp.com. |
Printable version | ||
|