Postfix 不接受虚拟用户的邮件

Postfix 不接受虚拟用户的邮件

我已经为某些域设置了一些虚拟用户。我有一个本地域(并计划添加一些虚拟邮箱,但我将留到以后再添加)。

localhost postfix/smtpd[23466]: NOQUEUE: reject: RCPT from somedomain.com[173.xxx.198.xxx]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<somedomain.com>

我已经检查过这些设置。每次调整时/etc/postfix/valiases我都会运行postmap valiases。然后我再运行postfix reload/etc/init.d/postfix restart以确保万无一失)。

我的 main.cf (用 domain.com 替换):

$ postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
mydestination = $myhostname, localhost, localhost.localdomain
myhostname = domain.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 109.123.86.72/32
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = 
smtp_tls_note_starttls_offer = yes
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Linux)
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = 
smtpd_sasl_path = private/auth-client
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/ssl/certs/server.crt
smtpd_tls_key_file = /etc/ssl/private/server.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
virtual_alias_domains = hash:/etc/postfix/vdomains
virtual_alias_maps = hash:/etc/postfix/valiases

/etc/postfix/vdomains

domaina.com
domainb.com

/etc/postfix/valiases

[email protected]        [email protected] # works
@domainb.com            [email protected] # doesn't work
[email protected]        [email protected]   # doesn't work
[email protected]       [email protected] # doesn't work

有任何想法吗?

答案1

您必须在右侧放置一些内容:/etc/postfix/vdomains

喜欢

domaina.com x
domainb.com x

因为 Postfix 将其用作查找表,所以它需要在右侧添加一些虚拟值。或者您可以直接将其列在 main.cf 中,而不是查找表中。

相关内容