This commit is contained in:
2025-05-22 09:22:55 +00:00
parent a4353b10bb
commit d584f3584c
7 changed files with 727 additions and 44 deletions

View File

@ -93,6 +93,11 @@ export interface ISmtpSession {
*/
emailDataChunks?: string[];
/**
* Total size of email data chunks (tracked incrementally for performance)
*/
emailDataSize?: number;
/**
* Whether the connection is using TLS
*/
@ -439,10 +444,15 @@ export interface ICommandHandler {
*/
export interface IDataHandler {
/**
* Process incoming email data
* Process incoming email data (legacy line-based)
*/
processEmailData(socket: plugins.net.Socket | plugins.tls.TLSSocket, data: string): Promise<void>;
/**
* Handle raw data chunks during DATA mode (optimized for large messages)
*/
handleDataReceived(socket: plugins.net.Socket | plugins.tls.TLSSocket, data: string): Promise<void>;
/**
* Process a complete email
*/