Viktor Dukhovni:
> On Tue, Mar 09, 2021 at 11:13:37PM -0700, Bob Proulx wrote:
> 
> > The time reported by mailq seems confusing.  Sometimes it seems to be
> > reporting in system time and sometimes UTC time?
> 
> Set your timezone consistently.  When running as a non-root user, setgid
> programs such as "postqueue" ignore their environment, including TZ.
> When running as "root" they honour it.

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

> 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

        Wietse

Reply via email to