email-bounce-parser 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/parser.js +23 -3
- package/package.json +1 -1
package/lib/parser.js
CHANGED
|
@@ -78,12 +78,20 @@ var REGEXES = {
|
|
|
78
78
|
spam : /(spam)/i,
|
|
79
79
|
|
|
80
80
|
enhanced_types_no_such_recipient : [
|
|
81
|
-
/(
|
|
82
|
-
/(
|
|
83
|
-
/(
|
|
81
|
+
/(recipient address rejected: access denied)/i, // Outlook DBEB for invalid addresses
|
|
82
|
+
/(invalid mailbox)/i,
|
|
83
|
+
/(do(e)?sn\'t exist)/i, // Some Chinese SMTP return "dosn't" instead of "doesn't"
|
|
84
84
|
/(account|user|mailbox) (is )?(terminated|disabled|not found|unavailable|invalid)/i
|
|
85
85
|
],
|
|
86
86
|
|
|
87
|
+
enhanced_types_server_unknown : [
|
|
88
|
+
/(does not accept mail)/i
|
|
89
|
+
],
|
|
90
|
+
|
|
91
|
+
enhanced_types_server_timeout : [
|
|
92
|
+
/(timeout|timed[\s\-]out)/i
|
|
93
|
+
],
|
|
94
|
+
|
|
87
95
|
error_code : [
|
|
88
96
|
/(\d{3})[\s\-](\d\.\d\.\d)/,
|
|
89
97
|
/(\d{3})/
|
|
@@ -318,6 +326,18 @@ class Parser {
|
|
|
318
326
|
if (_match && _match.length > 1) {
|
|
319
327
|
_type = "no_such_recipient";
|
|
320
328
|
}
|
|
329
|
+
|
|
330
|
+
_match = loopRegexes(this.__regexes.enhanced_types_server_unknown, str);
|
|
331
|
+
|
|
332
|
+
if (_match && _match.length > 1) {
|
|
333
|
+
_type = "server_unknown";
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
_match = loopRegexes(this.__regexes.enhanced_types_server_timeout, str);
|
|
337
|
+
|
|
338
|
+
if (_match && _match.length > 1) {
|
|
339
|
+
_type = "server_timeout";
|
|
340
|
+
}
|
|
321
341
|
}
|
|
322
342
|
}
|
|
323
343
|
|