后缀为网关

我遵循这个指南逐字:
http://www.postfix.org/STANDARD_CONFIGURATION_README.html#firewall

但是,它会导致本地邮件进入[email protected] 。 如果我将/etc/postfix/virtual那一行更改为: root [email protected]那么它会到达我,所以问题解决了吗?

问题是从外面来的任何人都可以发送到root ,然后到达我。 我一直想弄清楚如何在本地发布邮件到root[email protected]同时防止外部连接这样做。

没关系,我明白了。 基本上,下面是允许本地发布的邮件被接受,而拒绝来自外部的同一封邮件。

在main.cf中:

 smtpd_recipient_restrictions = permit_mynetworks check_recipient_access hash:/etc/postfix/recipient_access reject_unauth_destination 

在/ etc / postfix / recipient_access中:

 [email protected] REJECT 

激活它:

 postmap /etc/postfix/recipient_access service postfix reload