Wildcards in an email address with qmail?

1.6k views Asked by At

I'm trying to set up an email address in qmail such that a unique identifier can be passed as part of the email address.

For example:

[email protected], [email protected], [email protected] would all go to the 'reply' user and be sent to the same shell script. Currently, email sent to [email protected] goes to the script and I pass the unique id in the subject or message body. Would be grateful for any suggestions. Thanks!

1

There are 1 answers

3
Matt On

In a default qmail setup, you can do exactly what you suggest... anything following a dash is ignored for delivery purposes, so [email protected] will be processed by the .qmail-reply file, where you would presumably send the mail to your script and look at the address to obtain the identifier.

We use this for bounce tracking - if the email is to [email protected], and the sender is [email protected], then the from address is written this way:

[email protected]

And a script flags the address as no good.

EDIT:
I screwed this up a bit - I guess I'm rusty on qmail. The alias thing doesn't work by default as I stated above. To support extensions for [email protected], you need a .qmail-default file in ~bounce.

See the "extension addresses" (section 4.1.5) on LWQ: http://www.lifewithqmail.org/lwq.html