开发者

Wildcards in an email address with qmail?

开发者 https://www.devze.com 2022-12-15 04:29 出处:网络
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.

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:

reply-123@example.com, reply-345@example.com, reply-99999@example.com would all go to the 'reply' user and be sent to the same shell script. Currently, email sent to reply@example.com goes to the script and I pass the unique id in the subject or mess开发者_如何学运维age body. Would be grateful for any suggestions. Thanks!


In a default qmail setup, you can do exactly what you suggest... anything following a dash is ignored for delivery purposes, so reply-anything@example.com 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 xyz@example.com, and the sender is bounce@sender.com, then the from address is written this way:

bounce-xyz=example.com@sender.com

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 bounce@sender.com, you need a .qmail-default file in ~bounce.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消