无法使转发生效

无法使转发生效

我无法让转发功能正常工作。这是我的 postconf 输出:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
default_verp_delimiters = +=
disable_verp_bounces = no
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = jubero.com
myhostname = h2.jubero.com
mynetworks = 78.0.0.0/8, 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.6.6/README_FILES
receive_override_options = no_address_mappings
recipient_delimiter = +
relay_domains = 
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions =      permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = no
unknown_local_recipient_reject_code = 550
verp_delimiter_filter = -=+
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-     maps.cf,mysql:/etc/postfix/mysql-email2email.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_transport = dovecot

当我发送电子邮件至[电子邮件保护],它被退回:

postfix/pipe[7039]: 013309E0C8: to=<[email protected]>, relay=dovecot, delay=1, delays=0.92/0/0/0.08, dsn=5.1.1, status=bounced (user unknown)

但是,当我查询 postmap 时,会打印转发电子邮件:

postmap -q [email protected] mysql:/etc/postfix/mysql-virtual-alias-maps.cf
[email protected]

向虚拟用户发送邮件没问题。只有转发不起作用。

我该如何纠正这个问题?

答案1

我通过删除以下内容修复了此问题:

receive_override_options

该选项最初是为了避免经过垃圾邮件过滤器的电子邮件被重复递送而添加的。这使得转发变得不可能。

答案2

您需要告诉 postfix 哪些方法对想要通过您的服务器进行中继的用户有效。像这样的一行将大大有助于解决您的问题。

 smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

阅读更多这里

相关内容