mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-12-26 01:53:13 +08:00
Update autoconfig - step 2, apply updates from Thunderbird ISPDB
This commit is contained in:
parent
9b2c55b4cb
commit
6c3993aa93
3 changed files with 1060 additions and 286 deletions
|
@ -17,9 +17,9 @@
|
|||
],
|
||||
"smtp": [
|
||||
{
|
||||
"port": 587,
|
||||
"port": 465,
|
||||
"hostname": "smtp.pobox.com",
|
||||
"starttls": true
|
||||
"ssl": true
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -86,20 +86,10 @@
|
|||
}
|
||||
],
|
||||
"smtp": [
|
||||
{
|
||||
"port": 587,
|
||||
"hostname": "smtp.mail.com",
|
||||
"ssl": true
|
||||
},
|
||||
{
|
||||
"port": 465,
|
||||
"hostname": "smtp.mail.com",
|
||||
"ssl": true
|
||||
},
|
||||
{
|
||||
"port": 25,
|
||||
"hostname": "smtp.mail.com",
|
||||
"ssl": true
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -355,16 +345,16 @@
|
|||
}
|
||||
],
|
||||
"smtp": [
|
||||
{
|
||||
"port": 587,
|
||||
"hostname": "smtp.aol.com",
|
||||
"starttls": true
|
||||
},
|
||||
{
|
||||
"port": 465,
|
||||
"hostname": "smtp.aol.com",
|
||||
"ssl": true
|
||||
},
|
||||
{
|
||||
"port": 587,
|
||||
"hostname": "smtp.aol.com",
|
||||
"starttls": true
|
||||
},
|
||||
{
|
||||
"port": 25,
|
||||
"hostname": "smtp.aol.com",
|
||||
|
@ -964,9 +954,9 @@
|
|||
"servers": {
|
||||
"imap": [
|
||||
{
|
||||
"port": 143,
|
||||
"port": 993,
|
||||
"hostname": "imap.openmailbox.org",
|
||||
"starttls": true
|
||||
"ssl": true
|
||||
}
|
||||
],
|
||||
"smtp": [
|
||||
|
@ -989,11 +979,6 @@
|
|||
"mailru": {
|
||||
"servers": {
|
||||
"imap": [
|
||||
{
|
||||
"port": 143,
|
||||
"hostname": "imap.mail.ru",
|
||||
"starttls": true
|
||||
},
|
||||
{
|
||||
"port": 993,
|
||||
"hostname": "imap.mail.ru",
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -125,14 +125,14 @@ export async function expandAccountWithCommonSettings(account: Account) {
|
|||
imap_port: imap.port,
|
||||
imap_username: usernameWithFormat('email'),
|
||||
imap_password: populated.settings.imap_password,
|
||||
imap_security: imap.starttls ? 'STARTTLS' : imap.ssl ? 'SSL / TLS' : 'none',
|
||||
imap_security: imap.starttls ? 'STARTTLS' : imap.ssl || imap.tls ? 'SSL / TLS' : 'none',
|
||||
imap_allow_insecure_ssl: false,
|
||||
|
||||
smtp_host: (smtp.hostname || '').replace('{domain}', domain),
|
||||
smtp_port: smtp.port,
|
||||
smtp_username: usernameWithFormat('email'),
|
||||
smtp_password: populated.settings.smtp_password || populated.settings.imap_password,
|
||||
smtp_security: smtp.starttls ? 'STARTTLS' : smtp.ssl ? 'SSL / TLS' : 'none',
|
||||
smtp_security: smtp.starttls ? 'STARTTLS' : smtp.ssl || smtp.tls ? 'SSL / TLS' : 'none',
|
||||
smtp_allow_insecure_ssl: false,
|
||||
|
||||
container_folder: '',
|
||||
|
@ -156,18 +156,40 @@ export async function expandAccountWithCommonSettings(account: Account) {
|
|||
mstemplate = {};
|
||||
}
|
||||
|
||||
let imap_port = Number(mstemplate.imap_port);
|
||||
let imap_security = mstemplate.imap_security;
|
||||
if (!imap_security && !imap_port) {
|
||||
imap_security = 'SSL / TLS';
|
||||
imap_port = 993;
|
||||
} else if (!imap_security && imap_port) {
|
||||
imap_security = imap_port === 993 ? 'SSL / TLS' : 'none';
|
||||
} else if (imap_security && !imap_port) {
|
||||
imap_port = imap_security === 'SSL / TLS' ? 993 : 143;
|
||||
}
|
||||
|
||||
let smtp_port = Number(mstemplate.smtp_port);
|
||||
let smtp_security = mstemplate.smtp_security;
|
||||
if (!smtp_security && !smtp_port) {
|
||||
smtp_security = 'SSL / TLS';
|
||||
smtp_port = 465;
|
||||
} else if (!smtp_security && smtp_port) {
|
||||
smtp_security = smtp_port === 587 ? 'STARTTLS' : smtp_port === 465 ? 'SSL / TLS' : 'none';
|
||||
} else if (smtp_security && !smtp_port) {
|
||||
smtp_port = smtp_security === 'STARTTLS' ? 587 : smtp_security === 'SSL / TLS' ? 465 : 25;
|
||||
}
|
||||
|
||||
const defaults = {
|
||||
imap_host: mstemplate.imap_host,
|
||||
imap_port: mstemplate.imap_port || 993,
|
||||
imap_host: mstemplate.imap_host.replace('%EMAILDOMAIN%', domain),
|
||||
imap_port: imap_port,
|
||||
imap_username: usernameWithFormat(mstemplate.imap_user_format),
|
||||
imap_password: populated.settings.imap_password,
|
||||
imap_security: mstemplate.imap_security || 'SSL / TLS',
|
||||
imap_security: imap_security,
|
||||
imap_allow_insecure_ssl: mstemplate.imap_allow_insecure_ssl || false,
|
||||
smtp_host: mstemplate.smtp_host,
|
||||
smtp_port: mstemplate.smtp_port || 465,
|
||||
smtp_host: mstemplate.smtp_host.replace('%EMAILDOMAIN%', domain),
|
||||
smtp_port: smtp_port,
|
||||
smtp_username: usernameWithFormat(mstemplate.smtp_user_format),
|
||||
smtp_password: populated.settings.smtp_password || populated.settings.imap_password,
|
||||
smtp_security: mstemplate.smtp_security || 'SSL / TLS',
|
||||
smtp_security: smtp_security,
|
||||
smtp_allow_insecure_ssl: mstemplate.smtp_allow_insecure_ssl || false,
|
||||
container_folder: mstemplate.container_folder,
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue