我在名为 的计算机上安装了 Postfix,该计算机smtp.mydomain.com
的虚拟域为mydomain.com
。如果任何电子邮件smtp.mydomain.com
从 到达该计算机上的本地用户外部的然后 SMTP 服务器就会按预期在本地进行传送。
但是,如果[email protected]
发送到[email protected]
使用smtp.mydomain.com
,则电子邮件不会按预期在本地传送给用户 2,而是被中继到[email protected]
域 mydomain.com 的 catch all 别名。
因此,基本上,使用 Postfix 机器的本地用户到本地用户不起作用。关于如何修复或诊断此问题,有什么建议吗?这肯定是显而易见的。
我在这里发布我的配置希望它有帮助:
postconf -n
:
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
myhostname = smtp.mydomain.com
myorigin = mydomain.com
newaliases_path = /usr/bin/newaliases.postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination check_policy_service inet:127.0.0.1:10023 reject_unknown_reverse_client_hostname
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous noplaintext
smtpd_sasl_type = dovecot
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/pki/tls/certs/smtp.mydomain.com.cert
smtpd_tls_key_file = /etc/pki/tls/private/smtp.mydomain.com.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:/var/spool/postfix/smtpd_tls_cache
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = no
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual
cat /etc/postfix/virtual
:
mydomain.com mydomain.com
@mydomain.com [email protected]
[email protected] user1.mydomain.com
[email protected] user2.mydomain.com
答案1
将该行移至文件末尾。就这样。@mydomain.com [email protected]
@
哦,我现在明白了:目标地址中应该有s。因此,您的文件应如下所示:
mydomain.com mydomain.com
[email protected] [email protected]
[email protected] [email protected]
@mydomain.com [email protected]