Postfix

Postfix 收不到來自 Gmail 的郵件

  • August 21, 2015

我已經在 CentOS 7 上安裝了帶有 Dovecot 的 Postfix。當我嘗試從 Outlook 等服務發送/接收電子郵件時,一切正常。

但是,當我從我的 Gmail 帳戶向我的伺服器上的電子郵件發送電子郵件時,出現了問題。消息永遠不會到達我的伺服器,而是被送回,這就是消息中提到的原因:

Technical details of temporary failure:
Google tried to deliver your message, but it was rejected by the server for the recipient domain xxxxxxxx.com by xxxxxxxx.com. [xx.zz.186.133].

The error that the other server returned was:
454 4.7.0 TLS not available due to local problem

這是我的main.cf文件: http: //pastebin.com/3Di4PYxt

以下是文件/etc/postfix夾中的文件:

access                 header_checks.inbound.db     ldap       transport
canonical              header_checks.internal       main.cf    transport.db
generic                header_checks.internal.db    master.cf  virtual
header_checks          header_checks.submission     relocated
header_checks.inbound  header_checks.submission.db  ssl

我在 /etc/postfix/ssl 中有這些文件:

server.crt  server.csr  server.key  server.key.secure

我按照本教程安裝郵件伺服器:http ://www.krizna.com/centos/setup-mail-server-centos-7/

注意:我已經看到了這個問題,但沒有幫助。

最後我設法使用這個連結解決了這個問題:https ://workaround.org/ispmail/squeeze/ssl-certificates

必須執行這些命令(以 root 身份):

mkdir /etc/ssl/private/

openssl req -new -x509 -days 3650 -nodes -out /etc/ssl/certs/dovecot.pem -keyout /etc/ssl/private/dovecot.pem

chmod o= /etc/ssl/private/dovecot.pem

openssl req -new -x509 -days 3650 -nodes -out /etc/ssl/certs/postfix.pem -keyout /etc/ssl/private/postfix.pem

chmod o= /etc/ssl/private/postfix.pem

postconf -e smtpd_tls_cert_file=/etc/ssl/certs/postfix.pem

postconf -e smtpd_tls_key_file=/etc/ssl/private/postfix.pem

service dovecot restart

service postfix restart

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