分类: LINUX
2007-11-09 20:19:07
SYNOPSIS
postsuper [-psv] [-c config_dir] [-d queue_id]
[-h queue_id] [-H queue_id]
[-r queue_id] [directory ...]
-d queue_id
Delete one message with the named queue ID from the named mail
queue(s) (default: hold, incoming, active and deferred).
If a queue_id of - is specified, the program reads queue IDs
from standard input. For example, to delete all mail with
exactly one recipient :
mailq | tail +2 | awk 'BEGIN { RS = "" }
# $7=sender, $8=recipient1, $9=recipient2
{ if ($8 == "" && $9 == "")
print $1 }
' | tr -d '*!' | postsuper -d -
Specify -d ALL to remove all messages; for example, specify -d
ALL deferred to delete mail in the deferred queue. As a safety
measure, the word ALL must be specified in upper case.
example:
mailq | tail +2 | awk 'BEGIN { RS = ""} {if ($8 == "" && $9 == "") print $1 }' | tr -d '*!' | postsuper -d -