后缀。 发送一些消息使用外部smtp服务器和一些消息“直接”。 问题与sender_dependent_relayhost_maps

我正在configuration一个新的Web服务器,我需要从我的PHP脚本发送电子邮件。 大部分消息应该使用mandrill SMTP发送,有些则直接从我的服务器发送到电子邮件服务。 根据本教程,我在mandrill注册了一个帐户,并configuration了postfix服务器。 我创build了/ etc / postfix / sasl_passwd并编辑了main.cf文件。 我将relayhost设置为mandrill SMTP。

relayhost = [smtp.mandrillapp.com]

如果我尝试发送消息,当postfixconfiguration这种方式 – 所有消息使用mandrill SMTP发送。 我试了一下,它的工作原理。 但正如我所说,我需要一些消息直接发送。 我确定哪些邮件应该使用SMTP发送,哪些邮件直接通过设置不同的发件人(“发件人”)电子邮件地址。 在我提到的教程中,我发现要做我所需要的,我需要使用sender_dependent_relayhost_maps选项并删除relayhost的值。
我使用下面的configuration

relayhost =
sender_dependent_relayhost_maps = hash:/ etc / postfix / relayhost_maps

我创build了/ etc / postfix / relayhost_maps,看起来像这样

[email protected] [smtp.mandrillapp.com]

现在,所有邮件都应该直接发送,除了来自[email protected]的邮件必须使用外部SMTP发送。 问题是,当我尝试发送消息与这个configuration – 所有邮件直接发送(我收到它时,我看到这在Gmail中)。

我尝试在/ etc / postfix / relayhost_maps中放入不同的SMTP主机,不同的邮件地址,但是所有的邮件仍然被直接发送。

请帮我解决这个问题。