mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 17:04:39 +03:00
make setting up apple mail clients easier by providing .mobileconfig device management profiles
including showing a qr code to easily get the file on iphones. the profile is currently in the "account" page. idea by x8x in issue #65
This commit is contained in:
@ -1578,7 +1578,8 @@ func (Admin) DomainRemove(ctx context.Context, domain string) {
|
||||
xcheckf(ctx, err, "removing domain")
|
||||
}
|
||||
|
||||
// AccountAdd adds existing a new account, with an initial email address, and reloads the configuration.
|
||||
// AccountAdd adds existing a new account, with an initial email address, and
|
||||
// reloads the configuration.
|
||||
func (Admin) AccountAdd(ctx context.Context, accountName, address string) {
|
||||
err := mox.AccountAdd(ctx, accountName, address)
|
||||
xcheckf(ctx, err, "adding account")
|
||||
@ -1625,13 +1626,13 @@ func (Admin) SetAccountLimits(ctx context.Context, accountName string, maxOutgoi
|
||||
xcheckf(ctx, err, "saving account limits")
|
||||
}
|
||||
|
||||
// ClientConfigDomain returns configurations for email clients, IMAP and
|
||||
// ClientConfigsDomain returns configurations for email clients, IMAP and
|
||||
// Submission (SMTP) for the domain.
|
||||
func (Admin) ClientConfigDomain(ctx context.Context, domain string) mox.ClientConfig {
|
||||
func (Admin) ClientConfigsDomain(ctx context.Context, domain string) mox.ClientConfigs {
|
||||
d, err := dns.ParseDomain(domain)
|
||||
xcheckuserf(ctx, err, "parsing domain")
|
||||
|
||||
cc, err := mox.ClientConfigDomain(d)
|
||||
cc, err := mox.ClientConfigsDomain(d)
|
||||
xcheckf(ctx, err, "client config for domain")
|
||||
return cc
|
||||
}
|
||||
|
@ -695,12 +695,12 @@ const account = async (name) => {
|
||||
const domain = async (d) => {
|
||||
const end = new Date().toISOString()
|
||||
const start = new Date(new Date().getTime() - 30*24*3600*1000).toISOString()
|
||||
const [dmarcSummaries, tlsrptSummaries, localpartAccounts, dnsdomain, clientConfig] = await Promise.all([
|
||||
const [dmarcSummaries, tlsrptSummaries, localpartAccounts, dnsdomain, clientConfigs] = await Promise.all([
|
||||
api.DMARCSummaries(start, end, d),
|
||||
api.TLSRPTSummaries(start, end, d),
|
||||
api.DomainLocalparts(d),
|
||||
api.Domain(d),
|
||||
api.ClientConfigDomain(d),
|
||||
api.ClientConfigsDomain(d),
|
||||
])
|
||||
|
||||
let form, fieldset, localpart, account
|
||||
@ -725,7 +725,7 @@ const domain = async (d) => {
|
||||
),
|
||||
),
|
||||
dom.tbody(
|
||||
clientConfig.Entries.map(e =>
|
||||
clientConfigs.Entries.map(e =>
|
||||
dom.tr(
|
||||
dom.td(e.Protocol),
|
||||
dom.td(domainString(e.Host)),
|
||||
@ -756,7 +756,7 @@ const domain = async (d) => {
|
||||
dom.td(t[0] || '(catchall)'),
|
||||
dom.td(dom.a(t[1], attr({href: '#accounts/'+t[1]}))),
|
||||
dom.td(
|
||||
dom.button('Remove address', async function click(e) {
|
||||
dom.button('Remove', async function click(e) {
|
||||
e.preventDefault()
|
||||
if (!window.confirm('Are you sure you want to remove this address?')) {
|
||||
return
|
||||
|
@ -437,7 +437,7 @@
|
||||
},
|
||||
{
|
||||
"Name": "AccountAdd",
|
||||
"Docs": "AccountAdd adds existing a new account, with an initial email address, and reloads the configuration.",
|
||||
"Docs": "AccountAdd adds existing a new account, with an initial email address, and\nreloads the configuration.",
|
||||
"Params": [
|
||||
{
|
||||
"Name": "accountName",
|
||||
@ -544,8 +544,8 @@
|
||||
"Returns": []
|
||||
},
|
||||
{
|
||||
"Name": "ClientConfigDomain",
|
||||
"Docs": "ClientConfigDomain returns configurations for email clients, IMAP and\nSubmission (SMTP) for the domain.",
|
||||
"Name": "ClientConfigsDomain",
|
||||
"Docs": "ClientConfigsDomain returns configurations for email clients, IMAP and\nSubmission (SMTP) for the domain.",
|
||||
"Params": [
|
||||
{
|
||||
"Name": "domain",
|
||||
@ -558,7 +558,7 @@
|
||||
{
|
||||
"Name": "r0",
|
||||
"Typewords": [
|
||||
"ClientConfig"
|
||||
"ClientConfigs"
|
||||
]
|
||||
}
|
||||
]
|
||||
@ -2772,21 +2772,21 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "ClientConfig",
|
||||
"Docs": "ClientConfig holds the client configuration for IMAP/Submission for a\ndomain.",
|
||||
"Name": "ClientConfigs",
|
||||
"Docs": "ClientConfigs holds the client configuration for IMAP/Submission for a\ndomain.",
|
||||
"Fields": [
|
||||
{
|
||||
"Name": "Entries",
|
||||
"Docs": "",
|
||||
"Typewords": [
|
||||
"[]",
|
||||
"ClientConfigEntry"
|
||||
"ClientConfigsEntry"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "ClientConfigEntry",
|
||||
"Name": "ClientConfigsEntry",
|
||||
"Docs": "",
|
||||
"Fields": [
|
||||
{
|
||||
|
Reference in New Issue
Block a user