qmail 电子邮件地址中的通配符?
我正在尝试在 qmail 中设置一个电子邮件地址,以便可以将唯一标识符作为电子邮件地址的一部分传递。
例如:
[电子邮件受保护]、[电子邮件受保护],[email protected] 都会发送到“回复”用户并发送到相同的 shell 脚本。目前,发送到 [email protected] 的电子邮件将转到脚本,我通过主题或邮件正文中的唯一 ID。如有任何建议,将不胜感激。谢谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在默认的 qmail 设置中,您可以完全按照您的建议进行操作...出于传递目的,破折号后面的任何内容都会被忽略,因此 [email protected] 将由 .qmail-reply 文件处理,您可能会将邮件发送到脚本并查看地址以获取标识符。
我们用它来跟踪退回邮件 - 如果电子邮件发送至[电子邮件受保护] ,发件人为 [email protected],则写入发件人地址这样:
[email protected]
和一个脚本将地址标记为不好。
编辑:
我搞砸了一点——我想我对 qmail 已经生疏了。正如我上面所说,默认情况下别名不起作用。要支持 [email protected] 扩展,您需要 .qmail-default文件〜bounce。
请参阅 LWQ 上的“分机地址”(第 4.1.5 节):http://www.lifewithqmail.org /lwq.html
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