Linux

Ubuntu Linux - Postfix 拒絕來自非本地主機的所有電子郵件

  • February 17, 2015

我不確定這裡到底出了什麼問題,但是我的伺服器(Postfix?)似乎拒絕了所有發往伺服器的外部電子郵件example.info

這是我收到的退回郵件,與 Gmail 和 Yahoo 類似。

Delivery to the following recipient failed permanently:

   me@example.info

Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 550 550 #5.1.0 Address rejected me@example.info (state 14).

----- Original message -----

MIME-Version: 1.0
Received: by 10.216.138.89 with SMTP id z67mr2663854wei.10.1329000093343; Sat,
11 Feb 2012 14:41:33 -0800 (PST)
Received: by 10.180.95.195 with HTTP; Sat, 11 Feb 2012 14:41:33 -0800 (PST)
Date: Sat, 11 Feb 2012 15:41:33 -0700
Message-ID: <CAJ=woPqVkUYs7_4YicV62Vvt4hQ7eHqcorxSgC3dcOsUCwd05Q@mail.gmail.com>
Subject: test
From: My Name <me@gmail.com>
To: My Name <me@example.info>
Content-Type: text/plain; charset=ISO-8859-1

test

我不是這個電子郵件方面的專家。我只是負責它,因為我是工作中的數據庫架構師。顯然我已經承擔了所有 IT 管理/支持的角色。

我在 Godaddy 註冊了我的域名,但是它唯一做的就是指向儲存在我辦公室伺服器機房內的一個盒子;Godaddy 沒有託管任何內容。

我有某種 MX 註冊問題嗎?什麼樣的日誌有助於調試這類問題?

我將在這裡發布我在 Godaddy 的 MX 記錄的照片:

DNS 管理器 - 區域文件編輯器 @ Godaddy

**PS:**有利的一面;我可以通過命令提示符發送郵件,所有伺服器都將它們作為非垃圾郵件接受。

編輯:輸出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
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = all
mailbox_command =
mailbox_size_limit = 0
mydestination = localhost, localhost.localdomain, example.com
myhostname = example.com
mynetworks = 127.0.0.0/8
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 (Ubuntu)
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt
smtpd_tls_key_file = /etc/ssl/private/smtpd.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 = example.com
virtual_alias_maps = hash:/etc/postfix/virtual

您的電子郵件伺服器是 mx 設置中提到的兩個,一個備份,一個主要。其中之一是您的後綴伺服器嗎?如果不是,那就是問題所在。(第一個問題…)

您可能應該嘗試從命令提示符將郵件發送到伺服器上的地址(不僅僅是外部地址)以測試它是否可以接收。

在你的本地郵件伺服器上,如果是 Linux,tail /var/log/mail.log(或類似的)和 /var/log/syslog 以查看外部伺服器是否可以訪問它。一般來說,您可以按照我寫的 howto 中的測試部分的建議進行操作

引用自:https://serverfault.com/questions/359221