Email Classification: Rule-Based vs Machine Learning
7 min read
Email classification is the task of assigning each incoming message a category — receipt, newsletter, subscription renewal, delivery update, personal. There are two established approaches to building an email classifier, they fail in opposite ways, and the difference decides how much trust the result deserves.
What an email classifier works with
A classifier sees more signal than the text. Sender address and domain, subject line, body content, headers describing the sending system, whether there are attachments, and how you have treated similar messages before.
The categories matter as much as the signal. Useful ones describe what a message is for — something to act on, a receipt to keep, a renewal to decide about — rather than what topic it concerns.
Rule-based classification
Explicit conditions written in advance: if the sender domain is this and the subject contains that, label it a receipt. This is what mail-client filters do.
Its strengths are real. It is completely predictable, you can read a rule and know exactly what it will do, and when it misfires you can see why and fix it in seconds. For a handful of high-volume senders it is hard to beat.
It breaks on change. Rules match surface features, and surface features move — a sender switches domain, a template is redesigned, a company renames its notification emails. The rule stops matching and reports nothing, so a silent failure looks exactly like no mail arriving.
Machine learning classification
Instead of writing conditions, train a model on examples. The model learns which combinations of features predict which category, including patterns nobody would think to write down.
It generalises to messages it has never seen, which is the whole point — a receipt from a merchant absent from the training data still looks structurally like a receipt. It also degrades gracefully: a redesigned template usually still classifies correctly because the model is not matching one exact string.
The costs are opacity and confident errors. When a model misclassifies, there is often no single readable reason, and a model will assign a wrong category with the same confidence as a right one.
What accuracy actually means here
A single accuracy percentage hides the thing that matters, because the two error types have very different costs. A newsletter wrongly filed as a receipt is noise. A flight change wrongly filed as a newsletter is a missed flight.
So judge a classifier by what it does with uncertainty. A system that surfaces a message it is unsure about is more useful than one with higher raw accuracy that silently buries the cases it got wrong.
Why production systems use both
In practice the two approaches are complementary. Rules handle the structured, high-volume, unambiguous cases — a known payment processor sending a known receipt format — cheaply and predictably. The model handles everything else, which is the long tail where rules would need constant authoring.
Kite uses an AI classifier to sort each email into a semantic category — receipts, packages, travel, job search and the rest — rather than asking you to write and maintain rules yourself.