|Top Previous Next
The name "Simple_MIME" deceives. This parser is simple only in comparison with the detailed MIME parser from which Simple_MIME was extracted. Changes on the syntactic structure of the parser. can be recommended only for experienced experts of the TextTransformer. What should, however, be possible for more users of the IMP filter is a semantic expansion of the project, so that it carries out a classification into spam or not spam in accordance with individual criteria. At first the Simple_MIME parser does nothing in this regard. It is a bare scaffolding which requires the expansion.
To program such spam tests, basic knowledge of the TextTransformer still is necessary. But then the classification criteria are unlimited, because all information of the e-mail can be accessed in principle.
The most important position where a spam test can be installed is the text_element-production:
WORD us the same token for the recognition of words, which already has been used by another project.
WORD ::= [[:alpha:]]+
E.g. the recognized content can be compared with a spam word in the following way:
if(xState.str() == "Spamword")
m_iResult = -1;
The text_element-production can easily be supplemented with other alternatives, e.g. to identify and classify links or email addresses.
The other tokens of the text-production are necessary to have a recognition alternative for all existing characters.