postfix 无法接收外部邮件

postfix 无法接收外部邮件

我已经使用 postfix 和 dovecot 设置了一个电子邮件服务器。安装顺利,但我无法接收来自外部用户(gmail、yahoo 等)的电子邮件,但我可以向外部用户发送电子邮件。当外部用户发送电子邮件时,它会被退回并出现以下错误:-

永久性故障的技术细节:

    Google tried to deliver your message, but it was rejected by the server for the recipient domain mail.intelliswift.com by mail.intelliswift.com. [14.141.53.97].

    The error that the other server returned was:
    554 5.7.1 <[email protected]>: Recipient address rejected: Access denied

我可以在 maillog 文件中看到以下一些错误日志:-

    Jul 11 15:27:18 mail postfix/smtpd[4056]: connect from mail-ob0-f169.google.com[209.85.214.169]
    Jul 11 15:27:20 mail postfix/smtpd[4056]: NOQUEUE: reject: RCPT from mail-ob0-f169.google.com[209.85.214.169]: 554 5.7.1 <[email protected]>: Recipient address rejected: Access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail-ob0-f169.google.com>
    Jul 11 15:27:21 mail postfix/smtpd[4056]: disconnect from mail-ob0-f169.google.com[209.85.214.169]

请注意,我已正确设置了 MX 记录。我的域名是 mail.intelliswift.com,它指向 IP 14.141.53.97,并且它的 MX 记录为 mail.intelliswift.com。请参阅以下 postconf 的输出:-

    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
    home_mailbox = mail/
    html_directory = no
    inet_interfaces = all
    inet_protocols = all
    mail_owner = postfix
    mailq_path = /usr/bin/mailq.postfix
    manpage_directory = /usr/share/man
    milter_default_action = accept
    mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
    mydomain = intelliswift.com
    myhostname = mail.intelliswift.com
    mynetworks = 0.0.0.0/0
    myorigin = $mydomain
    newaliases_path = /usr/bin/newaliases.postfix
    non_smtpd_milters = $smtpd_milters
    proxy_interfaces = 14.141.53.97
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
    sample_directory = /usr/share/doc/postfix-2.6.6/samples
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    smtp_tls_note_starttls_offer = yes
    smtp_use_tls = yes
    smtpd_client_restrictions = permit_mynetworks,reject_unknown_client,permit
    smtpd_milters = inet:127.0.0.1:8891
    smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,permit
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_sasl_security_options = noanonymous
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_auth_only = no
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    smtpd_use_tls = yes
    tls_random_source = dev:/dev/urandom
    unknown_local_recipient_reject_code = 550

非常感谢您的帮助。

答案1

您没有设置虚拟域或用户。除非您明确想要这样做,否则您可能忘记了。

相关内容