The mail filtering language, or MFL, is a special language designed for writing filter scripts. It has a simple syntax, similar to that of Bourne shell. In contrast to the most existing programming languages, MFL does not have any special terminating or separating characters (like, e.g. newlines and semicolons in shell)10. All syntactical entities are separated by any amount of white-space characters (i.e. spaces, tabulations or newlines).
The following sections describe MFL syntax in detail.
• Comments | Comments. | |
• include | ||
• line | ||
• Generated warnings and errors | ||
• Pragmas | Pragmatic comments. | |
• Data Types | ||
• Numbers | ||
• Literals | ||
• Here Documents | ||
• Sendmail Macros | ||
• Constants | ||
• Variables | ||
• Back references | ||
• Handlers | ||
• Special handlers | Initialization and cleanup handlers. | |
• Functions | Functions. | |
• Expressions | Expressions. | |
• Shadowing | Variable and Constant Shadowing. | |
• Statements | ||
• Conditionals | Conditional Statements. | |
• Loops | Loop Statements. | |
• Exceptions | Exceptional Conditions and their Handling. | |
• Polling | Sender Verification Tests. | |
• Modules | Modules are Collections of Useful Functions. | |
• mfmod | Dynamically Loaded Modules. | |
• Preprocessor | Input Text Is Preprocessed. | |
• Filter Script Example | A Working Filter Script Explained. | |
• Reserved Words | A Reference List of Reserved Words. |
There are two noteworthy exceptions:
module
and from ... import
statements, which must be
terminated with a period. For details, refer to module structure, and import.