mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 09:14:39 +03:00
webadmin: add single-line form for looking up a cid for a received id
This commit is contained in:
@ -265,6 +265,10 @@ const index = async () => {
|
||||
let account: HTMLInputElement
|
||||
let localpart: HTMLInputElement
|
||||
|
||||
let recvIDFieldset: HTMLFieldSetElement
|
||||
let recvID: HTMLInputElement
|
||||
let cidElem: HTMLSpanElement
|
||||
|
||||
dom._kids(page,
|
||||
crumbs('Mox Admin'),
|
||||
checkUpdatesEnabled ? [] : dom.p(box(yellow, 'Warning: Checking for updates has not been enabled in mox.conf (CheckUpdates: true).', dom.br(), 'Make sure you stay up to date through another mechanism!', dom.br(), 'You have a responsibility to keep the internet-connected software you run up to date and secure!', dom.br(), 'See ', link('https://updates.xmox.nl/changelog'))),
|
||||
@ -329,6 +333,32 @@ const index = async () => {
|
||||
dom.div(dom.a('MTA-STS policies', attr.href('#mtasts'))),
|
||||
dom.div(dom.a('DMARC evaluations', attr.href('#dmarc/evaluations'))),
|
||||
dom.div(dom.a('TLS connection results', attr.href('#tlsrpt/results'))),
|
||||
dom.div(
|
||||
style({marginTop: '.5ex'}),
|
||||
dom.form(
|
||||
async function submit(e: SubmitEvent) {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
try {
|
||||
dom._kids(cidElem)
|
||||
recvIDFieldset.disabled = true
|
||||
const cid = await client.LookupCid(recvID.value)
|
||||
dom._kids(cidElem, cid)
|
||||
} catch (err) {
|
||||
console.log({err})
|
||||
window.alert('Error: ' + errmsg(err))
|
||||
} finally {
|
||||
recvIDFieldset.disabled = false
|
||||
}
|
||||
},
|
||||
recvIDFieldset=dom.fieldset(
|
||||
dom.label('Received ID', attr.title('The ID in the Received header that was added during incoming delivery.')), ' ',
|
||||
recvID=dom.input(attr.required('')), ' ',
|
||||
dom.submitbutton('Lookup cid', attr.title('Logging about an incoming message includes an attribute "cid", a counter identifying the transaction related to delivery of the message. The ID in the received header is an encrypted cid, which this form decrypts, after which you can look it up in the logging.')), ' ',
|
||||
cidElem=dom.span(),
|
||||
),
|
||||
),
|
||||
),
|
||||
// todo: routing, globally, per domain and per account
|
||||
dom.br(),
|
||||
dom.h2('DNS blocklist status'),
|
||||
|
Reference in New Issue
Block a user