Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to move msgs from deferred to HOLD?

388 views
Skip to first unread message

Len Conrad

unread,
Jun 23, 2012, 7:02:13 PM6/23/12
to
Releasing from HOLD to deliverable is clear (and used often)

but how to move deferred to HOLD?

Len

Ansgar Wiechers

unread,
Jun 23, 2012, 7:35:04 PM6/23/12
to
On 2012-06-23 Len Conrad wrote:
> Releasing from HOLD to deliverable is clear (and used often)
>
> but how to move deferred to HOLD?

man postsuper | grep -A 11 -- " -h"
-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.

If a queue_id of - is specified, the program reads queue IDs
from standard input.

Specify "-h ALL" to hold all messages; for example, specify "-h
ALL deferred" to hold all mail in the deferred queue. As a
safety measure, the word ALL must be specified in upper case.

Regards
Angsgar Wiechers
--
"Abstractions save us time working, but they don't save us time learning."
--Joel Spolsky

Wietse Venema

unread,
Jun 23, 2012, 7:35:53 PM6/23/12
to
Len Conrad:
> Releasing from HOLD to deliverable is clear (and used often)
>
> but how to move deferred to HOLD?

# find /var/spool/postfix/deferred -type f | sed 's;.*/;;' | postsuper -H -

Wietse

Viktor Dukhovni

unread,
Jun 24, 2012, 2:58:13 PM6/24/12
to
Or more simply, as also pointed out by Ansgar Wiechers <li...@planetcobalt.net>:

# postsuper -h ALL deferred

--
Viktor.

Wietse Venema

unread,
Jun 24, 2012, 3:54:46 PM6/24/12
to
Viktor Dukhovni:
Ah yes, too many features to remember them all.

Wietse

Len Conrad

unread,
Jun 24, 2012, 8:54:36 PM6/24/12
to


At 02:54 PM 6/24/2012, you wrote:
>Viktor Dukhovni:
>> On Sat, Jun 23, 2012 at 07:35:53PM -0400, Wietse Venema wrote:
>>
>> > Len Conrad:
>> > > Releasing from HOLD to deliverable is clear (and used often)
>> > >
>> > > but how to move deferred to HOLD?
>> >
>> > # find /var/spool/postfix/deferred -type f | sed 's;.*/;;' | postsuper -H -
>>
>> Or more simply, as also pointed out by Ansgar Wiechers <li...@planetcobalt.net>:
>>
>> # postsuper -h ALL deferred

that's a good one! thanks

We thought all the mailer-daemon msgs in out postfix.out instance HOLD queue were non-delivery msgs (which is why we thought we had to move them back to deferred inbound), but in fact they were 6-hour-delay-alert msgs. The original msgs were in inbound deferred. These msgs we movedto HOLD until we got the mailserver up.

thanks
Len

Nicolás

unread,
Jun 25, 2012, 3:23:53 AM6/25/12
to
El 25/06/2012 1:54, Len Conrad escribió:
>>>>> Releasing from HOLD to deliverable is clear (and used often)
>>>>>
>>>>>

Reading that makes me wonder how to deliver a mail that's on the Hold
queue due to an header_checks directive. Let's suppose I have:

header_checks = regexp:/etc/postfix/rejectedmails

Content of regexp:/etc/postfix/rejectedmails:

/^Subject: Virus$/ HOLD Virus containing mail

So every mail matching "Virus" on its subject is placed on Hold. Now
let's suppose I want to deliver one of mails because it's harmless.

1) postsuper -h doesn't work because it would be delivered again to
pickup and again filtered by header_checks, so it would be placed on
Hold again.
2) postsuper -H doesn't work either.

So how can I deliver one of those mails placed on the hold queue?

Thanx a lot!

Nicolás

Noel Jones

unread,
Jun 25, 2012, 1:00:54 PM6/25/12
to
On 6/25/2012 2:23 AM, Nicolás wrote:
> El 25/06/2012 1:54, Len Conrad escribió:
>>>>>> Releasing from HOLD to deliverable is clear (and used often)
>>>>>>
>>>>>>
>
> Reading that makes me wonder how to deliver a mail that's on the
> Hold queue due to an header_checks directive. Let's suppose I have:
>

Use "postsuper -H QUEUEID". That releases the message to the
deferred queue, which is after header_checks are performed.



-- Noel Jones

Viktor Dukhovni

unread,
Jun 25, 2012, 7:50:10 PM6/25/12
to
On Mon, Jun 25, 2012 at 08:23:53AM +0100, Nicol?s wrote:

> 1) postsuper -h doesn't work because it would be delivered again to
> pickup and again filtered by header_checks, so it would be placed on
> Hold again.

Only "postsuper -r" moves mail back into the "maildrop" queue for
pickup(8). Perhaps you meant that, and if so indeed it could loop,
but if the system only accepts mail from outside via SMTP and there
is no reason to virus scan the maildrop queue, you can specify an
alternate cleanup service for pickup(8) with different header checks.

> 2) postsuper -H doesn't work either.

False. That's how you do it. This moves mail to "deferred" whence
it is delivered without further content checks.

--
Viktor.

0 new messages