@push.rocks/smartmta 5.1.3 → 5.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/changelog.md +15 -0
  2. package/dist_ts/00_commitinfo_data.d.ts +8 -0
  3. package/dist_ts/00_commitinfo_data.js +9 -0
  4. package/dist_ts/index.d.ts +3 -0
  5. package/dist_ts/index.js +4 -0
  6. package/dist_ts/logger.d.ts +17 -0
  7. package/dist_ts/logger.js +76 -0
  8. package/dist_ts/mail/core/classes.bouncemanager.d.ts +185 -0
  9. package/dist_ts/mail/core/classes.bouncemanager.js +569 -0
  10. package/dist_ts/mail/core/classes.email.d.ts +291 -0
  11. package/dist_ts/mail/core/classes.email.js +802 -0
  12. package/dist_ts/mail/core/classes.emailvalidator.d.ts +61 -0
  13. package/dist_ts/mail/core/classes.emailvalidator.js +184 -0
  14. package/dist_ts/mail/core/classes.templatemanager.d.ts +95 -0
  15. package/dist_ts/mail/core/classes.templatemanager.js +240 -0
  16. package/dist_ts/mail/core/index.d.ts +4 -0
  17. package/dist_ts/mail/core/index.js +6 -0
  18. package/dist_ts/mail/delivery/classes.delivery.queue.d.ts +163 -0
  19. package/dist_ts/mail/delivery/classes.delivery.queue.js +488 -0
  20. package/dist_ts/mail/delivery/classes.delivery.system.d.ts +160 -0
  21. package/dist_ts/mail/delivery/classes.delivery.system.js +630 -0
  22. package/dist_ts/mail/delivery/classes.unified.rate.limiter.d.ts +200 -0
  23. package/dist_ts/mail/delivery/classes.unified.rate.limiter.js +820 -0
  24. package/dist_ts/mail/delivery/index.d.ts +4 -0
  25. package/dist_ts/mail/delivery/index.js +6 -0
  26. package/dist_ts/mail/delivery/interfaces.d.ts +140 -0
  27. package/dist_ts/mail/delivery/interfaces.js +17 -0
  28. package/dist_ts/mail/index.d.ts +7 -0
  29. package/dist_ts/mail/index.js +12 -0
  30. package/dist_ts/mail/routing/classes.dkim.manager.d.ts +25 -0
  31. package/dist_ts/mail/routing/classes.dkim.manager.js +127 -0
  32. package/dist_ts/mail/routing/classes.dns.manager.d.ts +79 -0
  33. package/dist_ts/mail/routing/classes.dns.manager.js +415 -0
  34. package/dist_ts/mail/routing/classes.domain.registry.d.ts +54 -0
  35. package/dist_ts/mail/routing/classes.domain.registry.js +119 -0
  36. package/dist_ts/mail/routing/classes.email.action.executor.d.ts +33 -0
  37. package/dist_ts/mail/routing/classes.email.action.executor.js +137 -0
  38. package/dist_ts/mail/routing/classes.email.router.d.ts +171 -0
  39. package/dist_ts/mail/routing/classes.email.router.js +494 -0
  40. package/dist_ts/mail/routing/classes.unified.email.server.d.ts +241 -0
  41. package/dist_ts/mail/routing/classes.unified.email.server.js +935 -0
  42. package/dist_ts/mail/routing/index.d.ts +7 -0
  43. package/dist_ts/mail/routing/index.js +9 -0
  44. package/dist_ts/mail/routing/interfaces.d.ts +187 -0
  45. package/dist_ts/mail/routing/interfaces.js +2 -0
  46. package/dist_ts/mail/security/classes.dkimcreator.d.ts +72 -0
  47. package/dist_ts/mail/security/classes.dkimcreator.js +360 -0
  48. package/dist_ts/mail/security/classes.spfverifier.d.ts +62 -0
  49. package/dist_ts/mail/security/classes.spfverifier.js +87 -0
  50. package/dist_ts/mail/security/index.d.ts +2 -0
  51. package/dist_ts/mail/security/index.js +4 -0
  52. package/dist_ts/paths.d.ts +14 -0
  53. package/dist_ts/paths.js +39 -0
  54. package/dist_ts/plugins.d.ts +24 -0
  55. package/dist_ts/plugins.js +28 -0
  56. package/dist_ts/security/classes.contentscanner.d.ts +130 -0
  57. package/dist_ts/security/classes.contentscanner.js +338 -0
  58. package/dist_ts/security/classes.ipreputationchecker.d.ts +73 -0
  59. package/dist_ts/security/classes.ipreputationchecker.js +263 -0
  60. package/dist_ts/security/classes.rustsecuritybridge.d.ts +403 -0
  61. package/dist_ts/security/classes.rustsecuritybridge.js +502 -0
  62. package/dist_ts/security/classes.securitylogger.d.ts +140 -0
  63. package/dist_ts/security/classes.securitylogger.js +235 -0
  64. package/dist_ts/security/index.d.ts +4 -0
  65. package/dist_ts/security/index.js +5 -0
  66. package/package.json +6 -1
  67. package/ts/00_commitinfo_data.ts +8 -0
  68. package/ts/index.ts +3 -0
  69. package/ts/logger.ts +91 -0
  70. package/ts/mail/core/classes.bouncemanager.ts +731 -0
  71. package/ts/mail/core/classes.email.ts +942 -0
  72. package/ts/mail/core/classes.emailvalidator.ts +239 -0
  73. package/ts/mail/core/classes.templatemanager.ts +320 -0
  74. package/ts/mail/core/index.ts +5 -0
  75. package/ts/mail/delivery/classes.delivery.queue.ts +645 -0
  76. package/ts/mail/delivery/classes.delivery.system.ts +816 -0
  77. package/ts/mail/delivery/classes.unified.rate.limiter.ts +1053 -0
  78. package/ts/mail/delivery/index.ts +5 -0
  79. package/ts/mail/delivery/interfaces.ts +167 -0
  80. package/ts/mail/index.ts +17 -0
  81. package/ts/mail/routing/classes.dkim.manager.ts +157 -0
  82. package/ts/mail/routing/classes.dns.manager.ts +573 -0
  83. package/ts/mail/routing/classes.domain.registry.ts +139 -0
  84. package/ts/mail/routing/classes.email.action.executor.ts +175 -0
  85. package/ts/mail/routing/classes.email.router.ts +575 -0
  86. package/ts/mail/routing/classes.unified.email.server.ts +1207 -0
  87. package/ts/mail/routing/index.ts +9 -0
  88. package/ts/mail/routing/interfaces.ts +202 -0
  89. package/ts/mail/security/classes.dkimcreator.ts +447 -0
  90. package/ts/mail/security/classes.spfverifier.ts +126 -0
  91. package/ts/mail/security/index.ts +3 -0
  92. package/ts/paths.ts +48 -0
  93. package/ts/plugins.ts +53 -0
  94. package/ts/security/classes.contentscanner.ts +400 -0
  95. package/ts/security/classes.ipreputationchecker.ts +315 -0
  96. package/ts/security/classes.rustsecuritybridge.ts +964 -0
  97. package/ts/security/classes.securitylogger.ts +299 -0
  98. package/ts/security/index.ts +40 -0
package/changelog.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-02-11 - 5.2.1 - fix(rust-bridge)
4
+ map Node.js platform/arch to tsrust-style suffix and add platform-specific and dev localPaths for RustBridge
5
+
6
+ - Add getPlatformSuffix() to map process.platform/process.arch to tsrust-style suffixes (e.g. linux_amd64)
7
+ - Include dist_rust/mailer-bin_{suffix} when available to prefer cross-compiled binaries
8
+ - Consolidate localPaths and add local dev build paths (rust/target/release and rust/target/debug)
9
+ - Pass the computed localPaths array into plugins.smartrust.RustBridge (searchSystemPath remains disabled)
10
+
11
+ ## 2026-02-11 - 5.2.0 - feat(packaging)
12
+ add package exports entry, include ts/dist_ts in package files, and add TS barrel index re-exports
13
+
14
+ - package.json: add "exports" mapping "." -> "./dist_ts/index.js" to provide a module entry point
15
+ - package.json: add "ts/**/*" and "dist_ts/**/*" to "files" so TypeScript sources and built output are published
16
+ - ts/index.ts: new barrel that re-exports './00_commitinfo_data.js', './mail/index.js', and './security/index.js'
17
+
3
18
  ## 2026-02-11 - 5.1.3 - fix(docs)
4
19
  clarify sendEmail default behavior and document automatic MX discovery and delivery modes
5
20
 
@@ -0,0 +1,8 @@
1
+ /**
2
+ * autocreated commitinfo by @push.rocks/commitinfo
3
+ */
4
+ export declare const commitinfo: {
5
+ name: string;
6
+ version: string;
7
+ description: string;
8
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * autocreated commitinfo by @push.rocks/commitinfo
3
+ */
4
+ export const commitinfo = {
5
+ name: '@push.rocks/smartmta',
6
+ version: '5.2.1',
7
+ description: 'A high-performance, enterprise-grade Mail Transfer Agent (MTA) built from scratch in TypeScript with Rust acceleration.'
8
+ };
9
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSxzQkFBc0I7SUFDNUIsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHlIQUF5SDtDQUN2SSxDQUFBIn0=
@@ -0,0 +1,3 @@
1
+ export * from './00_commitinfo_data.js';
2
+ export * from './mail/index.js';
3
+ export * from './security/index.js';
@@ -0,0 +1,4 @@
1
+ export * from './00_commitinfo_data.js';
2
+ export * from './mail/index.js';
3
+ export * from './security/index.js';
4
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHlCQUF5QixDQUFDO0FBQ3hDLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYyxxQkFBcUIsQ0FBQyJ9
@@ -0,0 +1,17 @@
1
+ declare class StandardLogger {
2
+ private defaultContext;
3
+ private correlationId;
4
+ constructor();
5
+ log(level: 'error' | 'warn' | 'info' | 'success' | 'debug', message: string, context?: Record<string, any>): void;
6
+ error(message: string, context?: Record<string, any>): void;
7
+ warn(message: string, context?: Record<string, any>): void;
8
+ info(message: string, context?: Record<string, any>): void;
9
+ success(message: string, context?: Record<string, any>): void;
10
+ debug(message: string, context?: Record<string, any>): void;
11
+ setContext(context: Record<string, any>, overwrite?: boolean): void;
12
+ setCorrelationId(id?: string | null): string;
13
+ getCorrelationId(): string | null;
14
+ clearCorrelationId(): void;
15
+ }
16
+ export declare const logger: StandardLogger;
17
+ export {};
@@ -0,0 +1,76 @@
1
+ import * as plugins from './plugins.js';
2
+ import { randomUUID } from 'node:crypto';
3
+ // Map NODE_ENV to valid TEnvironment
4
+ const nodeEnv = process.env.NODE_ENV || 'production';
5
+ const envMap = {
6
+ 'development': 'local',
7
+ 'test': 'test',
8
+ 'staging': 'staging',
9
+ 'production': 'production'
10
+ };
11
+ // Default Smartlog instance
12
+ const baseLogger = new plugins.smartlog.Smartlog({
13
+ logContext: {
14
+ environment: envMap[nodeEnv] || 'production',
15
+ runtime: 'node',
16
+ zone: 'serve.zone',
17
+ }
18
+ });
19
+ // Extended logger compatible with the original enhanced logger API
20
+ class StandardLogger {
21
+ defaultContext = {};
22
+ correlationId = null;
23
+ constructor() { }
24
+ // Log methods
25
+ log(level, message, context = {}) {
26
+ const combinedContext = {
27
+ ...this.defaultContext,
28
+ ...context
29
+ };
30
+ if (this.correlationId) {
31
+ combinedContext.correlation_id = this.correlationId;
32
+ }
33
+ baseLogger.log(level, message, combinedContext);
34
+ }
35
+ error(message, context = {}) {
36
+ this.log('error', message, context);
37
+ }
38
+ warn(message, context = {}) {
39
+ this.log('warn', message, context);
40
+ }
41
+ info(message, context = {}) {
42
+ this.log('info', message, context);
43
+ }
44
+ success(message, context = {}) {
45
+ this.log('success', message, context);
46
+ }
47
+ debug(message, context = {}) {
48
+ this.log('debug', message, context);
49
+ }
50
+ // Context management
51
+ setContext(context, overwrite = false) {
52
+ if (overwrite) {
53
+ this.defaultContext = context;
54
+ }
55
+ else {
56
+ this.defaultContext = {
57
+ ...this.defaultContext,
58
+ ...context
59
+ };
60
+ }
61
+ }
62
+ // Correlation ID management
63
+ setCorrelationId(id = null) {
64
+ this.correlationId = id || randomUUID();
65
+ return this.correlationId;
66
+ }
67
+ getCorrelationId() {
68
+ return this.correlationId;
69
+ }
70
+ clearCorrelationId() {
71
+ this.correlationId = null;
72
+ }
73
+ }
74
+ // Export a singleton instance
75
+ export const logger = new StandardLogger();
76
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nZ2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbG9nZ2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sY0FBYyxDQUFDO0FBQ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ENBQUM7SUFDSCxDQUFDO0lBRUQsNEJBQTRCO0lBQ3JCLGdCQUFnQixDQUFDLEtBQW9CLElBQUk7UUFDOUMsSUFBSSxDQUFDLGFBQWEsR0FBRyxFQUFFLElBQUksVUFBVSxFQUFFLENBQUM7UUFDeEMsT0FBTyxJQUFJLENBQUMsYUFBYSxDQUFDO0lBQzVCLENBQUM7SUFFTSxnQkFBZ0I7UUFDckIsT0FBTyxJQUFJLENBQUMsYUFBYSxDQUFDO0lBQzVCLENBQUM7SUFFTSxrQkFBa0I7UUFDdkIsSUFBSSxDQUFDLGFBQWEsR0FBRyxJQUFJLENBQUM7SUFDNUIsQ0FBQztDQUNGO0FBRUQsOEJBQThCO0FBQzlCLE1BQU0sQ0FBQyxNQUFNLE1BQU0sR0FBRyxJQUFJLGNBQWMsRUFBRSxDQUFDIn0=
@@ -0,0 +1,185 @@
1
+ import type { Email } from './classes.email.js';
2
+ /**
3
+ * Bounce types for categorizing the reasons for bounces
4
+ */
5
+ export declare enum BounceType {
6
+ INVALID_RECIPIENT = "invalid_recipient",
7
+ DOMAIN_NOT_FOUND = "domain_not_found",
8
+ MAILBOX_FULL = "mailbox_full",
9
+ MAILBOX_INACTIVE = "mailbox_inactive",
10
+ BLOCKED = "blocked",
11
+ SPAM_RELATED = "spam_related",
12
+ POLICY_RELATED = "policy_related",
13
+ SERVER_UNAVAILABLE = "server_unavailable",
14
+ TEMPORARY_FAILURE = "temporary_failure",
15
+ QUOTA_EXCEEDED = "quota_exceeded",
16
+ NETWORK_ERROR = "network_error",
17
+ TIMEOUT = "timeout",
18
+ AUTO_RESPONSE = "auto_response",
19
+ CHALLENGE_RESPONSE = "challenge_response",
20
+ UNKNOWN = "unknown"
21
+ }
22
+ /**
23
+ * Hard vs soft bounce classification
24
+ */
25
+ export declare enum BounceCategory {
26
+ HARD = "hard",
27
+ SOFT = "soft",
28
+ AUTO_RESPONSE = "auto_response",
29
+ UNKNOWN = "unknown"
30
+ }
31
+ /**
32
+ * Bounce data structure
33
+ */
34
+ export interface BounceRecord {
35
+ id: string;
36
+ originalEmailId?: string;
37
+ recipient: string;
38
+ sender: string;
39
+ domain: string;
40
+ subject?: string;
41
+ bounceType: BounceType;
42
+ bounceCategory: BounceCategory;
43
+ timestamp: number;
44
+ smtpResponse?: string;
45
+ diagnosticCode?: string;
46
+ statusCode?: string;
47
+ headers?: Record<string, string>;
48
+ processed: boolean;
49
+ retryCount?: number;
50
+ nextRetryTime?: number;
51
+ }
52
+ /**
53
+ * Retry strategy configuration for soft bounces
54
+ */
55
+ interface RetryStrategy {
56
+ maxRetries: number;
57
+ initialDelay: number;
58
+ maxDelay: number;
59
+ backoffFactor: number;
60
+ }
61
+ /**
62
+ * Manager for handling email bounces
63
+ */
64
+ export declare class BounceManager {
65
+ private retryStrategy;
66
+ private bounceStore;
67
+ private bounceCache;
68
+ private suppressionList;
69
+ private storageManager?;
70
+ constructor(options?: {
71
+ retryStrategy?: Partial<RetryStrategy>;
72
+ maxCacheSize?: number;
73
+ cacheTTL?: number;
74
+ storageManager?: any;
75
+ });
76
+ /**
77
+ * Process a bounce notification
78
+ * @param bounceData Bounce data to process
79
+ * @returns Processed bounce record
80
+ */
81
+ processBounce(bounceData: Partial<BounceRecord>): Promise<BounceRecord>;
82
+ /**
83
+ * Process an SMTP failure as a bounce
84
+ * @param recipient Recipient email
85
+ * @param smtpResponse SMTP error response
86
+ * @param options Additional options
87
+ * @returns Processed bounce record
88
+ */
89
+ processSmtpFailure(recipient: string, smtpResponse: string, options?: {
90
+ sender?: string;
91
+ originalEmailId?: string;
92
+ statusCode?: string;
93
+ headers?: Record<string, string>;
94
+ }): Promise<BounceRecord>;
95
+ /**
96
+ * Process a bounce notification email
97
+ * @param bounceEmail The email containing bounce information
98
+ * @returns Processed bounce record or null if not a bounce
99
+ */
100
+ processBounceEmail(bounceEmail: Email): Promise<BounceRecord | null>;
101
+ /**
102
+ * Handle a hard bounce by adding to suppression list
103
+ * @param bounce The bounce record
104
+ */
105
+ private handleHardBounce;
106
+ /**
107
+ * Handle a soft bounce by scheduling a retry if eligible
108
+ * @param bounce The bounce record
109
+ */
110
+ private handleSoftBounce;
111
+ /**
112
+ * Add an email address to the suppression list
113
+ * @param email Email address to suppress
114
+ * @param reason Reason for suppression
115
+ * @param expiresAt Expiration timestamp (undefined for permanent)
116
+ */
117
+ addToSuppressionList(email: string, reason: string, expiresAt?: number): void;
118
+ /**
119
+ * Remove an email address from the suppression list
120
+ * @param email Email address to remove
121
+ */
122
+ removeFromSuppressionList(email: string): void;
123
+ /**
124
+ * Check if an email is on the suppression list
125
+ * @param email Email address to check
126
+ * @returns Whether the email is suppressed
127
+ */
128
+ isEmailSuppressed(email: string): boolean;
129
+ /**
130
+ * Get suppression information for an email
131
+ * @param email Email address to check
132
+ * @returns Suppression information or null if not suppressed
133
+ */
134
+ getSuppressionInfo(email: string): {
135
+ reason: string;
136
+ timestamp: number;
137
+ expiresAt?: number;
138
+ } | null;
139
+ /**
140
+ * Save suppression list to disk
141
+ */
142
+ private saveSuppressionList;
143
+ /**
144
+ * Load suppression list from disk
145
+ */
146
+ private loadSuppressionList;
147
+ /**
148
+ * Save bounce record to disk
149
+ * @param bounce Bounce record to save
150
+ */
151
+ private saveBounceRecord;
152
+ /**
153
+ * Update bounce cache with new bounce information
154
+ * @param bounce Bounce record to update cache with
155
+ */
156
+ private updateBounceCache;
157
+ /**
158
+ * Check bounce history for an email address
159
+ * @param email Email address to check
160
+ * @returns Bounce information or null if no bounces
161
+ */
162
+ getBounceInfo(email: string): {
163
+ lastBounce: number;
164
+ count: number;
165
+ type: BounceType;
166
+ category: BounceCategory;
167
+ } | null;
168
+ /**
169
+ * Get all known hard bounced addresses
170
+ * @returns Array of hard bounced email addresses
171
+ */
172
+ getHardBouncedAddresses(): string[];
173
+ /**
174
+ * Get suppression list
175
+ * @returns Array of suppressed email addresses
176
+ */
177
+ getSuppressionList(): string[];
178
+ /**
179
+ * Clear old bounce records (for maintenance)
180
+ * @param olderThan Timestamp to remove records older than
181
+ * @returns Number of records removed
182
+ */
183
+ clearOldBounceRecords(olderThan: number): number;
184
+ }
185
+ export {};