mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
feat(email): replace 'Enable SSL' setting with more descriptive/clear 'Encryption Method' setting (#1549)
* feat(email): replace 'Enable SSL' setting with more descriptive/clear 'Encryption Method' setting * fix: clarify settings & add true 'none' option
This commit is contained in:
@@ -1255,6 +1255,12 @@ components:
|
|||||||
secure:
|
secure:
|
||||||
type: boolean
|
type: boolean
|
||||||
example: false
|
example: false
|
||||||
|
ignoreTls:
|
||||||
|
type: boolean
|
||||||
|
example: false
|
||||||
|
requireTls:
|
||||||
|
type: boolean
|
||||||
|
example: false
|
||||||
authUser:
|
authUser:
|
||||||
type: string
|
type: string
|
||||||
nullable: true
|
nullable: true
|
||||||
|
@@ -13,6 +13,8 @@ class PreparedEmail extends Email {
|
|||||||
host: settings.options.smtpHost,
|
host: settings.options.smtpHost,
|
||||||
port: settings.options.smtpPort,
|
port: settings.options.smtpPort,
|
||||||
secure: settings.options.secure,
|
secure: settings.options.secure,
|
||||||
|
ignoreTLS: settings.options.ignoreTls,
|
||||||
|
requireTLS: settings.options.requireTls,
|
||||||
tls: settings.options.allowSelfSigned
|
tls: settings.options.allowSelfSigned
|
||||||
? {
|
? {
|
||||||
rejectUnauthorized: false,
|
rejectUnauthorized: false,
|
||||||
@@ -26,6 +28,7 @@ class PreparedEmail extends Email {
|
|||||||
}
|
}
|
||||||
: undefined,
|
: undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (pgpKey) {
|
if (pgpKey) {
|
||||||
transport.use(
|
transport.use(
|
||||||
'stream',
|
'stream',
|
||||||
@@ -36,6 +39,7 @@ class PreparedEmail extends Email {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
super({
|
super({
|
||||||
message: {
|
message: {
|
||||||
from: {
|
from: {
|
||||||
|
@@ -135,6 +135,8 @@ export interface NotificationAgentEmail extends NotificationAgentConfig {
|
|||||||
smtpHost: string;
|
smtpHost: string;
|
||||||
smtpPort: number;
|
smtpPort: number;
|
||||||
secure: boolean;
|
secure: boolean;
|
||||||
|
ignoreTls: boolean;
|
||||||
|
requireTls: boolean;
|
||||||
authUser?: string;
|
authUser?: string;
|
||||||
authPass?: string;
|
authPass?: string;
|
||||||
allowSelfSigned: boolean;
|
allowSelfSigned: boolean;
|
||||||
@@ -275,6 +277,8 @@ class Settings {
|
|||||||
smtpHost: '',
|
smtpHost: '',
|
||||||
smtpPort: 587,
|
smtpPort: 587,
|
||||||
secure: false,
|
secure: false,
|
||||||
|
ignoreTls: false,
|
||||||
|
requireTls: false,
|
||||||
allowSelfSigned: false,
|
allowSelfSigned: false,
|
||||||
senderName: 'Overseerr',
|
senderName: 'Overseerr',
|
||||||
},
|
},
|
||||||
|
@@ -20,7 +20,13 @@ const messages = defineMessages({
|
|||||||
emailsender: 'Sender Address',
|
emailsender: 'Sender Address',
|
||||||
smtpHost: 'SMTP Host',
|
smtpHost: 'SMTP Host',
|
||||||
smtpPort: 'SMTP Port',
|
smtpPort: 'SMTP Port',
|
||||||
enableSsl: 'Enable SSL',
|
encryption: 'Encryption Method',
|
||||||
|
encryptionTip:
|
||||||
|
'In most cases, Implicit TLS uses port 465 and STARTTLS uses port 587',
|
||||||
|
encryptionNone: 'None',
|
||||||
|
encryptionDefault: 'Use STARTTLS if available',
|
||||||
|
encryptionOpportunisticTls: 'Always use STARTTLS',
|
||||||
|
encryptionImplicitTls: 'Use Implicit TLS',
|
||||||
authUser: 'SMTP Username',
|
authUser: 'SMTP Username',
|
||||||
authPass: 'SMTP Password',
|
authPass: 'SMTP Password',
|
||||||
emailsettingssaved: 'Email notification settings saved successfully!',
|
emailsettingssaved: 'Email notification settings saved successfully!',
|
||||||
@@ -29,8 +35,6 @@ const messages = defineMessages({
|
|||||||
toastEmailTestSuccess: 'Email test notification sent!',
|
toastEmailTestSuccess: 'Email test notification sent!',
|
||||||
toastEmailTestFailed: 'Email test notification failed to send.',
|
toastEmailTestFailed: 'Email test notification failed to send.',
|
||||||
allowselfsigned: 'Allow Self-Signed Certificates',
|
allowselfsigned: 'Allow Self-Signed Certificates',
|
||||||
ssldisabletip:
|
|
||||||
'SSL should be disabled on standard TLS connections (port 587)',
|
|
||||||
senderName: 'Sender Name',
|
senderName: 'Sender Name',
|
||||||
validationEmail: 'You must provide a valid email address',
|
validationEmail: 'You must provide a valid email address',
|
||||||
emailNotificationTypesAlertDescription:
|
emailNotificationTypesAlertDescription:
|
||||||
@@ -132,7 +136,13 @@ const NotificationsEmail: React.FC = () => {
|
|||||||
emailFrom: data.options.emailFrom,
|
emailFrom: data.options.emailFrom,
|
||||||
smtpHost: data.options.smtpHost,
|
smtpHost: data.options.smtpHost,
|
||||||
smtpPort: data.options.smtpPort ?? 587,
|
smtpPort: data.options.smtpPort ?? 587,
|
||||||
secure: data.options.secure,
|
encryption: data.options.secure
|
||||||
|
? 'implicit'
|
||||||
|
: data.options.requireTls
|
||||||
|
? 'opportunistic'
|
||||||
|
: data.options.ignoreTls
|
||||||
|
? 'none'
|
||||||
|
: 'default',
|
||||||
authUser: data.options.authUser,
|
authUser: data.options.authUser,
|
||||||
authPass: data.options.authPass,
|
authPass: data.options.authPass,
|
||||||
allowSelfSigned: data.options.allowSelfSigned,
|
allowSelfSigned: data.options.allowSelfSigned,
|
||||||
@@ -150,7 +160,9 @@ const NotificationsEmail: React.FC = () => {
|
|||||||
emailFrom: values.emailFrom,
|
emailFrom: values.emailFrom,
|
||||||
smtpHost: values.smtpHost,
|
smtpHost: values.smtpHost,
|
||||||
smtpPort: Number(values.smtpPort),
|
smtpPort: Number(values.smtpPort),
|
||||||
secure: values.secure,
|
secure: values.encryption === 'implicit',
|
||||||
|
ignoreTls: values.encryption === 'none',
|
||||||
|
requireTls: values.encryption === 'opportunistic',
|
||||||
authUser: values.authUser,
|
authUser: values.authUser,
|
||||||
authPass: values.authPass,
|
authPass: values.authPass,
|
||||||
allowSelfSigned: values.allowSelfSigned,
|
allowSelfSigned: values.allowSelfSigned,
|
||||||
@@ -196,7 +208,9 @@ const NotificationsEmail: React.FC = () => {
|
|||||||
emailFrom: values.emailFrom,
|
emailFrom: values.emailFrom,
|
||||||
smtpHost: values.smtpHost,
|
smtpHost: values.smtpHost,
|
||||||
smtpPort: Number(values.smtpPort),
|
smtpPort: Number(values.smtpPort),
|
||||||
secure: values.secure,
|
secure: values.encryption === 'implicit',
|
||||||
|
ignoreTls: values.encryption === 'none',
|
||||||
|
requireTls: values.encryption === 'opportunistic',
|
||||||
authUser: values.authUser,
|
authUser: values.authUser,
|
||||||
authPass: values.authPass,
|
authPass: values.authPass,
|
||||||
senderName: values.senderName,
|
senderName: values.senderName,
|
||||||
@@ -339,14 +353,29 @@ const NotificationsEmail: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="form-row">
|
<div className="form-row">
|
||||||
<label htmlFor="secure" className="checkbox-label">
|
<label htmlFor="encryption" className="text-label">
|
||||||
<span>{intl.formatMessage(messages.enableSsl)}</span>
|
{intl.formatMessage(messages.encryption)}
|
||||||
<span className="label-tip">
|
<span className="label-required">*</span>
|
||||||
{intl.formatMessage(messages.ssldisabletip)}
|
|
||||||
</span>
|
|
||||||
</label>
|
</label>
|
||||||
<div className="form-input">
|
<div className="form-input">
|
||||||
<Field type="checkbox" id="secure" name="secure" />
|
<div className="form-input-field">
|
||||||
|
<Field as="select" id="encryption" name="encryption">
|
||||||
|
<option value="none">
|
||||||
|
{intl.formatMessage(messages.encryptionNone)}
|
||||||
|
</option>
|
||||||
|
<option value="default">
|
||||||
|
{intl.formatMessage(messages.encryptionDefault)}
|
||||||
|
</option>
|
||||||
|
<option value="opportunistic">
|
||||||
|
{intl.formatMessage(
|
||||||
|
messages.encryptionOpportunisticTls
|
||||||
|
)}
|
||||||
|
</option>
|
||||||
|
<option value="implicit">
|
||||||
|
{intl.formatMessage(messages.encryptionImplicitTls)}
|
||||||
|
</option>
|
||||||
|
</Field>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="form-row">
|
<div className="form-row">
|
||||||
|
@@ -327,7 +327,12 @@
|
|||||||
"components.Settings.Notifications.emailsender": "Sender Address",
|
"components.Settings.Notifications.emailsender": "Sender Address",
|
||||||
"components.Settings.Notifications.emailsettingsfailed": "Email notification settings failed to save.",
|
"components.Settings.Notifications.emailsettingsfailed": "Email notification settings failed to save.",
|
||||||
"components.Settings.Notifications.emailsettingssaved": "Email notification settings saved successfully!",
|
"components.Settings.Notifications.emailsettingssaved": "Email notification settings saved successfully!",
|
||||||
"components.Settings.Notifications.enableSsl": "Enable SSL",
|
"components.Settings.Notifications.encryption": "Encryption Method",
|
||||||
|
"components.Settings.Notifications.encryptionDefault": "Use STARTTLS if available",
|
||||||
|
"components.Settings.Notifications.encryptionImplicitTls": "Use Implicit TLS",
|
||||||
|
"components.Settings.Notifications.encryptionNone": "None",
|
||||||
|
"components.Settings.Notifications.encryptionOpportunisticTls": "Always use STARTTLS",
|
||||||
|
"components.Settings.Notifications.encryptionTip": "In most cases, Implicit TLS uses port 465 and STARTTLS uses port 587",
|
||||||
"components.Settings.Notifications.pgpPassword": "PGP Password",
|
"components.Settings.Notifications.pgpPassword": "PGP Password",
|
||||||
"components.Settings.Notifications.pgpPasswordTip": "Sign encrypted email messages using <OpenPgpLink>OpenPGP</OpenPgpLink>",
|
"components.Settings.Notifications.pgpPasswordTip": "Sign encrypted email messages using <OpenPgpLink>OpenPGP</OpenPgpLink>",
|
||||||
"components.Settings.Notifications.pgpPrivateKey": "PGP Private Key",
|
"components.Settings.Notifications.pgpPrivateKey": "PGP Private Key",
|
||||||
@@ -337,7 +342,6 @@
|
|||||||
"components.Settings.Notifications.senderName": "Sender Name",
|
"components.Settings.Notifications.senderName": "Sender Name",
|
||||||
"components.Settings.Notifications.smtpHost": "SMTP Host",
|
"components.Settings.Notifications.smtpHost": "SMTP Host",
|
||||||
"components.Settings.Notifications.smtpPort": "SMTP Port",
|
"components.Settings.Notifications.smtpPort": "SMTP Port",
|
||||||
"components.Settings.Notifications.ssldisabletip": "SSL should be disabled on standard TLS connections (port 587)",
|
|
||||||
"components.Settings.Notifications.telegramsettingsfailed": "Telegram notification settings failed to save.",
|
"components.Settings.Notifications.telegramsettingsfailed": "Telegram notification settings failed to save.",
|
||||||
"components.Settings.Notifications.telegramsettingssaved": "Telegram notification settings saved successfully!",
|
"components.Settings.Notifications.telegramsettingssaved": "Telegram notification settings saved successfully!",
|
||||||
"components.Settings.Notifications.toastDiscordTestFailed": "Discord test notification failed to send.",
|
"components.Settings.Notifications.toastDiscordTestFailed": "Discord test notification failed to send.",
|
||||||
|
Reference in New Issue
Block a user