v1.15.1. Do not throw when VERP message parsing fails
This commit is contained in:
parent
ef4aa301ab
commit
175b8eb94d
2 changed files with 13 additions and 6 deletions
10
package.json
10
package.json
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "mailtrain",
|
||||
"private": true,
|
||||
"version": "1.15.0",
|
||||
"version": "1.15.1",
|
||||
"description": "Self hosted email newsletter app",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
@ -31,7 +31,7 @@
|
|||
"dependencies": {
|
||||
"bcrypt-nodejs": "0.0.3",
|
||||
"body-parser": "^1.15.2",
|
||||
"bounce-handler": "^7.3.2-fork.0",
|
||||
"bounce-handler": "^7.3.2-fork.1",
|
||||
"compression": "^1.6.2",
|
||||
"config": "^1.21.0",
|
||||
"connect-flash": "^0.1.1",
|
||||
|
@ -52,7 +52,7 @@
|
|||
"humanize": "0.0.9",
|
||||
"is-url": "^1.2.2",
|
||||
"isemail": "^2.2.1",
|
||||
"jsdom": "^9.4.1",
|
||||
"jsdom": "^9.4.2",
|
||||
"juice": "^2.0.0",
|
||||
"libmime": "^2.0.3",
|
||||
"mkdirp": "^0.5.1",
|
||||
|
@ -63,14 +63,14 @@
|
|||
"nodemailer": "^2.5.0",
|
||||
"nodemailer-openpgp": "^1.0.2",
|
||||
"npmlog": "^4.0.0",
|
||||
"openpgp": "^2.3.2",
|
||||
"openpgp": "^2.3.3",
|
||||
"passport": "^0.3.2",
|
||||
"passport-local": "^1.0.0",
|
||||
"request": "^2.74.0",
|
||||
"serve-favicon": "^2.3.0",
|
||||
"shortid": "^2.2.6",
|
||||
"slugify": "^1.0.2",
|
||||
"smtp-server": "^1.14.0",
|
||||
"smtp-server": "^1.14.1",
|
||||
"striptags": "^2.1.1",
|
||||
"toml": "^2.3.0"
|
||||
}
|
||||
|
|
|
@ -74,7 +74,14 @@ let server = new SMTPServer({
|
|||
let body = Buffer.concat(chunks, chunklen).toString();
|
||||
|
||||
let bh = new BounceHandler();
|
||||
let bounceResult = [].concat(bh.parse_email(body) || []).shift();
|
||||
let bounceResult;
|
||||
|
||||
try {
|
||||
bounceResult = [].concat(bh.parse_email(body) || []).shift();
|
||||
} catch (E) {
|
||||
log.error('Bounce', 'Failed parsing bounce message');
|
||||
log.error('Bounce', JSON.stringify(body));
|
||||
}
|
||||
|
||||
if (!bounceResult || ['failed', 'transient'].indexOf(bounceResult.action) < 0) {
|
||||
return callback(null, 'Message accepted');
|
||||
|
|
Loading…
Reference in a new issue