postfix 不依赖来自远程主机的邮件

use*_*677 3 postfix

我有以下后缀配置:

 smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated
 myhostname = d*****.net
 alias_maps = hash:/etc/aliases
 alias_database = hash:/etc/aliases
 virtual_alias_maps = hash:/etc/postfix/virtual
 mydestination = d*****.net, gitlab, localhost.localdomain, , localhost
 relayhost =
 mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
Run Code Online (Sandbox Code Playgroud)

以及以下 dovecot 10-auth.conf:

disable_plaintext_auth = no
Run Code Online (Sandbox Code Playgroud)

这是我的邮件日志:

 Jun 11 14:34:24 D***** postfix/master[13209]: warning: process /usr/lib     /postfix/smtpd pid 1025 exit status 1
 Jun 11 14:34:24 D****** postfix/master[13209]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
 Jun 11 14:35:24 D****** postfix/smtpd[1132]: fatal: in parameter smtpd_relay_restrictions or smtpd_recipient_restrictions, specify at least one working instance of: reject_unauth_destination, defer_unauth_destination, reject, defer, defer_if_permit or check_relay_domains
Run Code Online (Sandbox Code Playgroud)

我要做的就是为 SMTP 启用纯文本用户名/密码授权。任何建议如何实现这一点?谢谢!

小智 6

Postfix 询问收到不是您域的电子邮件时该怎么办。

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination

这应该有效,它还可以防止您为垃圾邮件发送者中继邮件。