February 24, 2004
Using QMail for spam-tracking

1.5 years ago (to the day) I posted a rant about email addresses with a + being valid. I've received a lot of comments and feedback on this posting (including several knowledgeable people posting about the RFC and more).

Today I got some questions about how this is implemented in QMail, and therefore, here's some more detail:

(anyone not interested in techie nitty gritties, feel free to skip the rest ;-) )

Qmail, as set up on my mail server, uses .qmail-{...} files in the users' home directories to configure additional mail addresses.

For example, I can set up an email address called

by creating a file in my home directory called
Qmail also allows for default postfixes, e.g. I can route all "andersja+2004" email by using .qmail-2004-default.

I use a .qmail-default which routes all unknown addresses through a spam filter and then on to my mailbox:

$ cat ~/.qmail-default
|preline procmail -Yf- .procmailrc-spam
If an address goes bad (e.g. if it's stolen, abused, sold, spammed to, whatever) I'll set up a .qmail-{something-specific} to bounce email sent to that address. As an example, my entry for email from dialpad.com looks like this:
$ cat .qmail-dialpad
|bouncesaying 'This address no longer accepts mail. Anders can be reached at www.jacobsen.no'
Do something similar at your own risk...

Sponsored links
Related Entries

I didn't realize that .qmail-default is a proper catch-all for local users. Brilliant. :-)

Posted by: Steff on February 24, 2004 03:38 PM

Glad I could be of help :-)

Posted by: Anders on February 24, 2004 04:24 PM

BTW... here is the sendmail.cf hack to make plussed users work.

# deal with plussed users so aliases work nicely --pel
R$+ + * $#local $@ $&h $: $1
R$+ + $* $#local $@ + $2 $: $1 + *

it's been a while since i wrote that... so i'm trusting my comments indicates the correct section of code. ;)

Posted by: Philip on November 18, 2004 04:43 PM

BTW... I know I had researched how to program that code in sendmail, but I believe I then copied that standard code from someplace else.

Also, I just found:

which deals with several MTAs, although the document is a bit old (1998).

Posted by: Philip on November 18, 2004 05:33 PM
Post a comment

(Will not be displayed if you enter a website below. Otherwise, it will be displayed "spam protected")

(if you have one)

What do you want to say?
(please don't bother posting "spam" (pornography, viagra-sales etc - I will delete such comments anyway))

Remember info?

Referrers to this page
TrackBack URL for this entry:

[an error occurred while processing this directive]

© Anders Jacobsen
[extrospection.com photography]