/mail/queue/{id}/deliver
0.2.0Unchanged since publicationRequest immediate delivery of a queued message
mailallUrbeStack asks Postfix to attempt delivery immediately. With trace=true, UrbeStack temporarily adds the next-hop hosts to Postfix's debug_peer_list and reloads Postfix. The next hops are the sender domain's smarthost, the server's smarthost, or the MX hosts for each recipient domain. UrbeStack removes the temporary entries regardless of the outcome.
The traced request follows the attempt in the mail log for up to wait seconds. Its delivery object includes every SMTP command and reply captured and each recipient's status line. Poll GET /mail/queue/{id}/deliver to read the trace while the request is in progress.
The API returns 400 if id falls outside the required format of 6 to 20 uppercase hexadecimal characters or wait falls outside the allowed whole-number range.
As a command
Run as root on the serverParameters
idpath ·string, matching ^[A-F0-9]{6,20}$RequiredRequest body
JSON· 2 fieldstracebooleanwaitinteger, 1 to 300Example
See the API overview for how to set $API and $TOKEN.curl -sS -X POST "$API/mail/queue/1/deliver" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"trace": true,
"wait": 1
}'200 OK{
"delivery": {
"before": {
"attempt_count": 1,
"attempts": [
{
"at": "text",
"delay": 1,
"dsn": "text",
"relay": "text",
"reply": "text",
"status": "active",
"to": "text"
}
],
"hops": [
"text"
],
"last_at": "text",
"last_reply": "text",
"last_status": "text",
"log_lines": [
"text"
],
"message": {
"arrival_time": 1,
"forced_expire": 1,
"id": 1,
"queue": "text",
"recipients": [
{
"address": "info@example.com",
"delay_reason": "text"
}
],
"sender": "text",
"size": 1
},
"next_hop": "text",
"read_at": "text",
"subject": "text",
"subjects_logged": true
},
"delivering": true,
"done": true,
"hops": [
"text"
],
"id": 1,
"lines": [
{
"at": "text",
"dir": "out",
"pid": 1,
"text": "text"
}
],
"noise": 1,
"read_at": "text",
"results": [
{
"at": "text",
"delay": 1,
"dsn": "text",
"relay": "text",
"reply": "text",
"status": "active",
"to": "text"
}
],
"running": true,
"traced": true,
"wait": 1,
"waited": 1
}
}Errors
6 errors, each a status and a sentence400--id is required400<what> must be a whole number from 0 to <max>400A queue id is 6 to 20 uppercase hexadecimal characters400Invalid boolean400The mail stack is not installed on this server401Authentication requiredurbestack.com/docs/api/post-mail-queue-id-deliver/