The following are four Mail queues of Postfix, which are managed by the process of the management queue:
1. maildrop: Local emails are placed in maildrop and copied to incoming.
2. Incoming: Place emails that are arriving or are not found by the queue management process.
3. Active: The placed queue management process has opened and is preparing to deliver the mail, the queue has
Length limit.
4. Deferred: Place emails that cannot be delivered.
Emails read by queue:
Postqueue-Q (I use this one)
Or
Mailq
Send the queue email as soon as possible:
Postqueue-F
Except all queue Emails:
Postsuper-D All
Remove a queue Email:
Use postqueue-Q or first
Mailq
Query queue_id
Postsuper-DQueue_id
Except allDeferredEmails in the reported column (except the emails that sent the loss messages ):
Postsuper-D all deferred
Except allDeferredThe token in the token column (you can see which messages are excluded from the token ):
Find/var/spool/Postfix/Deferred-Type F-exec Rm-VF {};
Failed to issue the email that cannot be generated three days ago:
Find/var/spool/Postfix/Deferred-Type F-mtime + 3-exec Rm-f {};
List all the failed Emails:
Find/var/spool/Postfix/Deferred-Type F-exec LS-L-time-style = + % Y-% m-%D_ % H: % m: % s {};
Except for the bounce messages in the "Defer" comment column that exceeds 5 days:
Find/var/spool/Postfix/defer-type F-mtime + 5-exec Rm-f {};