Eighteen Years of Greytrapping – Is the Weirdness Finally Paying Off?

A retrospective on nearly two decades of fighting spam using the Greytrapping technique on OpenBSD, marking a milestone where the number of spamtraps exceeded the population of Norway.
© 2025 Peter N. M. Hansteen
With the imaginary friends, also known as spamtraps, now more numerous than the inhabitants of their virtual landlord's home country, a greytrapping retrospective is in order.
Friends, it finally happened. On August 7th, 2025, the number of spamtraps intended to woo the unwary spammer rolled past the number of inhabitants in my home country of Norway, as tallied by the official statistics compiled by Statistisk Sentralbyrå, also known as Statistics Norway.
After the morning run that day, the number of spamtraps (imaginary friends) stood at 5,620,384, inching past the country's total population of 5,601,049. And yes, the first number is likely to have increased when you read this. Under normal circumstances, the second will likely move a bit in the near future too. To mark the occasion, I present to you the retrospective that some correspondents have been asking for in response to some recent mail related articles of mine.
Greytrapping at nxdomain.no, also known as bsdly.net and a few other domain names, has been a long running experiment. I had been running a mail service for my own and my colleagues' benefit for some years already when I converted that setup stepwise from a Debian Linux setup to one involving OpenBSD hosts as the outer line of defense and a mix of FreeBSD, OpenBSD and other hosts in an environment not unlike what is described in some of the rather basic configurations described early on in the PF tutorial and later The Book of PF.
Soon after converting the outer defense at that site to an OpenBSD one running a basic PF ruleset, I introduced the then blocklist-importing and greylisting only spamd, and experienced that the fan noise coming from the mail server, obviously burdened by performing content filtering, just stopped immediately, only to occasionally rise to just a quiet murmur for the rest of that server's service life.
I did not retain records of when I did that conversion, but my original PF presentation slides from January 2005 describes a spamd setup with greylisting as well as imported lists from spews and spamhaus, which is a strong indication that I had had that running for a while at that point.
Greytrapping was only introduced a little later, but when the feature became available I was ready and eager to put it into production as soon as at all possible. I went on to initiate the greytrapping experiment some time in 2007 and announced to the world in the article "Hey, spammer! Here's a list for you!" on July 9, 2007.
Looking back to the mid-noughties, the most significant change I see is that back then, people did this sort of thing. Even for small organizations, it was entirely normal to set up their own, in-house mail service as soon as they had some sort of Internet connectivity available. In the years since then, the Internet in general, and SMTP email in particular, has been centralized to a degree we would not have considered even imaginable back in the mid-noughties.
We call it The Cloud, but as we all know it's really about running your stuff on other people's computers, and in the email case, the centralization is even more extreme. If you are considering setting up your own mail service, my main recommendation to you is to get Michael W. Lucas' 2024 book "Run Your Own Mail Server", read it from cover to cover, and do what the man says.
What I saw as the main attraction of the greylisting and greytrapping combo back in the day and even still do, was and is that a set of actually quite simple network-level tricks and a tending-towards-pedantic interpretation of the SMTP protocol specification could have such a dramatic effect on the amount of work involved in running a sane mail service.
Source: Hacker News











