← field notes

Inside the Spam Filter: The Oldest Arms Race Online

This morning, before you opened your inbox, a hundred messages were stopped on your behalf. Fake invoices, fake delivery notices, links to places you would never want to go. You never saw any of them, and you never will.

That quiet sorting is the result of a fight that has been running for almost thirty years, longer than most of the apps on your phone have existed. It is the oldest arms race on the internet, and it is also the one we win most often. The strange part is that we win it so completely that almost nobody notices it is happening at all.

The war you never see

Every message that reaches you has already been judged. Before it lands in your inbox, a system has read the sender, the path it traveled, the words inside it, and the history behind all of those things, and it has made a decision in a fraction of a second. Wanted, or unwanted.

Most of the time that decision is right, which is exactly why it feels like nothing. A war that is being won quietly looks like peace. But the moment the filters stopped, your inbox would drown inside a single day, because the people sending that flood never stopped sending it. They simply learned to be invisible to you and visible only to the machine that catches them.

The first rules were simple

In the beginning the defense was almost charmingly basic. Someone noticed that unwanted mail kept using the same handful of words and phrases, so they wrote rules. If a message contains this phrase, or that promise of easy money, score it as suspicious and push it aside.

It worked, for a while. But a fixed rule is a published map. The moment the people sending bulk mail understood which words were being watched, they stopped using those words, or spelled them differently, or broke them apart so a human still read the meaning while the rule saw nothing. A word with a number swapped in for a letter still reads clearly to your eye, but it sails straight past a rule looking for the exact spelling. The lists grew longer and more brittle, and the patches never quite kept up.

Learning what you actually want

The next leap changed everything. Instead of a human writing a list of bad words, the filter learned, from real examples, what unwanted mail tended to look like compared to the mail people actually kept.

The idea was statistical. Show a system thousands of messages people marked as junk and thousands they chose to read, and it builds a sense of probability. These words, this structure, this kind of sender lean one way. Those lean the other. Nobody hands it a rule. It weighs the evidence and estimates the odds that this particular message is something you want.

This mattered because it was personal and adaptive. The things you keep and the things you delete teach your own filter, quietly, over time. It also closed the easy escape. You could dodge a single banned word, but you could not easily dodge the accumulated weight of a hundred small signals all pointing the same direction. To slip past, the sender now had to make their unwanted mail look, statistically, like something genuinely wanted. That is a much harder thing to fake.

The counterattack on the math

So the senders attacked the math itself. If the filter learns from words, drown it in words. Some bulk mail started carrying paragraphs of innocent text, sometimes whole passages from books, hidden in tiny or invisible type, just to tilt the statistics back toward harmless.

Others moved the message out of text entirely. They put their words inside a picture, so the filter reading the letters saw only an image and found nothing to weigh. Then the defenders taught their systems to read the text inside images too, and to treat a message that is mostly one big picture as suspicious on its own. There was a deeper problem the senders could never solve: padding a message with stolen book passages made it stranger, not more normal. A real invoice does not carry three paragraphs of a novel in white text.

Who is really sending this

While that fight ran over the contents of a message, a deeper question was rising underneath it. Not what does this message say, but who actually sent it, and can that even be proven.

The early mail system was built on trust. A sender could simply claim to be anyone, and there was no real check. So a flood arrived wearing the names of banks, of delivery companies, of people you knew, because nothing stopped a stranger from writing your friend’s name on the outside of the envelope.

Three locks on the envelope

The answer was a set of standards for proving a message really comes from where it claims. Think of them as three locks added to an envelope that used to have none.

The first lets a domain publish a list of which servers are actually allowed to send mail in its name, so a receiver can check whether a message came from an approved source or from a stranger. The second attaches a cryptographic seal, a signature tied to the sending domain, so the receiver can confirm the message was not forged or altered along the way. The third ties the first two together and tells receivers what to do when a message fails the check. As a set they took the easiest forgery off the table. Claiming to be your bank stopped being free.

The weight of a reputation

Once you can prove who sent a message, you can start keeping score on them. This is reputation, and it became one of the strongest tools the defenders have.

Every sending source builds a history. How much mail it sends, how often people welcome it, how often people mark it as junk, how long it has existed. A sender with years of good standing glides through. A brand new source with no history and a sudden firehose of identical messages gets held at the door and watched. Reputation turns a single suspicious message into a pattern across time, and patterns are much harder to fake than words.

Stealing a good name

So the senders went after reputation too. If a trusted sender sails through and a stranger gets stopped, then the prize is no longer your own bad reputation. It is someone else’s good one.

This is why hijacked accounts are so valuable to them. A real person’s account, with a long clean history and a domain that passes every authentication check, becomes a launch point. The defenders answer by watching for the moment a trusted account starts behaving unlike itself: a sudden burst, a strange hour, a thousand identical messages where there were never any before. A good name protects you right up until you start acting like a stranger wearing it.

Hundreds of signals at once

Which brings us to where the fight sits today. No single clue decides anything anymore. Modern filtering weighs hundreds of signals together and asks one quiet question. Taken as a whole, does this look like something this person would want.

The words, the sender and its history, the authentication results, the structure, the links and where they really lead, the timing, how similar it is to a wave hitting thousands of inboxes in the same minute, and how people are reacting in real time. A message can pass any one of those tests and still be caught because the whole picture leans wrong. And the system never stops learning, because every time you mark something as unwanted or rescue it from the junk folder, that signal flows back in. Multiply that by billions of people every hour, and the defenders have an always fresh picture of what wanted mail looks like right now.

That asymmetry is the whole story. The sender has to get everything right at once and keep getting it right as the checks shift underneath them. The defender only has to notice one thing that does not fit. The peace you feel when you open your mail is not the absence of a war. It is the sound of one being won, quietly, in the half second before the page loads.


The Hidden Internet takes apart the systems that quietly run the modern web, explained from the inside. No products, just the machinery. Subscribe on YouTube.

watch
The Hidden Internet on YouTube

Every field note starts as a short documentary. Watch the systems in this piece explained on screen.

subscribe →
read on
More field notes

The rest of the series on how the modern internet detects, tracks, and sorts the traffic that reaches it.

browse the archive →