update
This commit is contained in:
@ -301,7 +301,7 @@ export class SMTPServer {
|
||||
this.sessions.delete(socket);
|
||||
}
|
||||
|
||||
private processEmailData(socket: plugins.net.Socket | plugins.tls.TLSSocket, data: string): void {
|
||||
private async processEmailData(socket: plugins.net.Socket | plugins.tls.TLSSocket, data: string): Promise<void> {
|
||||
const session = this.sessions.get(socket);
|
||||
if (!session) return;
|
||||
|
||||
@ -384,8 +384,12 @@ export class SMTPServer {
|
||||
mightBeSpam: email.mightBeSpam
|
||||
});
|
||||
|
||||
// Process or forward the email as needed
|
||||
// this.mtaRef.processIncomingEmail(email); // You could add this method to your MTA service
|
||||
// Process or forward the email via MTA service
|
||||
try {
|
||||
await this.mtaRef.processIncomingEmail(email);
|
||||
} catch (err) {
|
||||
console.error('Error in MTA processing of incoming email:', err);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error parsing email:', error);
|
||||
}
|
||||
|
Reference in New Issue
Block a user