Silencing the Flood of Recruiter Emails with a Domain List

I get a torrent of email from IT recruiters.  There’s the occasional gem; every once in a while someone really does want to get interesting work done on scalable web-facing UNIX platforms.

But the rest is utter dross.

“Your CV came up in our search” they bleat, “we have an excellent opportunity for you to earn £15k+bens per year as a Windows support monkey in the bowels of some godforsaken corporate in Wolverhampton”.  “See what a great favour we’re doing you”.

It isn’t a favour.   They aren’t your mum and they don’t have your best interests at heart.  Some can do a passable impression of competent, empathic human beings (from experience I’d say about 10%) but most are illiterate swaggering liars who don’t have a clue what all those acronyms on your CV mean.  They want your commission and they’ll say anything to get the meat (that’s you) into the grinder.

So this torrent of adverts for jobs I won’t like.  Most are from lazy agents who’ve done a simple keyword search and mass-mailed a tragically effusive “this job is perfect for you!!!!” to any poor soul who came up.  Most turn up just after 6pm because agents believe you just love to get job adverts after a hard day’s work.

“Why not use my nerd-fu powers to filter them” I thought.  Screw it, how many could there be?


So the List…

Turns out they breed like rabbits.

This is a non-exhaustive list of the domains used by IT agents from my email in the last couple of years.  It’s UK-centric but I’ll add suggestions from other countries.  Global namespaces FTW.

You can download it from GitHub.


How to Use it?

Turn the list into a set of filtering rules in your favourite mail client.  For me it’s a joy incorporated into a sieve ruleset on my server.  As for the all-important gmail – I can’t find any way to import a bunch of pre-made rules.  Shout if you have an idea.

Unless you plan to be in your current job forever I wouldn’t suggest routing them all to /dev/null.  Tag them and file into a “jobs” folder to plough through whenever you’re on a long journey.

Here’s a trivial python script to compile that list into a sieve rule:

#!/usr/bin/env python
f = open('recruiter_domains.txt')
doms = filter( lambda d: len(d)>2, f.readlines() )
doms = map( lambda d: '"*@' + d.strip() + '"', doms)
print "# " + '-'*70 + "\n#   Filter messages from recruitment consultants"
print "#   needs require \"fileinto\"; and require \"regex\"; at top of script\n# " + '-'*70 + "\n"
print "if address :matches \"from\" [\n  " + ', '.join(doms) + "\n  ] {\n    fileinto \"recruiters\";\n}\n\n"


Disclaimer: I’m not responsible for, uh, anything.  Ever.  If this list of domains burns your house down it ain’t my fault.

What if you really do want to block them from your own domain?  If you run Postfix try this:

sed 's/^\(.*\)/\1     REJECT  Agencies not welcome at this domain/' recruiter_domains.txt > /etc/postfix/recruiters
echo "smtpd_sender_restrictions = hash:/etc/postfix/recruiters" >> /etc/postfix/
postmap hash:/etc/postfix/recruiters
/etc/init.d/postfix reload

Sorted: any email from a domain in that list will bounce.  Buh-bye, ill-paid “opportunities” in crap towns hundreds of miles away.


2 thoughts on “Silencing the Flood of Recruiter Emails with a Domain List

  1. I forgot to ask here, why don’t you just turn it into a dnsbl (so publish records “recruiter.domain.your.domain IN A”) or similar – so that it can just be queried directly, rather than distributing it as a text file.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.