On 29/10/2021 05:24, Viktor Dukhovni 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
Always great to learn from a master! I had not used postqueue -j, json or jq until yesterday...

Reply via email to