为什么我的电子邮件被拒绝了?

时间:2014-05-03 01:50:08

标签: email smtp

我在使用域名从一个电子邮件地址向另一个电子邮件地址发送电子邮件时遇到问题。我正在使用共享服务器。我使用天气软件自动构建和发送电子邮件消息。我省略了主机,域和IP信息,并将其替换为:host = example.co.uk,domain = mydomain.co.uk。

情况是我使用电子邮件地址(weatherinfo @)运行邮件组,并且该组中的一些用户设置了自动应答器。因此,为了防止它们进入整个组,电子邮件从不同的地址(报告@)发送到weatherinfo @,其中报告@地址接收自动回复消息。

尝试从报告@发送电子邮件至weatherinfo @时,我从邮件传递系统收到以下消息:

This is the mail system at host mailauth.example.co.uk.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

               The mail system

<weatherinfo@mydomain.co.uk>: host 127.0.0.1[127.0.0.1] said: 554 5.6.0
Reject, id=02474-18 - BAD HEADER (in reply to end of DATA command).

电子邮件附带的错误日志显示:

Reporting-MTA: dns; mailauth.example.co.uk
X-Postfix-Queue-ID: 88002C306D
X-Postfix-Sender: rfc822; reports@mydomain.co.uk
Arrival-Date: Fri,  2 May 2014 22:00:43 +0100 (BST)

Final-Recipient: rfc822; weatherinfo@mydomain.co.uk
Original-Recipient: rfc822;weatherinfo@mydomain.co.uk
Action: failed
Status: 5.6.0
Remote-MTA: dns; 127.0.0.1
Diagnostic-Code: smtp; 554 5.6.0 Reject, id=02474-18 - BAD HEADER

原始邮件的标题是:

Return-Path: <reports@mydomain.co.uk>
Received: from LAPTOP (helium.example.co.uk [IP Address])
by mailauth.example.co.uk (Postfix) with ESMTPA id 88002C306D
for <weatherinfo@mydomain.co.uk>; Fri,  2 May 2014 22:00:43 +0100 (BST)
To: weatherinfo@mydomain.co.uk
From: reports@mydomain.co.uk
Subject: WEATHER REPORT
Reply-To: reports@mydomain.co.uk
Date: Fri, 02 May 2014 23:00:56 +0100
Message-Id: <43786804l.820319781l1635676l1l@mydomain.co.uk>
Message-ID: <2014.05.02.17001.wd@mail.mydomain.co.uk>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"

为什么此邮件被拒绝? 这是由我的软件还是服务器引起的? 如果是软件开发人员需要做什么来修复它? 如果它是服务器,我应该问我的主机要做些什么来克服这个问题?

1 个答案:

答案 0 :(得分:0)

服务器说,你的标题是错误的,所以我在你的软件中搜索问题。

如果您的帖子中没有丢失的空白,则标题字段&#34;已收到&#34;没有按照RFC 2822: 2.3.3 Long Header Fields中的说明进行折叠,导致两个无效的标题以&#34开头;&#34; &#34; for&#34;。正确的是:

Received: from LAPTOP (helium.example.co.uk [IP Address])
 by mailauth.example.co.uk (Postfix) with ESMTPA id 88002C306D
 for <weatherinfo@mydomain.co.uk>; Fri,  2 May 2014 22:00:43 +0100 (BST)

此外,我看到有两个Message-id标头字段。我不知道这是否允许。

我总是会在这种情况下使用telnet(或putty / raw)进行测试,并尝试跳过或修改几个heder字段,以便将其分解为邮件服务器所抱怨的标题字段。