Skip to content

Commit

Permalink
fix: fixed pgp subject and message, updated bounce info
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Dec 11, 2024
1 parent c689e9a commit 875de2b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/controllers/api/v1/lookup.js
Original file line number Diff line number Diff line change
Expand Up @@ -563,13 +563,13 @@ async function lookup(ctx) {
const subject = i18n.translate(
'MULTIPLE_PGP_SUBJECT',
obj.locale,
username
`${username}@${domain.name}`
);
const message = i18n.translate(
'MULTIPLE_PGP_MESSAGE',
obj.locale,
domain.name,
username
`${username}@${domain.name}`
);
await email({
template: 'alert',
Expand Down
12 changes: 7 additions & 5 deletions helpers/get-bounce-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,16 @@ function getBounceInfo(err) {
response.includes('blacklisted') ||
response.includes('blocklisted')) &&
response.includes(IP_ADDRESS)
)
) {
// <https://sender.office.com/> <-- submit request here
// <https://sendersupport.olc.protection.outlook.com/pm/>
bounceInfo.category = 'blocklist';
//
// dmarc failures shouldn't occur since we check them on our side
//
else if (bounceInfo.category === 'dmarc') bounceInfo.action = 'defer';
} else if (response.includes('unusual rate of mail')) {
bounceInfo.category = 'spam';
//
// dmarc failures shouldn't occur since we check them on our side
//
} else if (bounceInfo.category === 'dmarc') bounceInfo.action = 'defer';
else if (
REGEX_DENYLIST.test(response) ||
REGEX_BLACKLIST.test(response) ||
Expand Down

0 comments on commit 875de2b

Please sign in to comment.