Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Counting how often an email alias is used



Bill Horne wrote:
> One of the nicest things about having my own server is that it gives me
> an inexhaustible supply of throwaway email addresses. However, my
> /etc/aliases file has grown to the point that it's no longer convenient
> to manage....

1. Use address extensions, not system-wide aliases.
2. Use a database.

I have an experimental MySQL stored procedure that gets used by both 
Postfix and Dovecot Deliver to qualify mailboxes and map them to a file. 
It handles multiple levels of extensions, and searches for a match from 
specific to generic. So for example, an address like user-ads-amazon 
will first try and see if there is a mailbox matching the full string, 
then user-ads, then user. (I believe qmail implemented the same thing 
eons ago.)

Still needed is some UI to list and manage the extension-to-mailbox 
mapping, and the ability to invalidate an extension (send it to 
/dev/null) if it gets abused. I'd like to add a comment field to the 
record as well, so the user can record a reminder of what the alias was 
created for.

Currently you can make up addresses on the spot, which is convenient, 
but a fairly simple change could be made so that every extension has to 
be pre-declared, thus preventing spamming to user-<random> from ending 
up in the general inbox.


> ...and I'd like to count when each alias is used.

You mean count each time an email is received for a given address? Post 
processing MySQL logs, or having the stored procedure update a counter 
would do it. You can also grep your archives, if your MTA preserves the 
original recipient in the Delivered header.

I have an anti-spam SMTP proxy that counts address use, but only for 
addresses that are invalid (as it is looking for common spam client 
behavior of sending mail to bogus addresses).

  -Tom

-- 
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/






BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org