Add Servers/Email/iRedMail/Query SMTP Outgoing Queue.md
All checks were successful
GitOps Automatic Deployment / GitOps Automatic Deployment (push) Successful in 7s

This commit is contained in:
2025-12-29 20:35:14 -07:00
parent 44d6a75332
commit 28b8e6d836

View File

@@ -0,0 +1,25 @@
## Purpose
You may need to troubleshoot the outgoing SMTP email queue / active sessions in iRedMail for one reason or another. This can provide insight into the reason why emails are not being delivered, etc.
### Overall Queue Backlog
You can run the following command to get the complete backlog of all email senders in the queue. This can be useful for tracking the queue's "drainage" over-time.
```sh
postqueue -p | awk '/^[A-F0-9]/ {id=$1} /from=<[^>]+>/ && $0 !~ /from=<>/ {print id; exit}'
```
!!! example "Example Output"
10392 problematic@bunny-lab.io
301 prettybad@bunny-lab.io
39 infrastructure@bunny-lab.io
20 nicole.rappe@bunny-lab.io
### Investigating Individual Emails
You can run the following command to read detailed information on any specific queued SMTP message:
```sh
postqueue -p
postcat -vq 4dgHry5LZnzH6x08 # (1)
```
1. Example message ID gathered from the previous `postqueue -p` command.