A cleaner solution for queueing messages is putting them on a disabled smtp service, but the OP meant how to HOLD them.
Look at the ACCESS readme for examples.

Op 16 feb. 2022 13:43 schreef Joachim Lindenberg <postfix-us...@lindenberg.one>:

Don´t know what exactly you are trying to do, but to monitor the queue, I use postqueue -j (for json).
Forcing some messages to remain in the queue is easy: just define a transport policy like dane-only for a destination that does not support dane.
-- Joachim

-----Ursprüngliche Nachricht-----
Von: owner-postfix-us...@postfix.org <owner-postfix-us...@postfix.org> Im Auftrag von @lbutlr
Gesendet: Wednesday, 16 February 2022 13:36
An: postfix-users@postfix.org
Betreff: Re: Fun and profit with mailq

On 2022 Feb 16, at 05:06, @lbutlr <krem...@kreme.com> wrote:
> What I would like to do is to execute a command that only returns output if there are messages on hold

On a related question, is there a way to tell postfix "put all outbound mail into the hold queue" so I can test some of this?

I know postsuper -h ALL will put all messages currently in the queue on hold for a few minutes? queue_run_delay looked promising, but it only applies once a message is already in the queue.

It'd ne great if I could just hold every message and then let it clear on the queue_run_delay=60 interval for testing. No one is even going to notice 1 minute in the queue.


--
"Last night - you were unhinged. You were like some desperate,
howling demon. You frightened me. - Do it again!"



Reply via email to