Hi list maybe someone has a good idea :-)
I'm looking for a way to reliably determine how long a message sits in active queue. Currently I use postqueue -j and pipe it to jq, get only hits from queue_id==active and then get arrival time, sort it by arrival time, take the oldest and calculate the difference to current time > if [ $(sudo postqueue -j | jq 'select(.queue_name=="active")' | wc - l) -gt 0 ] ; then echo $(( $(date +'%s') - $(sudo postqueue -j | jq 'select(.queue_name=="active") | .arrival_time' | sort | head -n1) )) ; else echo 0 ; fi this works well for the first run of the message in active queue but for subsequent runs doing the diff to arrival_time is a bit biased :-) As it's not the time in active queue anymore but the time since arrival. Any good idea how the get the time of when postfix took the message into active queue? Beside parsing the whole mail.log as this takes too long (it's a zabbix check and our zabbix waits at most 3s for a check to return) Or would it be possible in future postfix releases to teach the postqueue command to return the "last time taken into active queue" for each message in active? Kind regards and have a good one tobi _______________________________________________ Postfix-users mailing list -- postfix-users@postfix.org To unsubscribe send an email to postfix-users-le...@postfix.org