通过Mailgun发送的错误:'421语法错误'

时间:2015-05-07 23:06:56

标签: mailgun

我通过node.js应用程序向Mailgun发送电子邮件。我不断收到这些421语法错误消息。有时消息最终会通过,这是一条消息的历史记录:

Date/Time   Summary 
2015-05-07 16:14    Delivered: sender → recipient 'You have a new notification' 
2015-05-07 15:14    Will retry in 3600 seconds: sender → recipient 'You have a new notification' Server response: 421 421 Syntax error  
2015-05-07 14:43    Will retry in 1800 seconds: sender → recipient  'You have a new notification' Server response: 421 421 Syntax error 
2015-05-07 14:28    Will retry in 900 seconds: sender → recipient  'You have a new notification' Server response: 421 421 Syntax error  
2015-05-07 14:18    Will retry in 600 seconds: sender → recipient  'You have a new notification' Server response: 421 421 Syntax error  
2015-05-07 14:18    Accepted: sender → recipient  'You have a new notification' 

*电子邮件地址已编辑。

以下是日志对421错误的说法:

{
  "severity": "temporary",
  "tags": [],
  "delivery-status": {
    "retry-seconds": 600,
    "message": "421 Syntax error",
    "code": 421,
    "description": null,
    "session-seconds": 0.16810393333435059
  },
  "envelope": {
    "transport": "smtp",
    "sender": sender,
    "sending-ip": "184.173.153.222",
    "targets": recipient
  },
  "recipient-domain": domain,
  "id": "TdCQ8omOSwqj_zYq18CBdQ",
  "campaigns": [],
  "reason": "generic",
  "user-variables": {},
  "flags": {
    "is-routed": null,
    "is-authenticated": true,
    "is-system-test": false,
    "is-test-mode": false
  },
  "log-level": "warn",
  "timestamp": 1431029901.450764,
  "message": {
    "headers": {
      "to": recipient,
      "message-id": "20150507201819.16176.81911@mailgundomain",
      "from": sender,
      "subject": "You have a new notification"
    },
    "attachments": [],
    "recipients": [
      recipient
    ],
    "size": 1036
  },
  "recipient": recipient,
  "event": "failed"
}

我是使用Mailgun的新手,我正在构建电子邮件RAW(标题和所有内容)。 421应该是网络错误...所以'语法错误'对我来说没有意义。

有些消息很好,但我确实有很多消息正在重试。

有什么想法吗?

由于

1 个答案:

答案 0 :(得分:5)

我使用Mailgun支持创建了一张票,他们很快找到了答案:

The error that you are seeing is due to the recipient's server either 
1). throttling emails sent from your domain which is also known as ESP
throttling, 2) grey-listing of the IP in which the recipient server will
first verify that the sending server is not sending spam before allowing
delivery, or 3) a local server issue may have occurred such as the server
being offline or misconfigured.

The error code of "4xx" indicates that this is a soft, temporary bounce.
Whenever we attempt to deliver a message and the recipient server returns a
soft bounce, we will retry delivery for up to 8 hours in the following
intervals: 10 minutes, 10 minutes, 15 minutes, 30 minutes, 1 hour, 2 hour
and 4 hours. Unfortunately this cannot be adjusted and is hard coded in our
environment. 

我查看了我们的管理员,我们为邮件服务器启用了一些反垃圾邮件。我们将其关闭,不再获得'421语法错误'。

由于