chore: add security warning when STARTTLS is disabled

This commit is contained in:
Dharun Ashokkumar 2026-01-19 23:57:43 +05:30
parent 74ecfa77ca
commit f9c9930a3a

View File

@ -1,5 +1,6 @@
const nodemailer = require("nodemailer");
const NotificationProvider = require("./notification-provider");
const { log } = require("../../src/util");
class SMTP extends NotificationProvider {
name = "smtp";
@ -25,6 +26,7 @@ class SMTP extends NotificationProvider {
} else if (notification.smtpIgnoreSTARTTLS) {
// Disable STARTTLS completely for servers that don't support it
// Connection will remain unencrypted
log.warn("notification", `SMTP notification using unencrypted connection (STARTTLS disabled) to ${notification.smtpHost}:${notification.smtpPort}`);
config.ignoreTLS = true;
} else {
// Allow STARTTLS (default behavior for ports 25, 587)