Home > Thoughts and Ideas > Semi-Wildcarded Mail Addressing

Semi-Wildcarded Mail Addressing

January 9th, 2011 Leave a comment Go to comments

From time to time I think about tricks for managing e-mail, and the other day I came up with an idea I hadn’t seen in practice before. I doubt it’s an original idea, but it seemed interesting to try and implement.

Most people end up using the same e-mail address everywhere, like chip@2bithacker.net. This is easy, it works, and it’s how e-mail was intended to be used in the first place. But you give it to some bad eggs and they sell it to some spammers and now you start getting junk to that address. So what do you do?

In the past, I’ve tried to use local-part extensions to identify who I gave the address to. These are usually things like chip+facebook@2bithacker.net, which many mail servers will treat just like mail sent to chip@2bithacker.net, but you can then filter on the +facebook part. Unfortunately, this is well understood by the spammers as well, so they can easily strip off the +facebook part and go about their business as usual. Also, there are websites out there that don’t think a + can be in an e-mail address, so they won’t accept it. There are various ways around this, of course. One could reconfigure their mail server to use a different characters, such as a dash or period, or even some letter if you wanted to be weird.

I’ve also seen people use virtual domain wildcarding to send any local-part at their domain to a default mailbox. In this case, you could just tell Facebook that your e-mail is facebook@2bithacker.net and it would still wind up in your inbox, and you’d know if Facebook gave your e-mail out to others if you start seeing non-Facebook e-mail coming in to facebook@2bithacker.net. This isn’t great though, as spammers regularly probe addresses trying to find common names to spam at, and with wildcarding, anything @2bithacker.net becomes a valid e-mail address to you.

So I had an idea, mostly building on the second use-case, but with some smarts added in. When signing up for a site, say Facebook, give them an e-mail address of facebook@2bithacker.net as above, but with your mail server configured such that mail to facebook@2bithacker.net is only accepted if facebook appears in the sender’s domain name. So mail to facebook@2bithacker.net is allowed from update@facebookmail.com, but mail from spammer@buystuffnow.com isn’t. In the latter case, the server will send back a 5xx error code just as if the address isn’t valid.

I’ve been trying to come up with a catchy name for this technique, something better than “semi-whitelisting” and I think Sender Domain Local-Part, or SDLP for short, might make sense.

It should be pretty trivial to implement as a Postfix policy server, and I’m working on a reference implementation there to try it out. I suspect it’d be pretty easy to do in Exim as well. I’ll try to remember to post again once I get it working.

Categories: Thoughts and Ideas Tags: ,
  1. Jeremy
    January 9th, 2011 at 09:10 | #1

    Neat idea, I’d use something like that for all the local parts with the exception of a single one which would allow any sender domain.

  2. Cole
    January 9th, 2011 at 09:48 | #2

    Hmm – sounds like an interesting approach. I can see this working well for a quasi private zone, but a little tougher for one where there are multiple users. I wonder how easily this could be implemented with localpart extensions.

  3. January 10th, 2011 at 10:28 | #3

    Nice! I’ve been using a platoon of gmail addresses that I have for signing up for various websites and forums. I have them all dump to a single one and only check it if I’ve signed up for something and need any “activation email” they might send. Keeps my real inbox tidy and puts the burden on gmail to do the filtering, which they’re not half bad at. Friends and family get the real email address, websites get my gmail.

  1. No trackbacks yet.

Performance Optimization WordPress Plugins by W3 EDGE