content_filter 之前的 Postfix permit_sasl_authenticated

content_filter 之前的 Postfix permit_sasl_authenticated

我有一个 postfix + dovecot + spamassassin 设置,效果很好,但我想绕过垃圾邮件过滤的所有外发邮件(sasl 身份验证)。我肯定做错了什么,因为我已经permit_sasl_authenticated在我的系统中实现了它main.cf,但看起来它不起作用。

我的 main.cf 相关部分:

# SASL Auth for SMTP relaying
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_authenticated_header = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = ...
broken_sasl_auth_clients = yes

# DKIM
milter_default_action = accept
milter_protocol = 6
smtpd_milters = unix:/var/run/opendkim/opendkim.sock
non_smtpd_milters = unix:/var/run/opendkim/opendkim.sock

# transports
dovecot_destination_recipient_limit = 1
local_recipient_maps = proxy:pgsql:/etc/postfix/pgsql/virtual_mailbox_maps.cf
virtual_transport = lmtp:unix:private/dovecot-lmtp

# restrictions
smtpd_relay_restrictions =
    permit_mynetworks
    permit_sasl_authenticated
    defer_unauth_destination

smtpd_recipient_restrictions =
    permit_mynetworks
    permit_sasl_authenticated
    reject_non_fqdn_hostname
    reject_non_fqdn_sender
    reject_non_fqdn_recipient
    reject_unauth_destination
    reject_unauth_pipelining
    reject_unknown_recipient_domain
    reject_unverified_recipient
    reject_invalid_hostname

我的master.cf相关部分:

smtp      inet  n       -       y       -       -       smtpd
  -o content_filter=spamassassin
smtps     inet  n       -       y       -       -       smtpd
  -o content_filter=spamassassin
  -o syslog_name=postfix/smtps
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_reject_unlisted_recipient=no

spamassassin unix -     n       n       -       -       pipe
  user=mail:mail argv=/usr/bin/spamc -u ${recipient} -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}

如果我尝试使用选项main.cf插入所有内容,也无济于事。有什么解决方案可以实现这一点?没有使用其他过滤器,只有 DKIM。所以没有 amavis、clamav 之类的东西。master.cf-o

答案1

SASL 认证用户应使用smtps中定义的内容进行提交。您可以通过删除该部分中的master.cf行来删除 SMTPS 的内容过滤器。-o content_filter=spamassassin

相关内容