Skip to content

Commit

Permalink
fix(mbix_full): Return a hard bounce for full mailbox
Browse files Browse the repository at this point in the history
  • Loading branch information
andris9 committed Oct 23, 2023
1 parent 3db8d8b commit d596226
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ DSN.rcpt_too_fast = () =>
1
);

// default mbox_full is 450
DSN.mbox_full_554 = () => DSN.create(554, 'Mailbox full', 2, 2);

let defaultSpamRejectMessage =
'Our system has detected that this message is likely unsolicited mail.\nTo reduce the amount of spam this message has been blocked.';

Expand Down Expand Up @@ -857,7 +860,7 @@ exports.real_rcpt_handler = function (next, connection, params) {
_default_address: rcpt.address() !== userData.address ? userData.address : ''
};
txn.notes.rejectCode = 'MBOX_FULL';
return hookDone(DENY, DSN.mbox_full());
return hookDone(DENY, DSN.mbox_full_554());
}

checkIpRateLimit(userData, () => {
Expand Down

0 comments on commit d596226

Please sign in to comment.