Postfix发送的邮件被反弹或转到垃圾邮件

我最近试图build立一个邮件服务器,以便能够发送我用Apache托pipe的网站的邮件。
起初我试图用exim工作,但是我被错误信息覆盖了,我尝试发送的邮件被拒绝了。 我认为只有Gmail加强了邮件发送exim,但他们去垃圾邮件。

我终于决定改变并开始使用Postfix,据说这对于我的需求来说更容易configuration。

我遵循基本的configuration步骤,我尝试了一个简单的邮件发送,但同样的事情发生。

Jan 4 11:43:45 sd-79356 postfix/qmgr[29420]: 374A1A4D72: from=<[email protected]>, size=361, nrcpt=1 (queue active) Jan 4 11:43:45 sd-79356 postfix/smtp[29427]: 374A1A4D72: to=<[email protected]>, relay=mx1.hotmail.com[65.54.188.94]:25, delay=0.67, delays=0.07/0/0.45/0.15, dsn=5.0.0, status=bounced (host mx1.hotmail.com$ Jan 4 11:43:45 sd-79356 postfix/smtp[29427]: 374A1A4D72: lost connection with mx1.hotmail.com[65.54.188.94] while sending RCPT TO Jan 4 11:43:45 sd-79356 postfix/cleanup[29425]: DBBB1A4D75: message-id=<[email protected]> Jan 4 11:43:45 sd-79356 postfix/bounce[29428]: 374A1A4D72: sender non-delivery notification: DBBB1A4D75 

而对于Gmail地址,则会发送该邮件,但发送到垃圾邮件。

我知道这是一个相当常见的问题,我想我已经阅读了大多数在SO,SF或其他论坛的post,但没有解决我的问题。

我在之后尝试的configuration中的最后一项更改是在阅读本文后设置了TLS,但不幸的是,这并没有改变我的问题,同样的错误。

我忘了提及我已经检查了十几次,如果我的服务器没有被列入黑名单或报告为垃圾邮件发送者,这可以解释这个问题,obvisouly有没有这样的问题,所以请不要告诉我,我的问题可能是(总是有人谁说这样做检查类似的问题,所以不要浪费你的时间,如果你没有什么更好的build议)。

最后一点,我的目标是能够为Apache Virtualhosts中托pipe的几个网站发送邮件,这意味着我将需要几个“发件人”传出地址,并且不能直接在configuration传出地址名称时直接写入邮件。

这是我的configuration/etc/postfix/main.cf

 smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no append_dot_mydomain = no readme_directory = no # What I added to use TLS support, which doesn't solve the problem smtpd_use_tls=yes smtpd_tls_security = may smtpd_tls_key_file = /etc/postfix/tls/smtpd.key smtpd_tls_cert_file = /etc/postfix/tls/smtpd.crt smtpd_tls_CAfile = /etc/postfix/tls/cacert.pem smtpd_tls_loglevel = 1 smtpd_tls_received_header = yes smtpd_tls_session_cache_timeout = 3600s tls_random_source = dev:/dev/urandom smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtp_use_tls = yes smtp_tls_security_level = may smtp_tls_loglevel = 1 # till here smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination myhostname = sd-xxxxx.dedibox.fr alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = xxx.xxx.xxx.xxx.online.net, sd-xxxxx.dedibox.fr, localhost.dedibox.fr, localhost relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = loopback-only 

我使用Gmail收到的邮件中收到的内容:

 Received: from sd-xxxxx.dedibox.fr ([xxx.xxx.xxx.xxx]) by mx.google.com with ESMTPS id 74si69449965wmm.7.2016.01.04.03.15.17 for <[email protected]> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jan 2016 03:15:18 -0800 (PST) Received-SPF: neutral (google.com: xxx.xxx.xxx.xxx is neither permitted nor denied by best guess record for domain of [email protected]) client-ip=xxx.xxx.xxx.xxx; Authentication-Results: mx.google.com; spf=neutral (google.com: xxx.xxx.xxx.xxx is neither permitted nor denied by best guess record for domain of [email protected]) [email protected] Received: by sd-xxxxx.dedibox.fr (Postfix, from userid 0) id B5DA5A4D78; Mon, 4 Jan 2016 12:14:47 +0100 (CET) 

  1. Gmail会为您解释邮件被分类为垃圾邮件的原因。 你检查了吗?
  2. 如果每个域都有专用IP,则需要检查其A和PTRlogging是否同步。 这大大增加了垃圾邮件filter传递的机会
  3. 尝试将SPFlogging添加到您的域。

这引起了我的注意:

 lost connection with mx1.hotmail.com[65.54.188.94] while sending RCPT TO 

你确定你的ISP没有阻止传出的SMTP吗? 尝试telnet mx1.hotmail.com 25 ,看看你是否能够在第一时间连接。