Spam emails
A software developer has invented a bot that annoys spammers until they stop sending emails iStock

Two years ago, Brian Weinreich, the co-founder and head of product at Density, an Internet of Things (IoT) sensor startup, got so fed up of receiving spam emails from his business email account that he decided to teach a lesson to all future spammers who tried to contact him.

Weinreich considers spam to be as intrusive and unpleasant as people you don't know stalking you in order to sell you something, who won't stop pestering you even when you tell them you're not interested, so he decided to build a solution that would waste spammers' time in revenge.

"Back in early 2015, I decided I had enough. It became clear to me: it's my job to stop spam. That 'Spam' button on Gmail just didn't get me going anymore. There's no reward. I was seeking revenge.. and some comedic relief," Weinreich wrote in a blog post on Medium.

"I figured if I could eat up a spammers time, then they would have less time to perfect their new spamming technique."

Sp@m Looper

Spam Bot
Spam Bot is available on GitHub for anyone to download, use or improve upon Brian Weinreich

So he invented the Sp@m Looper, a bot whose primary function is to respond to spam emails with a series of open-ended questions that seem like they could be a real person's response to an email enquiry.

Unfortunately, the very first email you receive from any unique spammer will still go into your inbox, but once forwarded to sp@mlooper.com, the bot then takes action and continues to automatically respond to all emails from same spammer's email address until the spammer decides to stop sending you emails.

Weinreich developed the bot and put it to work on an email address he specifically created for a non-existent man named "John Turing", who is the founder and chief executive of a fictitious company called MLooper. He soon found that spammers were actually tricked into exchanging at least five emails with the bot before they realised that they weren't talking to a real person.

Bot managed to negotiate discounts

This continued even when he changed the script to insert random "hipster words" at the end of the emails, which made it even clearer that the emails weren't coming from a human being, and – at one point – the bot even managed to negotiate a good discount on some software a spammer was hawking.

"I think one of the most interesting findings I had was the fact that after the first month, I didn't have to feed the Looper anymore," wrote Weinreich. "People were just spamming it on their own. It was miraculous. It reminded me a lot of the Hydra  – the more people the Sp@m Looper responded to, the more spammers it attracted."

Weinreich has compiled some of the funny email exchanges for people to read on MLooper.com, and he has also made the code available on GitHub so that anyone can download it to run their own version or to improve on the bot to make it even more annoying, sorry, efficient.