BlackDog Foundry Bookmark This page

Many sites want you to register a “free” userid just to do the most mundane thing (such as downloading a file, viewing a picture, etc). While I don’t have a problem with that requirement in general, I am often quite sceptical about what they plan to do with my userid.

Plussed Email Addressing

There is a common technique that many people use where they create a site-specific version of their email address (I believed it is often called plussed email addressing). For example, let’s say that my actual address is and I wanted to signup to flickr, I could create an email address called and use that (and tell my mail server to forward all email to that address to my real address). The nice thing about this is that if flickr is naughty (not that I am suggesting they are) and sells/gives my email address to spammers, I can immediately determine that by looking at who the email was addressed to.

The problem with this approach is that I have to go into my mail server ahead of time and manually create each site-specific email address. That is a bit of a hassle, and I am sure that I can get away with a simpler approach.

So, given that I am using a combination of qmail and vpopmail to manage my mail server, how might I configure them to do what I want?

Can qmail help?

Looking at the qmail documentation, I see that the suggested mechanism is to manipulate a file called /home/craig/.qmail-xxx, where xxx is the site-specific alias I want. For example, .qmail-flickr would match any email coming to However, this still means that I have to manually create explicit files for every site I want to sign up to. There is another special variant of this file called .qmail-default, which is the catch-all for all addresses that don’t have a specific .qmail-xxx that matches the incoming mail. It looks like this is the guy I want because it should mean I don’t have to keep creating explicit files.

However, as I am using vpopmail to manage multiple domains, the default .qmail-default file location will not work because qmail doesn’t deliver the mail directly to my /home/craig mailbox. Instead, it hands all mail to vpopmail who then decides which virtual domain and virtual user to deliver it to.

What about vpopmail?

So, looking at the vpopmail configuration files, I found one called /home/vpopmail/domains/ This is the catch-all configuration file for all mail delivered to the virtual domain.

vpopmail supports a subtle variation on this file that incorporates the user’s email address. I created a file called: /home/vpopmail/domains/ and added the following:

| /home/vpopmail/bin/vdelivermail ''

Note that the above line contains two single quotes ('), not a double-quote (")

What this does is forward all mail that is addressed to to A quick restart of qmail (/var/qmail/bin/qmailctl restart) and I was set to go. So, now I can dynamically make up as many combinations of as I like without having to create individual .qmail-xxx files ahead of time.

One thing that you need to be conscious of, though, is that now if spammers send mail to,,, then all that will come through to my inbox, whereas it used to just get thrown away. I think I can live with that, though.

Note This is a re-post of an old blog entry I made years ago on wordpress. I just wanted to keep it up-to-date on my current blog.

Leave a Comment »


Copyright © 2012 BlackDog Foundry