mailq
lists a bunch of information relating to the queue:
C999C20A80 8314 Sun Dec 24 21:19:18 MAILER-DAEMON
(host abc[x.x.x.x] said: 421 Timeout - closing connection (in reply to MAIL FROM command))
a@a
How do you print only the QUEUE ID without processing it with various grep|awk|sed?
I'm certain I saw a command for it but I didn't "register" it and now I forgot it.
Maybe something with postsuper
or postqueue
, but reading the man pages I cannot see any options for this.
I don't know about the 'right way to do it'
but for me works
mailq | awk '$7 ~/@/ { print $1 }'
this will display only the id's