pause mail delivery while Postfix still running?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

pause mail delivery while Postfix still running?

Joachim Rosenfeld
On one of our boxes, Postfix was down for a few days, which coincide
with a too-agressive cron script sending out thousands of messages
which were all in the queue.

When we restarted Postfix, these messages started being delivered, so
we shut Postfix down.

We'd like to use postqueue and postsuper to list/delete these
messages, but postqueue doesn't work when Postfix is not running.

How can we do this?
Reply | Threaded
Open this post in threaded view
|

Re: pause mail delivery while Postfix still running?

Gabriel Craciun
"postsuper  -h queue_id
              Put mail "on hold" so that no attempt is made to deliver
it.  Move one message with the named queue ID from the named mail
queue(s) (default: incoming, active and deferred) to the hold queue."

so I guess postsuper -h deffered ....

On Mon, 2008-06-09 at 10:35 -0400, Joachim Rosenfeld wrote:

> On one of our boxes, Postfix was down for a few days, which coincide
> with a too-agressive cron script sending out thousands of messages
> which were all in the queue.
>
> When we restarted Postfix, these messages started being delivered, so
> we shut Postfix down.
>
> We'd like to use postqueue and postsuper to list/delete these
> messages, but postqueue doesn't work when Postfix is not running.
>
> How can we do this?

Reply | Threaded
Open this post in threaded view
|

Re: pause mail delivery while Postfix still running?

Wietse Venema
In reply to this post by Joachim Rosenfeld
Joachim Rosenfeld:

> On one of our boxes, Postfix was down for a few days, which coincide
> with a too-agressive cron script sending out thousands of messages
> which were all in the queue.
>
> When we restarted Postfix, these messages started being delivered, so
> we shut Postfix down.
>
> We'd like to use postqueue and postsuper to list/delete these
> messages, but postqueue doesn't work when Postfix is not running.
>
> How can we do this?

"postqueue -p" and "postsuper" work just fine as root
even when the mail system is down.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: pause mail delivery while Postfix still running?

mouss-2
In reply to this post by Joachim Rosenfeld
Joachim Rosenfeld wrote:

> On one of our boxes, Postfix was down for a few days, which coincide
> with a too-agressive cron script sending out thousands of messages
> which were all in the queue.
>
> When we restarted Postfix, these messages started being delivered, so
> we shut Postfix down.
>
> We'd like to use postqueue and postsuper to list/delete these
> messages, but postqueue doesn't work when Postfix is not running.
>  

# postqueue -p
postqueue: warning: Mail system is down -- accessing queue directly
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
AB43F3224B4E     1877 Mon Jun  9 01:15:01  root
                                         root
...

# postsuper -d AB43F3224B4E
postsuper: AB43F3224B4E: removed
postsuper: Deleted: 1 message

> How can we do this?
>  

don't do this. do that :)