mirror of
https://github.com/mjl-/mox.git
synced 2025-07-10 07:54:40 +03:00
improve queue management
- add option to put messages in the queue "on hold", preventing delivery attempts until taken off hold again. - add "hold rules", to automatically mark some/all submitted messages as "on hold", e.g. from a specific account or to a specific domain. - add operation to "fail" a message, causing a DSN to be delivered to the sender. previously we could only drop a message from the queue. - update admin page & add new cli tools for these operations, with new filtering rules for selecting the messages to operate on. in the admin interface, add filtering and checkboxes to select a set of messages to operate on.
This commit is contained in:
@ -1443,7 +1443,7 @@ test email
|
||||
}
|
||||
tcheck(t, err, "deliver")
|
||||
|
||||
msgs, err := queue.List(ctxbg)
|
||||
msgs, err := queue.List(ctxbg, queue.Filter{})
|
||||
tcheck(t, err, "listing queue")
|
||||
n++
|
||||
tcompare(t, len(msgs), n)
|
||||
@ -1592,11 +1592,11 @@ test email
|
||||
}
|
||||
tcheck(t, err, "deliver")
|
||||
|
||||
msgs, err := queue.List(ctxbg)
|
||||
msgs, err := queue.List(ctxbg, queue.Filter{})
|
||||
tcheck(t, err, "listing queue")
|
||||
tcompare(t, len(msgs), 1)
|
||||
tcompare(t, msgs[0].RequireTLS, expRequireTLS)
|
||||
_, err = queue.Drop(ctxbg, pkglog, msgs[0].ID, "", "")
|
||||
_, err = queue.Drop(ctxbg, pkglog, queue.Filter{IDs: []int64{msgs[0].ID}})
|
||||
tcheck(t, err, "deleting message from queue")
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user