通过 Mailgun 发送错误:“421 语法错误”

Errors sending through Mailgun: '421 Syntax error'

我正在通过 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(headers 和所有)。 421 应该是网络错误...所以 'Syntax error' 对我来说没有意义。

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

有什么想法吗?

谢谢

我在 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 语法错误”。

谢谢