Files
docs/Servers/Email/iRedMail/Query SMTP Outgoing Queue.md
Nicole Rappe 28b8e6d836
All checks were successful
GitOps Automatic Deployment / GitOps Automatic Deployment (push) Successful in 7s
Add Servers/Email/iRedMail/Query SMTP Outgoing Queue.md
2025-12-29 20:35:14 -07:00

25 lines
938 B
Markdown

## 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.