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

andersja+2004-02-24@example.com
by creating a file in my home directory called
.qmail-2004-02-24
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
./Mailbox
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
Comments

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:
http://www.faqs.org/faqs/mail/addressing/

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
Name:


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


Website:
(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:
http://www.jacobsen.no/cgi-sys/cgiwrap/anders/MT/mt-tb.cgi/757

16841 visits (1 today, 8 this week)

© Anders Jacobsen
[weblog / photography]