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:
Mechiel Lukkien
2024-03-18 08:50:42 +01:00
parent 79f1054b64
commit 40ade995a5
19 changed files with 2554 additions and 565 deletions

View File

@ -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")
})
}