postfix 中继来自本地主机的邮件

postfix 中继来自本地主机的邮件

我正在尝试设置 postfix,将虚拟域转发到 dovecot lmtp。

设置应该:

  • 仅接受来自经过身份验证的用户的中继或来自本地主机的邮件
  • 检查 sasl 用户是否拥有来自条目 (ldap) 的邮件
  • 仅通过动态地址验证结合 dovecot lmtp 接受本地域的邮件

尽管我已经设置了permit_mynetworks,但除了来自本地主机的邮件中继之外,一切正常。

通过 telnet 我得到回复:

453 4.7.1:发件人地址被拒绝:未登录

postconf -n 输出:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont; echo where) | gdb $daemon_directory/$process_name $process_id 2>&1 >$config_directory/$process_name.$process_id.log & sleep 5
html_directory = no
inet_interfaces = all
inet_protocols = all
local_recipient_maps =
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = localhost
mydomain = test.loc
myhostname = test.loc
mynetworks = 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
relay_domains = $mydestination
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_mynetworks reject_sender_login_mismatch permit_sasl_authenticated reject_unknown_recipient_domain reject_unverified_recipient
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/dovecot-auth
smtpd_sasl_tls_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_login_maps = ldap:/etc/postfix/controlled_envelope_senders
smtpd_tls_cert_file = /etc/postfix/certs/cert_combined.pem
smtpd_tls_key_file = /etc/postfix/certs/newkey.pem
smtpd_tls_security_level = may
soft_bounce = yes
virtual_mailbox_domains = $mydomain
virtual_transport = lmtp:unix:private/dovecot-lmtp

相关内容