Provided by: pmailq_0.7-1_all
pmailq - Postfix Mail Queue manager
pmailq [OPTION]... [COMMAND] pmailq --help
pmailq processes the output of the Postfix mailq command, and can list, parse (machine- readably), or delete queued messages in batches. They can be selected by size, by queue status, and by pattern matching (with wildcards) on recipient addresses and server error messages.
Action to perform on selected entries. list (default command) Show (via postqueue -p) a detailed listing of the selected entries. parse Show a listing of the selected entries in a machine readable format. del Delete (via postsuper -d) the selected entries.
-e PATTERN, --email=PATTERN Select entries in queue with email matching PATTERN (PATTERN accepts wildcards). -m PATTERN, --msg=PATTERN Select entries in queue with error message matching PATTERN (PATTERN accepts wildcards). -l SIZE, --size-lower=SIZE Select entries in queue with size lower than SIZE bytes. -u SIZE, --size-upper=SIZE Select entries in queue with size upper than SIZE bytes. -a Select 'active' entries in queue. -o Select 'on hold' entries in queue. --version Show program's version number and exit. -h, --help Show this help message and exit.
Example 1: display all the entries in queue sent to an email address matching "*@example.com*" with a size between 3000 and 3200 bytes in a machine readable format: # pmailq -u 3000 -l 3200 -e "*@example.com" parse 7E75214643A4|Fri Aug firstname.lastname@example.org B0BDE146B640|Thu Aug email@example.com B587E146B675|Wed Aug firstname.lastname@example.org CF3C514656E4|Wed Aug email@example.com /\ /\ /\ \ \ queue id date size \ \ on hold (or not) \ active (or not) Example 2: remove all mails in queue not sent because of a connection time out: # pmailq -m "*connection*timed*out" del deleting 00CF514616D3 [OK] deleting 12D911461924 [OK] deleting 269EF1461CA9 [OK] deleting 288DF1461CA0 [OK] deleting 3B3901460F62 [OK] deleting 3AE58147019F [OK]
Emmanuel Bouthenot <firstname.lastname@example.org>
COPYRIGHT AND LICENSE
Copyright 2007-2011 by Emmanuel Bouthenot <email@example.com> This program is released under the "do What The Fuck you want to Public Licence" Version 2, as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more details. PMAILQ(8)