优化:清理运行日志调用栈绝对路径,并修复SMTP中继配置保存校验
This commit is contained in:
1 parent
b3a71ce32a
commit
8071752ffc
6 files changed
+46
-5
No files matched your search
@@ -11,10 +11,10 @@ const mailSecurity = config => {
|
||||
const value = normalizedMailSecurity(config.listener?.security)
|
||||
return value || 'both'
|
||||
}
|
||||
const relaySecurityForMail = config => mailSecurity(config) === 'implicit_tls' ? 'implicit_tls' : 'starttls'
|
||||
export const relaySecurityForMail = config => mailSecurity(config) === 'implicit_tls' ? 'implicit_tls' : 'starttls'
|
||||
const startTLSMail = config => mailSecurity(config) === 'starttls'
|
||||
const implicitTLSMail = config => mailSecurity(config) === 'implicit_tls'
|
||||
const relayConfigured = config => !!(
|
||||
export const relayConfigured = config => !!(
|
||||
config.relay?.relayHost || config.relay?.username || config.relay?.password ||
|
||||
config.relay?.from
|
||||
)
|
||||
|
||||
@@ -3,7 +3,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { http } from '@/utils/axios'
|
||||
import { useGlobalStatusStore } from '@/stores/useGlobalStatusStore'
|
||||
import { isRecentAuthenticationCancelled, requestWithRecentAuthentication } from '@/utils/recentAuthentication'
|
||||
import { readFormConfig, updateFormConfig, validateFormConfig } from './ConfigForm/ConfigForm.js'
|
||||
import { readFormConfig, updateFormConfig, validateFormConfig, relayConfigured, relaySecurityForMail } from './ConfigForm/ConfigForm.js'
|
||||
|
||||
const sections = [
|
||||
{ value: 'base', label: '基础配置' },
|
||||
@@ -493,6 +493,9 @@ export function usePage(pageKey = 'base') {
|
||||
delete payload.relay
|
||||
}
|
||||
}
|
||||
if (payload.relay && relayConfigured(payload) && !payload.relay.security) {
|
||||
payload.relay.security = relaySecurityForMail(payload)
|
||||
}
|
||||
}
|
||||
if (apiSection() === 'plugins' && payload.plugins && typeof payload.plugins === 'object') {
|
||||
Object.values(payload.plugins).forEach(plugin => {
|
||||
|
||||
Reference in new issue
Block a user