定义“消息处理程序".在Postfix中 [英] Defining a "messagle handler" in Postfix

查看:72
本文介绍了定义“消息处理程序".在Postfix中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用Postfix进行邮件传递,我正在尝试使Shell脚本处理发送到foo-bar-baz-bat@example.org的电子邮件.

有办法做到吗?

我正在尝试为公告板创建基于电子邮件的前端.用户分为两个派系:那些想使用论坛的人和那些喜欢使用邮件列表的人.这个想法是要创建一个解决方案,该解决方案将通过发送有关新帖子的电子邮件通知(这是很容易的一部分)并使两个小组都满意的,并且还允许人们通过电子邮件发帖,其中元数据(例如主题ID)将被编码在其中.电子邮件地址.

解决方案

在/etc/aliases

您应该能够为脚本这样的别名

foo-bar-baz-bat@example.org: |"/path/to/ScriptOrExecutableHere"

我是在Trac安装过程中做到这一点的,它就像一个魅力……

哦...我没有意识到您将要为动态地址添加别名...我认为您需要一个脚本来为创建论坛主题的电子邮件地址添加别名...

实际上,您也许可以将包包用于类似这样的事情...

我还没有做过,但是您可以在命令中使用别名"@ example.org".

有关详细信息,请参见此处.

We are using Postfix for mail delivery and I am trying to make a shell script handle an email sent to foo-bar-baz-bat@example.org.

Is there a way to do this and how?

I am trying to create an email-based front-end for a bulletin board. The users have split into two factions: those who would like to use the forum and those who prefer using mailing list. The idea is to create a solution that would please both groups by sending an email notification about the new post (this is the easy part) and also allowing people to post via email, where the metadata (such as topic id) would be encoded in the email address.

解决方案

in /etc/aliases

you should be able to alias to a script like so

foo-bar-baz-bat@example.org: |"/path/to/ScriptOrExecutableHere"

I did this with my Trac installation and it worked like a charm...

EDIT: Oh...i didn't realize you were going to be aliasing dynamic addresses...I think you'd need a script to alias the e-mail addresses as forum threads are created...

EDIT2: Actually you might be able to use the catchall for something like this...

I haven't done it but you would alias "@example.org" to the command. See here for more

这篇关于定义“消息处理程序".在Postfix中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆