Skip to content

Commit

Permalink
fix: added yahoo temp deferred error to blocklist
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Aug 31, 2023
1 parent f9e6e1d commit 4b0a13e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions helpers/process-email.js
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,6 @@ async function processEmail({ email, port = 25, resolver, client }) {
// (this gives postmasters like Outlook and Gmail a back-off period)
// (and gives opportunity for another server to try sending it)
//
console.time('is recently blocked');
const isRecentlyBlocked = await Emails.exists({
updated_at: {
$gte: dayjs().subtract(1, 'hour').toDate(),
Expand All @@ -724,7 +723,6 @@ async function processEmail({ email, port = 25, resolver, client }) {
}
}
});
console.timeEnd('is recently blocked');

if (isRecentlyBlocked) {
const err = Boom.badRequest(
Expand Down
2 changes: 2 additions & 0 deletions helpers/send-email.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ async function shouldThrowError(err, session) {
} else if (err.response.includes('AUP#1260'))
// IPv6 not supported with Spectrum
err.responseCode = 421;
else if (err.response.includes('temporarily deferred'))
err.bounceInfo.category = 'blocklist';
else if (err.response.includes('JunkMail rejected'))
err.bounceInfo.category = 'blocklist';
else if (
Expand Down

0 comments on commit 4b0a13e

Please sign in to comment.