On Fri, 29 Oct 2021 00:24:36 -0400
Viktor Dukhovni <postfix-us...@dukhovni.org> wrote:

> On Thu, Oct 28, 2021 at 10:14:15PM -0400, Viktor Dukhovni wrote:
> 
> >     postqueue -j | jq -nr --argjson $days '
> 
> Correction, that first line should be:
> 
>       postqueue -j | jq -nr --argjson days $days '
> 
> Setting the "jq" variabe "$days" to the shell variable "$days".
> 
> The rest is unchanged:
> 
> >               (now - 86400 * $days) as $too_old
> >             | inputs
> >             | select(.queue_name == "hold" and .arrival_time  <
> >             | $too_old) .queue_id
> >             | select(test("^\\w+$")) # permit only valid queue-id
> >             | syntax
> >         ' |
> >         postsuper -d - hold

Viktor,

I have run the jq script for a week or so ($days = 5) and it works like
a charm :-)

R.

-- 
richard lucassen
http://contact.xaq.nl/

Reply via email to