Spam filter is a software tool that filters out junk emails.
The reason we need to block spam is because not only are they annoying, but they are also the main medium through which malware spreads. Spam filters provide protection for computers as well as entire networks.
The spam filter works by comparing the incoming emails with the predefined set of rules configured in the spam filter engine. For instance, the subject of the email messages can be checked to see whether they contain any words or combination of words that might be linked to pornography or medicines or other common products used for spamming.
The common method of spam detection uses the Bayesian statistical algorithm and according to this method, the system teaches itself based on the emails that are received. The spam filter would separate the emails into the junk mail folder or into the inbox depending on whether they are spam or not.
The user can later review the emails in the junk mail folder and confirm if they are really spam emails. If not, they can mark those emails as safe and the spam filter would learn based on this action.
Spam filters also have the capability of allowing the users to build custom black and white lists based on email addresses, IP addresses, domains, etc. Users can specify which email addresses the spam filte will always trust and which IP addresses and domains are deemed safe.More security questions & answers