我正在寻找configuration后缀路由消息到不同的继电器根据主题行的内容。
希望的结果是,如果用户发送带有特定标签的出站电子邮件,并在主题行的开始处说出“SECURE:”,它将转发给一个中继(1.1.1.1),但是如果未指定该标签,则该消息将交付另一个中继(2.2.2.2)。
我已经调查了邮件过滤之前和之后的邮件检查,以及后缀代理,但是我一直无法确定如何根据邮件内容完成邮件路由的改变(这似乎是一件相当简单的事情)。
我可能希望涉及procmail这个任务,但希望从哪里开始的一些帮助。 任何人都可以协助
如果我正确理解了手册,可以使用FILTER transport:destination
标题检查来实现此FILTER transport:destination
。
从手册的header_checks部分 :
The transport name specifies the first field of a mail delivery agent definition in master.cf; the syntax of the next-hop destination is described in the manual page of the corresponding delivery agent.
在你的情况下, 这将是 smtp:1.1.1.1
所以完整的configuration:
在main.cf中:
header_checks = regexp:/etc/postfix/header_checks relayhost = 2.2.2.2
在header_checks中:
/^Subject: SECURE:/ FILTER smtp:1.1.1.1
我还没有testing过。