Skip to content

Commit

Permalink
fix: dummy proof outlook misdirected spam for all locales
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Jan 8, 2025
1 parent b563e66 commit 449fcd5
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions helpers/is-arbitrary.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ const RE2 = require('re2');
const isSANB = require('is-string-and-not-blank');
const { fromUrl, parseDomain } = require('parse-domain');

const config = require('#config');
const env = require('#config/env');
const SMTPError = require('#helpers/smtp-error');
const checkSRS = require('#helpers/check-srs');
const config = require('#config');
const env = require('#config/env');
const getHeaders = require('#helpers/get-headers');
const isAutoReplyOrMailingList = require('#helpers/is-auto-reply-or-mailing-list');
const logger = require('#helpers/logger');
const parseHostFromDomainOrAddress = require('#helpers/parse-host-from-domain-or-address');
const parseRootDomain = require('#helpers/parse-root-domain');
Expand Down Expand Up @@ -160,8 +161,11 @@ function isArbitrary(session, headers) {
)) ||
(session.originalFromAddress.startsWith('postmaster@') &&
session.originalFromAddress.endsWith('.onmicrosoft.com'))) &&
subject &&
subject.startsWith('Undeliverable: ')
isAutoReplyOrMailingList(headers)
// subject &&
// subject.startsWith('Undeliverable: ')
// NOTE: there are too many edge cases with outlook since it needs translated for subject
// e.g. there is a subject that is "No se puede entregar: "
)
throw new SMTPError(
'Due to spam from onmicrosoft.com we have implemented restrictions; see https://old.reddit.com/r/msp/comments/16n8p0j/spam_increase_from_onmicrosoftcom_addresses/ ;'
Expand Down

0 comments on commit 449fcd5

Please sign in to comment.