如何配置Postfix在某些域中忽略Relayhost?


10

有没有一种方法可以在Postfix中忽略relayhost

我有类似的东西

relayhost = [smtp.domain.net]:587

现在,对于某个域,我不想将其发送到该中继,而仅希望从该计算机发送。

我必须如何配置Postfix来做到这一点?

Answers:


14

main.cf
#relayhost = [smtp.domain.net]:587
transport_maps =哈希:/ etc / postfix / transport

/ etc / postfix / transport
domaintodeliverdirectyto:
* smtp:[smtp.domain.net]:587

别忘了 postmap /etc/postfix/transport

可能要使用relay而不是smtp作为运输机械。
供参考http://www.postfix.org/transport.5.html

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.