int smfi_register( smfiDesc descr );
Register a set of filter callbacks.
|Called When||smfi_register must be called before smfi_main|
|Effects||smfi_register creates a filter using the information given in the smfiDesc argument. Multiple (successful) calls to smfi_register within a single process are not allowed, i.e., only one filter can be successfully registered. Note, however, that the library may not check whether this restriction is obeyed.|
|descr||A filter descriptor of type smfiDesc describing the filter's
functions. The structure has
the following members:
A NULL value for any callback function indicates that the filter does not wish to process the given type of information, simply returning SMFIS_CONTINUE.
smfi_register may return MI_FAILURE for any of the following reasons:
- memory allocation failed.
- incompatible version or illegal flags value.
The xxfi_flags field should contain the bitwise OR of zero or more of the following values, describing the actions the filter may take:
|SMFIF_ADDHDRS||This filter may add headers.|
|SMFIF_CHGHDRS||This filter may change and/or delete headers.|
|SMFIF_CHGBODY||This filter may replace the body during filtering. This may have significant performance impact if other filters do body filtering after this filter.|
|SMFIF_ADDRCPT||This filter may add recipients to the message.|
|SMFIF_ADDRCPT_PAR||This filter may add recipients including ESMTP args.|
|SMFIF_DELRCPT||This filter may remove recipients from the message.|
|SMFIF_QUARANTINE||This filter may quarantine a message.|
|SMFIF_CHGFROM||This filter may change the envelope sender (MAIL).|
|SMFIF_SETSYMLIST||This filter can send a set of symbols (macros) that it wants.|