diff --git a/lib/parser.js b/lib/parser.js index 3b3ee23..af23b24 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -35,11 +35,13 @@ var ERROR_CODES_TYPES = { "550 5.1.1" : "no_such_recipient", "550 5.2.1" : "recipient_disabled_or_recipient_rate_limited", "550 5.7.1" : "spam_content", + "550 5.7.26" : "authentication_failure", "551" : "user_not_local", "552" : "action_aborted_exceeded_storage_allocation", "552 5.2.2" : "mailbox_over_quota", "552 5.2.3" : "message_size_limit", "553" : "action_not_taken_mailbox_name_not_allowed", + "553 5.1.2" : "no_such_recipient", "554" : "transaction_failed", "554 5.7.1" : "spam_content", "555" : "parameters_not_recognized", @@ -78,19 +80,20 @@ var REGEXES = { /Message rejected by\:\s+([\S\.]+?)$/m, // Outlook error /from (\S+) \[([\d\.]+)\](?:\:(\d+)\:)?/m, /conversation with (\S+)\[([\d\.]+)\](?:\:(\d+)\:)? timed out/m, + /lost connection with (\S+)\[([\d\.]+)\](?:\:(\d+)\:)?/m, // "lost connection with mx.mail-data.net[134.244.220.69]" /Generating server: (\S+)(?:\[([\d\.]+)\])?(?:\:(\d+)\:)?/m // "Generating server: PH7PR02MB9549495.namprd02.prod.outlook.com" ], error : [ - /said\: (\d{3}(?:[\s\-]\d\.\d\.\d{1,3})?) (.+) \(in reply to/, - /said\: (\d{3}(?:[\s\-]\d\.\d\.\d{1,3})?)-(.+)/, + /said\: (\d{3}(?:[\s\-\#\']{1,2}\d\.\d\.\d{1,3})?) (.+) \(in reply to/, + /said\: (\d{3}(?:[\s\-\#\']{1,2}\d\.\d\.\d{1,3})?)-(.+)/, /(\d{3}\-\'\d\.\d\.\d{1,3}) (.+)/, - /LMTP error after .+?\:\<.+?\>\: (\d{3}(?:[\s\-]\d\.\d\.\d{1,3})?) <.+?\>(.+)$/m, - /remote server returned \'(\d{3}(?:[\s\-]\d\.\d\.\d{1,3})?) (.+)\'/i, - /The response from the remote server was:\s(\d{3}(?:[\s\-]\d\.\d\.\d{1,3})?) (.+)/, - /refused to talk to me\: (\d{3}(?:[\s\-]\d\.\d\.\d{1,3})?) (.+)/, - /(?:error|reason)\:\s*?(\d{3}(?:[\s\-]\d\.\d\.\d{1,3})?) (.+)/i, - /(\d{3}[\s\-]\d\.\d\.\d{1,3})/, + /LMTP error after .+?\:\<.+?\>\: (\d{3}(?:[\s\-\#\']{1,2}\d\.\d\.\d{1,3})?) <.+?\>(.+)$/m, + /remote server returned \'(\d{3}(?:[\s\-\#\']{1,2}\d\.\d\.\d{1,3})?) (.+)\'/i, + /The response from the remote server was:\s(\d{3}(?:[\s\-\#\']{1,2}\d\.\d\.\d{1,3})?) (.+)/, + /refused to talk to me\: (\d{3}(?:[\s\-\#\']{1,2}\d\.\d\.\d{1,3})?) (.+)/, + /(?:error|reason)\:\s*?(\d{3}(?:[\s\-\#\']{1,2}\d\.\d\.\d{1,3})?) (.+)/i, + /(\d{3}[\s\-\#\']{1,2}\d\.\d\.\d{1,3})/, /(\d{3}\-\'\d\.\d\.\d{1,3})/ ], @@ -122,7 +125,7 @@ var REGEXES = { ], temporary_safe : /(temporary|temporarily)/i, - blocked : /((?:is listed)|blocked|banned|denied|dnsbl)/i, + blocked : /((?:is listed)|blocked|block list|banned|denied|dnsbl)/i, spam : /(spam)/i, enhanced_types : { @@ -150,13 +153,13 @@ var REGEXES = { ], reputation : [ - /(rate limited due to IP reputation)/i + /(rate limited due to IP reputation)/i, + /(new or untrusted IP)/i ] }, error_code : [ - /(\d{3})[\s\-](\d\.\d\.\d{1,3})/, // "550 5.4.1" or "550-5.4.1" or "550-5.4.11" or "550-5.4.110" - /(\d{3})\-\'(\d\.\d\.\d{1,3})/, // "550-'5.4.1" or "550-'5.4.11" or "550-'5.4.110" + /(\d{3})[\s\-\#\']{1,2}(\d\.\d\.\d{1,3})/, // "550 5.4.1" or "550 #5.4.1" or "550-5.4.1" or "550-'5.4.1" /(\d{3})/ // "550" ] }; diff --git a/test/fixtures/421_4_7_0_deferred.txt b/test/fixtures/421_4_7_0_deferred.txt new file mode 100644 index 0000000..398938f --- /dev/null +++ b/test/fixtures/421_4_7_0_deferred.txt @@ -0,0 +1,16 @@ +This is the mail system at host mailer.acme.email. + +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 + +: host mta6.am0.yahoodns.net[76.159.240.37] said: 421 + 4.7.0 [TSS04] Messages from 39.177.48.16 temporarily deferred due to + unexpected volume or user complaints - 4.16.55.1; see + https://postmaster.yahooinc.com/error-codes (in reply to MAIL FROM command) diff --git a/test/fixtures/450_4_2_1_rate_limited.txt b/test/fixtures/450_4_2_1_rate_limited.txt new file mode 100644 index 0000000..f876059 --- /dev/null +++ b/test/fixtures/450_4_2_1_rate_limited.txt @@ -0,0 +1,21 @@ +This is the mail system at host mailer.acme.email. + +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 + +: host alt1.gmail-smtp-in.l.google.com[124.215.9.62] said: + 450-4.2.1 The user you are trying to contact is receiving mail at a rate + that 450-4.2.1 prevents additional messages from being delivered. Please + resend your 450-4.2.1 message at a later time. If the user is able to + receive mail at that 450-4.2.1 time, your message will be delivered. For + more information, please 450-4.2.1 visit 450 4.2.1 + https://support.google.com/mail/?p=ReceivingRate + f15-20020a056402354f00b00548d4febb0bsi965249edd.614 - gsmtp (in reply to + RCPT TO command) diff --git a/test/fixtures/451_4_7_1_reputation.txt b/test/fixtures/451_4_7_1_reputation.txt new file mode 100644 index 0000000..596a9b5 --- /dev/null +++ b/test/fixtures/451_4_7_1_reputation.txt @@ -0,0 +1,15 @@ +This is the mail system at host mailer.acme.email. + +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 + +: host mx2.emailsrvr.com[180.166.34.2] said: 451 4.7.1 + Received too many messages from a new or untrusted IP: 93.177.84.61 + (Z27/6DC2420) (G28) (in reply to RCPT TO command) diff --git a/test/fixtures/451_4_7_500_server_busy.txt b/test/fixtures/451_4_7_500_server_busy.txt new file mode 100644 index 0000000..dff83b4 --- /dev/null +++ b/test/fixtures/451_4_7_500_server_busy.txt @@ -0,0 +1,18 @@ +This is the mail system at host mailer.acme.email. + +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 + +: host + etzzogal-com0i.mail.protection.outlook.com[140.74.42.63] said: 451 4.7.500 + Server busy. Please try again later from [39.177.48.16]. (S77714) + [QE2FRA04FT039.eop-fra04.prod.protection.outlook.com + 2023-11-23T18:53:22.058Z 10DSKD34941BC6NE] (in reply to end of DATA + command) diff --git a/test/fixtures/550_5_0_1_no_such_recipient.txt b/test/fixtures/550_5_0_1_no_such_recipient.txt new file mode 100644 index 0000000..89e6919 --- /dev/null +++ b/test/fixtures/550_5_0_1_no_such_recipient.txt @@ -0,0 +1,14 @@ +This is the mail system at host mailer.acme.email. + +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 + +: host mxb.mailgun.org[43.106.31.24] said: + 550 5.0.1 Recipient rejected (in reply to RCPT TO command) diff --git a/test/fixtures/550_5_1_0_address_rejected.txt b/test/fixtures/550_5_1_0_address_rejected.txt new file mode 100644 index 0000000..e007aab --- /dev/null +++ b/test/fixtures/550_5_1_0_address_rejected.txt @@ -0,0 +1,14 @@ +This is the mail system at host mailer.acme.email. + +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 + +: host mx1.hc3459-45.iphmx.com[193.183.64.148] said: + 550 #5.1.0 Address rejected. (in reply to RCPT TO command) diff --git a/test/fixtures/550_5_7_1_blocked.txt b/test/fixtures/550_5_7_1_blocked.txt new file mode 100644 index 0000000..6ebdc4f --- /dev/null +++ b/test/fixtures/550_5_7_1_blocked.txt @@ -0,0 +1,20 @@ +This is the mail system at host mailer.acme.email. + +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 + +: host + outlook-com.olc.protection.outlook.com[140.74.15.33] said: 550 5.7.1 + Unfortunately, messages from [31.57.142.204] weren't sent. Please contact + your Internet service provider since part of their network is on our block + list (S3140). You can also refer your provider to + http://mail.live.com/mail/troubleshooting.aspx#errors. + [WP1FDK33EO054.eop-nam02.prod.protection.outlook.com + 2023-01-01T00:00:00.001Z 03SDKS32D1WER234] (in reply to MAIL FROM command) diff --git a/test/fixtures/550_5_7_1_reputation_variant_1.txt b/test/fixtures/550_5_7_1_reputation_variant_1.txt new file mode 100644 index 0000000..10da7b5 --- /dev/null +++ b/test/fixtures/550_5_7_1_reputation_variant_1.txt @@ -0,0 +1,20 @@ +This is the mail system at host mailer.acme.email. + +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 + +: host + gmail-smtp-in.l.google.com[124.205.72.62] said: 550-5.7.1 [93.177.87.181 + 19] Gmail has detected that this message is likely 550-5.7.1 suspicious due + to the very low reputation of the sending domain. To 550-5.7.1 best protect + our users from spam, the message has been blocked. 550-5.7.1 Please visit + 550 5.7.1 https://support.google.com/mail/answer/188131 for more + information. h6-20020a05640250c600b0054ab00d6afesi892868edb.356 - gsmtp (in + reply to end of DATA command) diff --git a/test/fixtures/550_5_7_1_service_refused.txt b/test/fixtures/550_5_7_1_service_refused.txt new file mode 100644 index 0000000..f879864 --- /dev/null +++ b/test/fixtures/550_5_7_1_service_refused.txt @@ -0,0 +1,15 @@ +This is the mail system at host mailer.acme.email. + +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 + +: host smtpz4.laposte.net[106.29.142.66] said: 550 5.7.1 + Service refuse. Veuillez essayer plus tard. service refused, please try + later. LPN007_510 (in reply to end of DATA command) diff --git a/test/fixtures/550_5_7_26_authentication_failure.txt b/test/fixtures/550_5_7_26_authentication_failure.txt new file mode 100644 index 0000000..dcd1d7e --- /dev/null +++ b/test/fixtures/550_5_7_26_authentication_failure.txt @@ -0,0 +1,20 @@ +This is the mail system at host mailer.acme.email. + +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 + +: host aspmx.l.google.com[124.205.72.62] said: + 550-5.7.26 Unauthenticated email from acme.com is not accepted due to + domain's 550-5.7.26 DMARC policy. Please contact the administrator of + acme.com domain 550-5.7.26 if this was a legitimate mail. Please visit + 550-5.7.26 https://support.google.com/mail/answer/2451690 to learn about + the 550 5.7.26 DMARC initiative. + v10-20020a170906488a11b0098d8390816asi945962ejq.756 - gsmtp (in reply to + end of DATA command) diff --git a/test/fixtures/554_5_2_3_policy_violation.txt b/test/fixtures/554_5_2_3_policy_violation.txt new file mode 100644 index 0000000..8b6a195 --- /dev/null +++ b/test/fixtures/554_5_2_3_policy_violation.txt @@ -0,0 +1,15 @@ +This is the mail system at host mailer.acme.email. + +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 + +: host mx.zoho.eu[158.203.221.166] said: 554 5.2.3 + MailPolicy violation Error delivering to mailboxes (in reply to end of DATA + command) diff --git a/test/fixtures/554_5_7_7_equal_headers.txt b/test/fixtures/554_5_7_7_equal_headers.txt new file mode 100644 index 0000000..fcba190 --- /dev/null +++ b/test/fixtures/554_5_7_7_equal_headers.txt @@ -0,0 +1,15 @@ +This is the mail system at host mailer.acme.email. + +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 + +: host spamrelay.zxcs.nl[158.140.82.21] said: 554 5.7.7 too + many equal X-headers (X-Original-Authentication-Results:) (in reply to end + of DATA command) diff --git a/test/fixtures/expected/421_4_7_0_deferred.json b/test/fixtures/expected/421_4_7_0_deferred.json new file mode 100644 index 0000000..65cf599 --- /dev/null +++ b/test/fixtures/expected/421_4_7_0_deferred.json @@ -0,0 +1,32 @@ +{ + "bounce": true, + "email": { + "body": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system\n\n: host mta6.am0.yahoodns.net[76.159.240.37] said: 421 4.7.0 [TSS04] Messages from 39.177.48.16 temporarily deferred due to unexpected volume or user complaints - 4.16.55.1; see https://postmaster.yahooinc.com/error-codes (in reply to MAIL FROM command)", + "intro": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system", + "error": ": host mta6.am0.yahoodns.net[76.159.240.37] said: 421 4.7.0 [TSS04] Messages from 39.177.48.16 temporarily deferred due to unexpected volume or user complaints - 4.16.55.1; see https://postmaster.yahooinc.com/error-codes (in reply to MAIL FROM command)" + }, + "data": { + "error": { + "code": { + "basic": "421", + "enhanced": "4.7.0" + }, + "label": "[TSS04] Messages from 39.177.48.16 temporarily deferred due to unexpected volume or user complaints - 4.16.55.1; see https://postmaster.yahooinc.com/error-codes", + "type": "service_not_available", + "temporary": true, + "permanent": false, + "data": { + "type": null, + "blocked": false, + "spam": false + } + }, + "recipient": "beegelee@yahoo.com", + "server": { + "hostname": "mta6.am0.yahoodns.net", + "ip": "76.159.240.37", + "port": null + }, + "command": "MAIL FROM" + } +} \ No newline at end of file diff --git a/test/fixtures/expected/450_4_2_1_rate_limited.json b/test/fixtures/expected/450_4_2_1_rate_limited.json new file mode 100644 index 0000000..7761028 --- /dev/null +++ b/test/fixtures/expected/450_4_2_1_rate_limited.json @@ -0,0 +1,32 @@ +{ + "bounce": true, + "email": { + "body": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system\n\n: host alt1.gmail-smtp-in.l.google.com[124.215.9.62] said: 450-4.2.1 The user you are trying to contact is receiving mail at a rate that 450-4.2.1 prevents additional messages from being delivered. Please resend your 450-4.2.1 message at a later time. If the user is able to receive mail at that 450-4.2.1 time, your message will be delivered. For more information, please 450-4.2.1 visit 450 4.2.1 https://support.google.com/mail/?p=ReceivingRate f15-20020a056402354f00b00548d4febb0bsi965249edd.614 - gsmtp (in reply to RCPT TO command)", + "intro": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system", + "error": ": host alt1.gmail-smtp-in.l.google.com[124.215.9.62] said: 450-4.2.1 The user you are trying to contact is receiving mail at a rate that 450-4.2.1 prevents additional messages from being delivered. Please resend your 450-4.2.1 message at a later time. If the user is able to receive mail at that 450-4.2.1 time, your message will be delivered. For more information, please 450-4.2.1 visit 450 4.2.1 https://support.google.com/mail/?p=ReceivingRate f15-20020a056402354f00b00548d4febb0bsi965249edd.614 - gsmtp (in reply to RCPT TO command)" + }, + "data": { + "error": { + "code": { + "basic": "450", + "enhanced": "4.2.1" + }, + "label": "The user you are trying to contact is receiving mail at a rate that 450-4.2.1 prevents additional messages from being delivered. Please resend your 450-4.2.1 message at a later time. If the user is able to receive mail at that 450-4.2.1 time, your message will be delivered. For more information, please 450-4.2.1 visit 450 4.2.1 https://support.google.com/mail/?p=ReceivingRate f15-20020a056402354f00b00548d4febb0bsi965249edd.614 - gsmtp", + "type": "action_not_taken_mailbox_unavailable", + "temporary": true, + "permanent": false, + "data": { + "type": "action_not_taken_mailbox_rate_limited", + "blocked": false, + "spam": false + } + }, + "recipient": "mulka@gmail.com", + "server": { + "hostname": "alt1.gmail-smtp-in.l.google.com", + "ip": "124.215.9.62", + "port": null + }, + "command": "RCPT TO" + } +} \ No newline at end of file diff --git a/test/fixtures/expected/451_4_7_1_reputation.json b/test/fixtures/expected/451_4_7_1_reputation.json new file mode 100644 index 0000000..2e6014d --- /dev/null +++ b/test/fixtures/expected/451_4_7_1_reputation.json @@ -0,0 +1,32 @@ +{ + "bounce": true, + "email": { + "body": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system\n\n: host mx2.emailsrvr.com[180.166.34.2] said: 451 4.7.1 Received too many messages from a new or untrusted IP: 93.177.84.61 (Z27/6DC2420) (G28) (in reply to RCPT TO command)", + "intro": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system", + "error": ": host mx2.emailsrvr.com[180.166.34.2] said: 451 4.7.1 Received too many messages from a new or untrusted IP: 93.177.84.61 (Z27/6DC2420) (G28) (in reply to RCPT TO command)" + }, + "data": { + "error": { + "code": { + "basic": "451", + "enhanced": "4.7.1" + }, + "label": "Received too many messages from a new or untrusted IP: 93.177.84.61 (Z27/6DC2420) (G28)", + "type": "action_aborted_local_error", + "temporary": true, + "permanent": false, + "data": { + "type": "reputation", + "blocked": false, + "spam": false + } + }, + "recipient": "contact@rossian.fr", + "server": { + "hostname": "mx2.emailsrvr.com", + "ip": "180.166.34.2", + "port": null + }, + "command": "RCPT TO" + } +} \ No newline at end of file diff --git a/test/fixtures/expected/451_4_7_500_server_busy.json b/test/fixtures/expected/451_4_7_500_server_busy.json new file mode 100644 index 0000000..ce01318 --- /dev/null +++ b/test/fixtures/expected/451_4_7_500_server_busy.json @@ -0,0 +1,32 @@ +{ + "bounce": true, + "email": { + "body": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system\n\n: host etzzogal-com0i.mail.protection.outlook.com[140.74.42.63] said: 451 4.7.500 Server busy. Please try again later from [39.177.48.16]. (S77714) [QE2FRA04FT039.eop-fra04.prod.protection.outlook.com 2023-11-23T18:53:22.058Z 10DSKD34941BC6NE] (in reply to end of DATA command)", + "intro": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system", + "error": ": host etzzogal-com0i.mail.protection.outlook.com[140.74.42.63] said: 451 4.7.500 Server busy. Please try again later from [39.177.48.16]. (S77714) [QE2FRA04FT039.eop-fra04.prod.protection.outlook.com 2023-11-23T18:53:22.058Z 10DSKD34941BC6NE] (in reply to end of DATA command)" + }, + "data": { + "error": { + "code": { + "basic": "451", + "enhanced": "4.7.500" + }, + "label": "Server busy. Please try again later from [39.177.48.16]. (S77714) [QE2FRA04FT039.eop-fra04.prod.protection.outlook.com 2023-11-23T18:53:22.058Z 10DSKD34941BC6NE]", + "type": "action_aborted_local_error", + "temporary": true, + "permanent": false, + "data": { + "type": null, + "blocked": false, + "spam": false + } + }, + "recipient": "svelt.marc@decimetre.com", + "server": { + "hostname": "etzzogal-com0i.mail.protection.outlook.com", + "ip": "140.74.42.63", + "port": null + }, + "command": "DATA" + } +} \ No newline at end of file diff --git a/test/fixtures/expected/550_5_0_1_no_such_recipient.json b/test/fixtures/expected/550_5_0_1_no_such_recipient.json new file mode 100644 index 0000000..9acd837 --- /dev/null +++ b/test/fixtures/expected/550_5_0_1_no_such_recipient.json @@ -0,0 +1,32 @@ +{ + "bounce": true, + "email": { + "body": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system\n\n: host mxb.mailgun.org[43.106.31.24] said: 550 5.0.1 Recipient rejected (in reply to RCPT TO command)", + "intro": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system", + "error": ": host mxb.mailgun.org[43.106.31.24] said: 550 5.0.1 Recipient rejected (in reply to RCPT TO command)" + }, + "data": { + "error": { + "code": { + "basic": "550", + "enhanced": "5.0.1" + }, + "label": "Recipient rejected", + "type": "action_not_taken", + "temporary": false, + "permanent": true, + "data": { + "type": "no_such_recipient", + "blocked": false, + "spam": false + } + }, + "recipient": "dmarc@reports.emailserver.com", + "server": { + "hostname": "mxb.mailgun.org", + "ip": "43.106.31.24", + "port": null + }, + "command": "RCPT TO" + } +} \ No newline at end of file diff --git a/test/fixtures/expected/550_5_1_0_address_rejected.json b/test/fixtures/expected/550_5_1_0_address_rejected.json new file mode 100644 index 0000000..6c1ca9c --- /dev/null +++ b/test/fixtures/expected/550_5_1_0_address_rejected.json @@ -0,0 +1,32 @@ +{ + "bounce": true, + "email": { + "body": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system\n\n: host mx1.hc3459-45.iphmx.com[193.183.64.148] said: 550 #5.1.0 Address rejected. (in reply to RCPT TO command)", + "intro": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system", + "error": ": host mx1.hc3459-45.iphmx.com[193.183.64.148] said: 550 #5.1.0 Address rejected. (in reply to RCPT TO command)" + }, + "data": { + "error": { + "code": { + "basic": "550", + "enhanced": "5.1.0" + }, + "label": "Address rejected.", + "type": "action_not_taken", + "temporary": false, + "permanent": true, + "data": { + "type": null, + "blocked": false, + "spam": false + } + }, + "recipient": "vantes@saphe.com.mx", + "server": { + "hostname": "mx1.hc3459-45.iphmx.com", + "ip": "193.183.64.148", + "port": null + }, + "command": "RCPT TO" + } +} \ No newline at end of file diff --git a/test/fixtures/expected/550_5_7_1_blocked.json b/test/fixtures/expected/550_5_7_1_blocked.json new file mode 100644 index 0000000..dec6b3a --- /dev/null +++ b/test/fixtures/expected/550_5_7_1_blocked.json @@ -0,0 +1,32 @@ +{ + "bounce": true, + "email": { + "body": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system\n\n: host outlook-com.olc.protection.outlook.com[140.74.15.33] said: 550 5.7.1 Unfortunately, messages from [31.57.142.204] weren't sent. Please contact your Internet service provider since part of their network is on our block list (S3140). You can also refer your provider to http://mail.live.com/mail/troubleshooting.aspx#errors. [WP1FDK33EO054.eop-nam02.prod.protection.outlook.com 2023-01-01T00:00:00.001Z 03SDKS32D1WER234] (in reply to MAIL FROM command)", + "intro": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system", + "error": ": host outlook-com.olc.protection.outlook.com[140.74.15.33] said: 550 5.7.1 Unfortunately, messages from [31.57.142.204] weren't sent. Please contact your Internet service provider since part of their network is on our block list (S3140). You can also refer your provider to http://mail.live.com/mail/troubleshooting.aspx#errors. [WP1FDK33EO054.eop-nam02.prod.protection.outlook.com 2023-01-01T00:00:00.001Z 03SDKS32D1WER234] (in reply to MAIL FROM command)" + }, + "data": { + "error": { + "code": { + "basic": "550", + "enhanced": "5.7.1" + }, + "label": "Unfortunately, messages from [31.57.142.204] weren't sent. Please contact your Internet service provider since part of their network is on our block list (S3140). You can also refer your provider to http://mail.live.com/mail/troubleshooting.aspx#errors. [WP1FDK33EO054.eop-nam02.prod.protection.outlook.com 2023-01-01T00:00:00.001Z 03SDKS32D1WER234]", + "type": "action_not_taken", + "temporary": false, + "permanent": true, + "data": { + "type": "spam_content", + "blocked": true, + "spam": false + } + }, + "recipient": "erklgfsdlkgsld@outlook.com", + "server": { + "hostname": "outlook-com.olc.protection.outlook.com", + "ip": "140.74.15.33", + "port": null + }, + "command": "MAIL FROM" + } +} \ No newline at end of file diff --git a/test/fixtures/expected/550_5_7_1_reputation_variant_1.json b/test/fixtures/expected/550_5_7_1_reputation_variant_1.json new file mode 100644 index 0000000..00a2d53 --- /dev/null +++ b/test/fixtures/expected/550_5_7_1_reputation_variant_1.json @@ -0,0 +1,32 @@ +{ + "bounce": true, + "email": { + "body": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system\n\n: host gmail-smtp-in.l.google.com[124.205.72.62] said: 550-5.7.1 [93.177.87.181 19] Gmail has detected that this message is likely 550-5.7.1 suspicious due to the very low reputation of the sending domain. To 550-5.7.1 best protect our users from spam, the message has been blocked. 550-5.7.1 Please visit 550 5.7.1 https://support.google.com/mail/answer/188131 for more information. h6-20020a05640250c600b0054ab00d6afesi892868edb.356 - gsmtp (in reply to end of DATA command)", + "intro": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system", + "error": ": host gmail-smtp-in.l.google.com[124.205.72.62] said: 550-5.7.1 [93.177.87.181 19] Gmail has detected that this message is likely 550-5.7.1 suspicious due to the very low reputation of the sending domain. To 550-5.7.1 best protect our users from spam, the message has been blocked. 550-5.7.1 Please visit 550 5.7.1 https://support.google.com/mail/answer/188131 for more information. h6-20020a05640250c600b0054ab00d6afesi892868edb.356 - gsmtp (in reply to end of DATA command)" + }, + "data": { + "error": { + "code": { + "basic": "550", + "enhanced": "5.7.1" + }, + "label": "[93.177.87.181 19] Gmail has detected that this message is likely 550-5.7.1 suspicious due to the very low reputation of the sending domain. To 550-5.7.1 best protect our users from spam, the message has been blocked. 550-5.7.1 Please visit 550 5.7.1 https://support.google.com/mail/answer/188131 for more information. h6-20020a05640250c600b0054ab00d6afesi892868edb.356 - gsmtp", + "type": "action_not_taken", + "temporary": false, + "permanent": true, + "data": { + "type": "spam_content", + "blocked": true, + "spam": true + } + }, + "recipient": "valentin09594954@gmail.com", + "server": { + "hostname": "gmail-smtp-in.l.google.com", + "ip": "124.205.72.62", + "port": null + }, + "command": "DATA" + } +} \ No newline at end of file diff --git a/test/fixtures/expected/550_5_7_1_service_refused.json b/test/fixtures/expected/550_5_7_1_service_refused.json new file mode 100644 index 0000000..1ebcdf8 --- /dev/null +++ b/test/fixtures/expected/550_5_7_1_service_refused.json @@ -0,0 +1,32 @@ +{ + "bounce": true, + "email": { + "body": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system\n\n: host smtpz4.laposte.net[106.29.142.66] said: 550 5.7.1 Service refuse. Veuillez essayer plus tard. service refused, please try later. LPN007_510 (in reply to end of DATA command)", + "intro": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system", + "error": ": host smtpz4.laposte.net[106.29.142.66] said: 550 5.7.1 Service refuse. Veuillez essayer plus tard. service refused, please try later. LPN007_510 (in reply to end of DATA command)" + }, + "data": { + "error": { + "code": { + "basic": "550", + "enhanced": "5.7.1" + }, + "label": "Service refuse. Veuillez essayer plus tard. service refused, please try later. LPN007_510", + "type": "action_not_taken", + "temporary": false, + "permanent": true, + "data": { + "type": "spam_content", + "blocked": false, + "spam": false + } + }, + "recipient": "sci_ais@laposte.net", + "server": { + "hostname": "smtpz4.laposte.net", + "ip": "106.29.142.66", + "port": null + }, + "command": "DATA" + } +} \ No newline at end of file diff --git a/test/fixtures/expected/550_5_7_26_authentication_failure.json b/test/fixtures/expected/550_5_7_26_authentication_failure.json new file mode 100644 index 0000000..a049622 --- /dev/null +++ b/test/fixtures/expected/550_5_7_26_authentication_failure.json @@ -0,0 +1,32 @@ +{ + "bounce": true, + "email": { + "body": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system\n\n: host aspmx.l.google.com[124.205.72.62] said: 550-5.7.26 Unauthenticated email from acme.com is not accepted due to domain's 550-5.7.26 DMARC policy. Please contact the administrator of acme.com domain 550-5.7.26 if this was a legitimate mail. Please visit 550-5.7.26 https://support.google.com/mail/answer/2451690 to learn about the 550 5.7.26 DMARC initiative. v10-20020a170906488a11b0098d8390816asi945962ejq.756 - gsmtp (in reply to end of DATA command)", + "intro": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system", + "error": ": host aspmx.l.google.com[124.205.72.62] said: 550-5.7.26 Unauthenticated email from acme.com is not accepted due to domain's 550-5.7.26 DMARC policy. Please contact the administrator of acme.com domain 550-5.7.26 if this was a legitimate mail. Please visit 550-5.7.26 https://support.google.com/mail/answer/2451690 to learn about the 550 5.7.26 DMARC initiative. v10-20020a170906488a11b0098d8390816asi945962ejq.756 - gsmtp (in reply to end of DATA command)" + }, + "data": { + "error": { + "code": { + "basic": "550", + "enhanced": "5.7.26" + }, + "label": "Unauthenticated email from acme.com is not accepted due to domain's 550-5.7.26 DMARC policy. Please contact the administrator of acme.com domain 550-5.7.26 if this was a legitimate mail. Please visit 550-5.7.26 https://support.google.com/mail/answer/2451690 to learn about the 550 5.7.26 DMARC initiative. v10-20020a170906488a11b0098d8390816asi945962ejq.756 - gsmtp", + "type": "action_not_taken", + "temporary": false, + "permanent": true, + "data": { + "type": "authentication_failure", + "blocked": false, + "spam": false + } + }, + "recipient": "zopotodaniel@fyguare.com", + "server": { + "hostname": "aspmx.l.google.com", + "ip": "124.205.72.62", + "port": null + }, + "command": "DATA" + } +} \ No newline at end of file diff --git a/test/fixtures/expected/554_5_2_3_policy_violation.json b/test/fixtures/expected/554_5_2_3_policy_violation.json new file mode 100644 index 0000000..d515347 --- /dev/null +++ b/test/fixtures/expected/554_5_2_3_policy_violation.json @@ -0,0 +1,32 @@ +{ + "bounce": true, + "email": { + "body": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system\n\n: host mx.zoho.eu[158.203.221.166] said: 554 5.2.3 MailPolicy violation Error delivering to mailboxes (in reply to end of DATA command)", + "intro": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system", + "error": ": host mx.zoho.eu[158.203.221.166] said: 554 5.2.3 MailPolicy violation Error delivering to mailboxes (in reply to end of DATA command)" + }, + "data": { + "error": { + "code": { + "basic": "554", + "enhanced": "5.2.3" + }, + "label": "MailPolicy violation Error delivering to mailboxes", + "type": "transaction_failed", + "temporary": false, + "permanent": true, + "data": { + "type": null, + "blocked": false, + "spam": false + } + }, + "recipient": "support@databit.ch", + "server": { + "hostname": "mx.zoho.eu", + "ip": "158.203.221.166", + "port": null + }, + "command": "DATA" + } +} \ No newline at end of file diff --git a/test/fixtures/expected/554_5_7_7_equal_headers.json b/test/fixtures/expected/554_5_7_7_equal_headers.json new file mode 100644 index 0000000..34696e3 --- /dev/null +++ b/test/fixtures/expected/554_5_7_7_equal_headers.json @@ -0,0 +1,32 @@ +{ + "bounce": true, + "email": { + "body": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system\n\n: host spamrelay.zxcs.nl[158.140.82.21] said: 554 5.7.7 too many equal X-headers (X-Original-Authentication-Results:) (in reply to end of DATA command)", + "intro": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system", + "error": ": host spamrelay.zxcs.nl[158.140.82.21] said: 554 5.7.7 too many equal X-headers (X-Original-Authentication-Results:) (in reply to end of DATA command)" + }, + "data": { + "error": { + "code": { + "basic": "554", + "enhanced": "5.7.7" + }, + "label": "too many equal X-headers (X-Original-Authentication-Results:)", + "type": "transaction_failed", + "temporary": false, + "permanent": true, + "data": { + "type": null, + "blocked": false, + "spam": true + } + }, + "recipient": "nick@easy.nl", + "server": { + "hostname": "spamrelay.zxcs.nl", + "ip": "158.140.82.21", + "port": null + }, + "command": "DATA" + } +} \ No newline at end of file diff --git a/test/fixtures/expected/unknown_server_connection.json b/test/fixtures/expected/unknown_server_connection.json new file mode 100644 index 0000000..aedc737 --- /dev/null +++ b/test/fixtures/expected/unknown_server_connection.json @@ -0,0 +1,32 @@ +{ + "bounce": true, + "email": { + "body": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system\n\n: lost connection with mx.mail-data.net[134.244.220.69] while receiving the initial server greeting", + "intro": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system", + "error": ": lost connection with mx.mail-data.net[134.244.220.69] while receiving the initial server greeting" + }, + "data": { + "error": { + "code": { + "basic": null, + "enhanced": null + }, + "label": "lost connection with mx.mail-data.net[134.244.220.69] while receiving the initial server greeting", + "type": null, + "temporary": false, + "permanent": false, + "data": { + "type": null, + "blocked": false, + "spam": false + } + }, + "recipient": "pialy23044@marksia.com", + "server": { + "hostname": "mx.mail-data.net", + "ip": "134.244.220.69", + "port": null + }, + "command": null + } +} \ No newline at end of file diff --git a/test/fixtures/expected/unknown_server_connection_variant_1.json b/test/fixtures/expected/unknown_server_connection_variant_1.json new file mode 100644 index 0000000..a9fee4c --- /dev/null +++ b/test/fixtures/expected/unknown_server_connection_variant_1.json @@ -0,0 +1,32 @@ +{ + "bounce": true, + "email": { + "body": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system\n\n: connect to mails.epractice.org[189.199.78.194]:25: Connection refused", + "intro": "This is the mail system at host mailer.acme.email.\n\nI'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.\n\nFor further assistance, please send mail to postmaster.\n\nIf you do so, please include this problem report. You can delete your own text from the attached returned message.\n\nThe mail system", + "error": ": connect to mails.epractice.org[189.199.78.194]:25: Connection refused" + }, + "data": { + "error": { + "code": { + "basic": null, + "enhanced": null + }, + "label": "connect to mails.epractice.org[189.199.78.194]:25: Connection refused", + "type": null, + "temporary": false, + "permanent": false, + "data": { + "type": null, + "blocked": false, + "spam": false + } + }, + "recipient": "servicio3495@mails.epractice.org", + "server": { + "hostname": "mails.epractice.org", + "ip": "189.199.78.194", + "port": "25" + }, + "command": null + } +} \ No newline at end of file diff --git a/test/fixtures/unknown_server_connection.txt b/test/fixtures/unknown_server_connection.txt new file mode 100644 index 0000000..3e90a60 --- /dev/null +++ b/test/fixtures/unknown_server_connection.txt @@ -0,0 +1,14 @@ +This is the mail system at host mailer.acme.email. + +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 + +: lost connection with mx.mail-data.net[134.244.220.69] + while receiving the initial server greeting diff --git a/test/fixtures/unknown_server_connection_variant_1.txt b/test/fixtures/unknown_server_connection_variant_1.txt new file mode 100644 index 0000000..4bf5365 --- /dev/null +++ b/test/fixtures/unknown_server_connection_variant_1.txt @@ -0,0 +1,14 @@ +This is the mail system at host mailer.acme.email. + +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 + +: connect to + mails.epractice.org[189.199.78.194]:25: Connection refused diff --git a/test/index.js b/test/index.js index 4ba2ee6..a003c2a 100644 --- a/test/index.js +++ b/test/index.js @@ -94,13 +94,15 @@ module.exports = { testCommon: function(test) { loopTests( [ + "unknown_server_connection", + "unknown_server_connection_variant_1", + "unknown_server_unknown", "unknown_server_unknown_variant_1", "unknown_server_unknown_variant_2", "unknown_server_unknown_variant_3", "unknown_server_timeout", - "unknown_server_timeout_variant_1", "unknown_server_timeout_variant_2", "unknown_temporary", @@ -108,13 +110,22 @@ module.exports = { "421_too_many_connections", "421_4_4_2_timeout", + + "421_4_7_0_deferred", + "421_4_7_28_ip_blocked_spam", + "450_4_2_1_no_such_recipient", + + "450_4_2_1_rate_limited", + "451_action_aborted_local_error", - "451_4_7_650_reputation", + "451_4_7_1_reputation", - "450_4_2_1_no_such_recipient", + "451_4_7_500_server_busy", + + "451_4_7_650_reputation", "452_4_2_2_mailbox_full", @@ -138,6 +149,10 @@ module.exports = { "550_no_such_recipient_variant_10", "550_no_such_recipient_variant_11", + "550_5_0_1_no_such_recipient", + + "550_5_1_0_address_rejected", + "550_5_1_1_no_such_recipient", "550_5_1_1_no_such_recipient_variant_1", "550_5_1_1_no_such_recipient_variant_2", @@ -180,13 +195,20 @@ module.exports = { "550_5_5_0_no_such_recipient", + "550_5_7_1_blocked", + "550_5_7_1_reputation", + "550_5_7_1_reputation_variant_1", + + "550_5_7_1_service_refused", "550_5_7_1_spam_content", "550_5_7_1_spam_content_variant_1", "550_5_7_1_spam_content_variant_2", "550_5_7_1_spam_content_variant_3", + "550_5_7_26_authentication_failure", + "550_5_7_129_restricted_permissions", "552_no_such_recipient", @@ -206,11 +228,15 @@ module.exports = { "554_5_2_2_mailbox_full", + "554_5_2_3_policy_violation", + "554_5_7_1_no_such_recipient", "554_5_7_1_spam_content", "554_5_7_1_spam_content_variant_1", - "554_5_7_1_spam_content_variant_2" + "554_5_7_1_spam_content_variant_2", + + "554_5_7_7_equal_headers" ], (result, expected, entry) => {