Simple_MIME

Top  Previous  Next

Example projects > Complete mail parsers > Simple_MIME

 

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

  | DIGITS

  | STRING

  | PUNCTUATION

  | SPECIAL

  | NBSP  

 

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:

 

 

WORD

{{

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.