Wietse Venema wrote:
> You could also override the timezone in main.cf:
>
> /etc/postfix/main.cf:
> # Take output from "postconf -d import_environment", then update TZ
> import_environment = .... TZ=whatever ...
That is a pretty interesting idea. I might do this to set TZ=UTC for here
example while while leaving the rest of the system in local time.
Maybe. It's very good to know of this possibility.
> > For machine-readable output, try "postqueue -j", which reports dates in
> > epoch time. For example:
> >
> > $ postqueue -j |
> > jq -r '[.queue_id, (.arrival_time | tostring), .sender] | join(" ")'
>
> I used this:
>
> jq -r '[.queue_id, (.arrival_time | todate), .sender] | join(" ")'
>
> Which formats the date as iso8601 (yyyy-mm-dd-Thh:mm:ssZ
I had completely forgotten about the possibility of json output.
That's just generally good to know for programatic use.
Thanks!
Bob