Re: How to move msgs from deferred to HOLD?

2012-06-25 Thread Viktor Dukhovni
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.


Re: How to move msgs from deferred to HOLD?

2012-06-25 Thread Noel Jones
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


Re: How to move msgs from deferred to HOLD?

2012-06-25 Thread Nicolás

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


Re: How to move msgs from deferred to HOLD?

2012-06-24 Thread Len Conrad


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 
>> :
>> 
>>   # 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






Re: How to move msgs from deferred to HOLD?

2012-06-24 Thread Wietse Venema
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 
> :
> 
>   # postsuper -h ALL deferred

Ah yes, too many features to remember them all.

Wietse


Re: How to move msgs from deferred to HOLD?

2012-06-24 Thread 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 :

  # postsuper -h ALL deferred

-- 
Viktor.


Re: How to move msgs from deferred to HOLD?

2012-06-23 Thread Wietse Venema
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


Re: How to move msgs from deferred to HOLD?

2012-06-23 Thread Ansgar Wiechers
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