Next: , Previous: , Up: MFL   [Contents][Index]


4.25 Dynamically Loaded Modules

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:

mfmod_pcre

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.

mfmod_ldap

Functions for searching in LDAP directory. See Mfmod_ldap in Mfmod_ldap.

mfmod_openmetrics

Openmetrics support for mailfromd. See mfmod_openmetrics in mfmod_openmetrics reference.

The subsections below describe the internal structure of an mfmod in detail.


Footnotes

(19)

The actual suffix depends on operating system. It is ‘.so’ on all POSIX systems.