How to get the queue_id in #postfix for a given sender for further processing:

postqueue -j | jq -r '. | select(.sender=="user@example.com") .queue_id'

The same for a given recipient:

postqueue -j | jq -r '. | select(.recipients[] | .address=="user@example.com") .queue_id'

Wonderful #jq :-)

#lifehack

There are no comments yet.