Tobi via Postfix-users:
> 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

Postfix already logs the (last) time spent in the active queue as
well as the time spent in any queue before that. Details are in

https://www.postfix.org/postconf.5.html#delay_logging_resolution_limit

A message may move in and out of the active queue multiple times,
and the above information will be logged each time the message
leaves the active queue.

If you want a per-domain time distribution of how long messages are
in the queue at a given point in time, perhaps the qshape tool may
be useful. It is included with Postfix source code under the
auxuliary/qshape directory. This is good for bottleneck analysis.

https://www.postfix.org/qshape.1.html

> 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?

Where would it get that information from? A completely new RPC
interface in the queue manager? That goes against the principle
that the queue manager must be highly available and must do as
little as possible, delegating all work to disposable processes.

        Wietse
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to