Answers:
好吧,我似乎已经设法通过一些搜索和测试来解决这个问题。这是我必须要做的:
在/etc/postfix/main.cf中:
transport_maps = hash:/etc/postfix/transport smtp_sasl_auth_enable = yes smtp_sasl_password_maps = static:<relayhost username>:<relayhost password> smtp_sasl_security_options = noanonymous smtp_tls_security_level = may start_tls = yes
在/ etc / postfix / transport中:
localhost discard: localhost.localdomain discard: * relay:[smtp.relayhost.com]:587
中继显然也绕过了alias_maps指令,因此要使别名继续工作,我必须注释掉alias_maps和alias_database,并用virtual_alias_maps替换它们。virutal_alias_map的格式与alias_maps相同,因此很容易进行更改。
完成这些更改后,只需重新启动postfix并运行“ postmap / etc / postfix / transport”即可构建transport.db。现在,寻址到@localhost或@ localhost.localdomain的所有内容都将被丢弃,而其他所有内容都将通过指定的主机进行中继。
/etc/postfix/main.cf
2.添加default_transport = discard:Outgoing email disabled on this node
3.重新启动Postfix:service postfix restart
* areload
可能就足够了