email-bounce-parser 1.0.1 → 1.0.2
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 +8 -6
- package/package.json +1 -1
package/lib/parser.js
CHANGED
|
@@ -54,9 +54,11 @@ var REGEXES = {
|
|
|
54
54
|
|
|
55
55
|
error : [
|
|
56
56
|
/said\: (\d{3}(?:[\s\-]\d\.\d\.\d\d?)?) (.+) \(in reply to/m,
|
|
57
|
+
/said\: (\d{3}(?:[\s\-]\d\.\d\.\d\d?)?)-(.+)/m,
|
|
57
58
|
/LMTP error after (?:.+?)\:\<.+?\>\: (\d{3}(?:[\s\-]\d\.\d\.\d\d?)?) <.+?\>(.+)$/m,
|
|
58
59
|
/Remote Server returned \'(\d{3}(?:[\s\-]\d\.\d\.\d\d?)?) (.+)\'/m,
|
|
59
60
|
/The response from the remote server was:\s(\d{3}(?:[\s\-]\d\.\d\.\d\d?)?) (.+)/m,
|
|
61
|
+
/refused to talk to me\: (\d{3}(?:[\s\-]\d\.\d\.\d\d?)?) (.+)/m,
|
|
60
62
|
/Error\:\s*?(\d{3}(?:[\s\-]\d\.\d\.\d\d?)?) (.+)/m,
|
|
61
63
|
/reason: (\d{3}[\s\-]\d\.\d\.\d\d?) (.+)/m,
|
|
62
64
|
/(\d{3}[\s\-]\d\.\d\.\d\d?)/m
|
|
@@ -217,13 +219,13 @@ class Parser {
|
|
|
217
219
|
if (_match && _match.length > 1) {
|
|
218
220
|
_code = this.__parseErrorCode(_match[1]);
|
|
219
221
|
_label = trimString(_match[2]);
|
|
220
|
-
}
|
|
221
222
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
223
|
+
// Check temporary / permanent
|
|
224
|
+
if (_code.basic[0] === "4") {
|
|
225
|
+
_temporary = true;
|
|
226
|
+
} else if (_code.basic[0] === "5") {
|
|
227
|
+
_permanent = true;
|
|
228
|
+
}
|
|
227
229
|
}
|
|
228
230
|
|
|
229
231
|
// Extract further data
|