Postfix - 中繼 mydestination 網域內的特定電子郵件地址

Postfix - 中繼 mydestination 網域內的特定電子郵件地址

嘗試在 postfix 上運行時遇到一些問題。

也就是說,我有一個網域abc.com,它是我的 postfix 伺服器上的目標網域1.2.3.4,預設它在本地託管該網域中地址的郵箱 - 直接。

However, I would like to be able to "relay" specific email addresses from within this same domain (say: [email protected]) to another postfix server [5.6.7.8]:2525- yet still retaining the original ability of being able to deliver mail to all other addresses *@abc.comlocally on my original postfix伺服器1.2.3.4.

有人能建議我如何做這件事嗎?

先致謝!

續。

謝謝塔特,到目前為止我實際上已經做了類似的事情,但仍然有一個問題。

所以我有transport文件:

[email protected]  relay:[5.6.7.8]:2525
*@abc.com  local

main.cf

relay_domains = abc.com

此配置按照我的意願發送到完美的中繼,但任何其他位址(在通配符範圍內)都不會被傳遞,因為它們試圖直接返回預設中繼伺服器(完全是另一台伺服器),而我則喜歡他們打/etc/aliases或本地郵箱。

答案1

一種方法是使用交通地圖。在 中main.cf,有一行像

transport_maps = hash:/etc/postfix/transport

然後在transport文件中,

[email protected]  smtp:5.6.7.8:2525

這是按照從最具體到最不具體的順序進行搜尋的,因此如果您想指定其他內容,abc.com可以這樣做

[email protected]  smtp:5.6.7.8:2525
abc.com  smtp:1.2.3.4:25

local傳輸是預設的,所以如果這就是您想要的,則不需要第二行。

相關內容