Topic summary
Spam filter

Extracted from the Wikipedia article Email filtering.
Customization
Mail filters have varying degrees of configurability. Sometimes they make decisions based on matching a regular expression. Other times, code may match keywords in the message body, or perhaps the email address of the sender of the message. More complex control flow and logic is possible with programming languages; this is typically implemented with a data-driven programming language, such as procmail, which specifies conditions to match and actions to take on matching, which may involve further matching. Some more advanced filters, particularly anti-spam filters, use statistical document classification techniques such as the naive Bayes classifier while others use natural language processing to organize incoming emails. Image filtering can use complex image-analysis algorithms to detect skin-tones and specific body shapes normally associated with pornographic images.