Next: Preprocessor, Previous: Modules, Up: MFL [Contents][Index]
Native mailfromd modules described above rely on the functions
provided by the mailfromd
binary. For more sophisticated
tasks you might need to use C functions, either for efficiency reasons
or to make use of some third-party library. This is possible using
special kind of modules called mfmod.
An mfmod consists of two major parts: a dynamically loaded library that provides its main functionality and a small interface mailfromd module. The convention is that for the module x the library is named mfmod_x.so19, and the interface module file is x.mfl.
At the time of this writing, three mfmods exist:
Provides support for Perl-compatible regular expressions. It also contains a special function for scanning an email message for a match to a regular expression. See Mfmod_pcre in Mfmod_pcre.
Functions for searching in LDAP directory. See Mfmod_ldap in Mfmod_ldap.
Openmetrics support for mailfromd
. See mfmod_openmetrics in mfmod_openmetrics reference.
The subsections below describe the internal structure of an mfmod in detail.
• Loadable Library | ||
• Interface Module | ||
• mfmodnew | Creating a Mfmod Structure |