Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117758520
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/docs/docs/administration/postfix.md b/docs/docs/administration/postfix.md
index 4fdaa03..0916dc4 100644
--- a/docs/docs/administration/postfix.md
+++ b/docs/docs/administration/postfix.md
@@ -1,79 +1,90 @@
# Postfix
Postfix has the following relevant queues:
* Active: Email that is going to be delivered
* Deferred: Email that failed to be delivered, but is being retried until delivery succeeds.
* Hold: Email that was place on hold is not automatically retried.
## Inspecting mail queues
The following will generate an overview of mails in the queues, grouped by sender:
```
kolabctl postfix mailq-count-senders
```
This can take a significant time (15min with > 50k messages).
To get a quick count:
```
kolabctl postfix find /var/spool/postfix/deferred/ -type f -print | wc -l
```
## Putting mails on hold by sender address
The following will move mails from a specific sender, that are currently in the active or deferred queue, to the hold queue.
```
kolabctl postfix mailq-put-on-hold $sender
```
To delete emails that are currently in the hold queue, by sender:
```
kolabctl postfix mailq-purge-hold-queue --from $sender --now
```
## Print queued emails
Print all queued emails, from all queues.
```
kolabctl postfix postqueue -p
```
## Delete emails from all queues by sender
To delete emails that are currently in any queue, by sender:
```
-kolabctl postfix bash -c "postqueue -p | grep $sender | grep -oE '^[0-9A-F]{12}' | xargs -i postsuper -d {}"
+kolabctl postfix bash -c "postqueue -p | grep $sender | grep -oE '^[0-9A-F]*' | postsuper -d -"
+```
+
+## Delete emails from hold queue by age
+
+To delete emails that are currently in the hold queue (older than 50 days in this example):
+
+```
+kolabctl postfix bash -c "find /var/spool/postfix/hold -type f -mtime +50 -printf '%f\n' | sed 's/[*!]\$//' | postsuper -d -"
```
## Delete all emails in a queue
To delete all emails that are currently in a queue:
```
postsuper -d ALL hold
```
## Release emails from the hold queue
To release all emails in the hold queue:
```
kolabctl postfix postsuper -H ALL
```
## Print a message by id
```
kolabctl postfix postcat -q $messageid
```
+!!! note
+ Exclude the the queue indicator from the message id, so strip the '!' from a message in the hold queue.
+
## Process the mailqueue immediately
```
kolabctl postfix postqueue -f
```
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sat, Apr 4, 9:49 AM (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18823534
Default Alt Text
(2 KB)
Attached To
Mode
R114 kolab-infrastructure
Attached
Detach File
Event Timeline