Linux 4 All

Best Linux tricks source

Posts in the grep category

Get mail queue

When dealing with mail issues, the following one-liner will display all Postfix mail IDs from the queue.

postqueue -p | egrep -v ^[[:space:]] | grep -v ^$ | awk '{print $1}' | grep -v ^\( | grep -v ^\- | sed -e 's/\*//g'