BREAKING CHANGE(mta): migrate internal MTA to @push.rocks/smartmta and remove legacy mail/deliverability implementation

This commit is contained in:
2026-02-11 16:32:49 +00:00
parent 048f038e36
commit 530ebbf3e4
276 changed files with 1661 additions and 91193 deletions

View File

@@ -177,34 +177,28 @@ export class EmailOpsHandler {
async (dataArg) => {
const emailServer = this.opsServerRef.dcRouterRef.emailServer;
// Get bounce manager from email server via reflection
// BounceManager is private but we need to access it
const bounceManager = (emailServer as any)?.bounceManager;
if (!bounceManager) {
if (!emailServer) {
return { records: [], suppressionList: [], total: 0 };
}
// Get suppression list
const suppressionList = bounceManager.getSuppressionList();
// Get hard bounced addresses and convert to records
const hardBouncedAddresses = bounceManager.getHardBouncedAddresses();
// Use smartmta's public API for bounce/suppression data
const suppressionList = emailServer.getSuppressionList();
const hardBouncedAddresses = emailServer.getHardBouncedAddresses();
// Create bounce records from the available data
const records: interfaces.requests.IBounceRecord[] = [];
for (const email of hardBouncedAddresses) {
const bounceInfo = bounceManager.getBounceInfo(email);
const bounceInfo = emailServer.getBounceHistory(email);
if (bounceInfo) {
records.push({
id: `bounce-${email}`,
recipient: email,
sender: '',
domain: email.split('@')[1] || '',
bounceType: bounceInfo.type as interfaces.requests.TBounceType,
bounceCategory: bounceInfo.category as interfaces.requests.TBounceCategory,
timestamp: bounceInfo.lastBounce,
bounceType: (bounceInfo as any).type as interfaces.requests.TBounceType,
bounceCategory: (bounceInfo as any).category as interfaces.requests.TBounceCategory,
timestamp: (bounceInfo as any).lastBounce,
processed: true,
});
}
@@ -230,14 +224,13 @@ export class EmailOpsHandler {
'removeFromSuppressionList',
async (dataArg) => {
const emailServer = this.opsServerRef.dcRouterRef.emailServer;
const bounceManager = (emailServer as any)?.bounceManager;
if (!bounceManager) {
return { success: false, error: 'Bounce manager not available' };
if (!emailServer) {
return { success: false, error: 'Email server not available' };
}
try {
bounceManager.removeFromSuppressionList(dataArg.email);
emailServer.removeFromSuppressionList(dataArg.email);
return { success: true };
} catch (error) {
return {