[email protected]:
> Thank you a lot Mr. Venema!!!
>
> Et voila my little script for un-holding just n (n=100 in the example) and
> moving to deferred:
>
> postqueue -p | pcregrep -M "[0-9A-Z]{10}" | awk '{print $1;}' | sed 's/.$//'
> | head -100 | postsuper -H -
Caution:
1) The regular expression should be anchored to the beginning of the line.
2) The regular expression should select only queue IDs with a '!'.
3) With "enable_long_queue_ids=yes" queue IDs may contain lowercase characters.
4) "grep | awk | sed" can be done with awk alone.
Example:
awk '/^[0-9A-Za-z]+!/ { print substr($1, 1, length($1) - 1) }'
Wietse