Linux

Nginx Ubuntu Postfix 配置 - 無法連接到傳入的 IMAP 伺服器“伺服器沒有響應”,但可以使用相同的詳細資訊通過傳出發送郵件?

  • March 23, 2012

我很適合新的伺服器管理員,尤其是 nginx,但除了通過我的 iPhone 訪問我的郵件之外似乎還可以嗎?

我已將我的域更改為“domain.com”

問題是我可以通過我的傳出 IMAP 伺服器發送郵件,但無法連接到傳入的?我剛收到消息"the mail server at mail.domain.com is not responding"

/etc/postfix/main.cf

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 = domain.com, mail.domain.com, localhost.com, , localhost, localhost.localdomain
mydomain = domain.com
myhostname = mail.domain.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
recipient_delimiter = +
relayhost =
smtp_tls_note_starttls_offer = yes
smtp_tls_security_level = may
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_timeout = 3600s
tls_random_source = dev:/dev/urandom

遠端登錄本地主機 25 > ehlo 本地主機

250-mail.domain.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

使用以下詳細資訊進行連接:

使用者名密碼主機名:mail.domain.com 埠:25

iptables –list

Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

我還向伺服器發送了郵件作為測試,如果有幫助,我收到了這個錯誤資訊?

Technical details of temporary failure:
[mail.domain.com. (10): Connection refused]

我還查看了 /var/log/mail.log ,它有多個條目:

postfix/smtpd[12239]: connect from 5acefc9a.bb.sky.com[90.206.252.xxx]
Mar 23 06:47:09 new-domain postfix/smtpd[12239]: lost connection after CONNECT from 5acefc9a.bb.sky.com[90.206.252.154]

注意new-domain不正確,但配置中的伺服器主機名和主機名是正確的?我最近移動了伺服器,並且主機已將服務上的主域設置為 new-domain.com,所以這可能是問題嗎?

就像我說的那樣,它可以連接到傳出伺服器,但是傳入得到沒有響應的錯誤?任何想法將不勝感激!

“通過我的 iPhone 訪問我的郵件”是指在客戶端上接收郵件嗎?這通常使用 POP3 或 IMAP,而不是 SMTP,並且 Postfix 不是 POP3 或 IMAP 伺服器。你需要像Dovecot這樣的東西來為客戶端提供 POP3 或 IMAP 訪問。

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