-
Notifications
You must be signed in to change notification settings - Fork 130
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixed outlook DMARC issue, switched default code from 421 to 550…
… for nonexistent aliases, fixed privacy protection with Received/X-Original-To header, fixed ARC sealing after message modifications, fixed header potential mutation, fixed duplicate FE header issue, updated FAQ, bump locales, enhance test edge cases
- Loading branch information
Showing
40 changed files
with
456 additions
and
342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -229,7 +229,7 @@ async function getForwardingAddresses( | |
if (!isSANB(record) && !hasIMAP) | ||
throw new SMTPError( | ||
`${address} is not yet configured with its email service provider ${config.urls.web} ;`, | ||
{ responseCode: 421, ignore_hook: true, notConfigured: true } | ||
{ responseCode: 550, ignore_hook: true, notConfigured: true } | ||
); | ||
|
||
// e.g. user@example.com => [email protected] | ||
|
@@ -557,7 +557,7 @@ async function getForwardingAddresses( | |
if (forwardingAddresses.length === 0 && !hasIMAP) { | ||
throw new SMTPError( | ||
`${address} is not yet configured with its email service provider ${config.urls.web} ;`, | ||
{ responseCode: 421, ignore_hook: true, notConfigured: true } | ||
{ responseCode: 550, ignore_hook: true, notConfigured: true } | ||
); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,6 @@ 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'); | ||
|
||
|
@@ -96,13 +95,12 @@ function isArbitrary(session, headers) { | |
); | ||
|
||
// until adobe responds | ||
if ( | ||
subject && | ||
subject.includes( | ||
'Signature requested on "the agreement for your new checking account with us"' | ||
) | ||
) | ||
throw new SMTPError('Spam from Adobe'); | ||
// if ( | ||
// subject && | ||
// subject.includes('Signature requested on') && | ||
// session.originalFromAddress === '[email protected]' | ||
// ) | ||
// throw new SMTPError('Due to spam from Adobe this message is blocked'); | ||
|
||
// | ||
// check for paypal scam (very strict until PayPal resolves phishing on their side) | ||
|
@@ -270,19 +268,8 @@ function isArbitrary(session, headers) { | |
) && | ||
!(subject && REGEX_SYSADMIN_SUBJECT.test(subject)) | ||
) { | ||
// TODO: until we're certain this is properly working we're going to monitor it with code bug to admins | ||
const err = new TypeError( | ||
`Spoofing detected and was soft blocked from ${ | ||
session.resolvedRootClientHostname || session.remoteAddress | ||
}` | ||
); | ||
err.isCodeBug = true; | ||
err.session = session; | ||
logger.fatal(err); | ||
|
||
throw new SMTPError( | ||
'Message likely to be spoofing attack and was rejected due to lack of SPF alignment with From header', | ||
{ responseCode: 421 } | ||
'Message likely to be spoofing attack and was rejected due to lack of SPF alignment with From header' | ||
); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.