chore: add security warning when STARTTLS is disabled
This commit is contained in:
parent
74ecfa77ca
commit
f9c9930a3a
@ -1,5 +1,6 @@
|
|||||||
const nodemailer = require("nodemailer");
|
const nodemailer = require("nodemailer");
|
||||||
const NotificationProvider = require("./notification-provider");
|
const NotificationProvider = require("./notification-provider");
|
||||||
|
const { log } = require("../../src/util");
|
||||||
|
|
||||||
class SMTP extends NotificationProvider {
|
class SMTP extends NotificationProvider {
|
||||||
name = "smtp";
|
name = "smtp";
|
||||||
@ -25,6 +26,7 @@ class SMTP extends NotificationProvider {
|
|||||||
} else if (notification.smtpIgnoreSTARTTLS) {
|
} else if (notification.smtpIgnoreSTARTTLS) {
|
||||||
// Disable STARTTLS completely for servers that don't support it
|
// Disable STARTTLS completely for servers that don't support it
|
||||||
// Connection will remain unencrypted
|
// Connection will remain unencrypted
|
||||||
|
log.warn("notification", `SMTP notification using unencrypted connection (STARTTLS disabled) to ${notification.smtpHost}:${notification.smtpPort}`);
|
||||||
config.ignoreTLS = true;
|
config.ignoreTLS = true;
|
||||||
} else {
|
} else {
|
||||||
// Allow STARTTLS (default behavior for ports 25, 587)
|
// Allow STARTTLS (default behavior for ports 25, 587)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user