Treat on,y Permanent bounces as hard bounces, skip everything else (eg autorseponders)

This commit is contained in:
Andris Reinman 2016-12-12 21:45:53 +02:00
parent b35be19824
commit efe65ffc3c

View file

@ -48,7 +48,7 @@ router.post('/aws', (req, res, next) => {
switch (req.body.Message.notificationType) { switch (req.body.Message.notificationType) {
case 'Bounce': case 'Bounce':
campaigns.updateMessage(message, 'bounced', ['Undetermined', 'Permanent'].indexOf(req.body.Message.bounce.bounceType) >= 0, (err, updated) => { campaigns.updateMessage(message, 'bounced', req.body.Message.bounce.bounceType === 'Permanent', (err, updated) => {
if (err) { if (err) {
log.error('AWS', 'Failed updating message: %s', err.stack); log.error('AWS', 'Failed updating message: %s', err.stack);
} else if (updated) { } else if (updated) {