From: Patrick Ben Koetter on
I can put a mail on HOLD and release it later with the postsuper command.
That's great for debugging purposes, but only if I need to send the message
just once.

Would it be possible to expand the postsuper command with an optional command
line parameter that releases the message, but does not delete it from the hold
queue, so someone who needs to debug can resend it as many times as required
until I decide to ditch it?

The queue id could change. That's okay, because it is Postfix internal. The
message-id should not change.

p(a)rick

P.S.
I know I can write a script that does the same, but I'd rather not take the
"mailscanner" approach and work around Postfix' control of it's own queue
management.

--
All technical questions asked privately will be automatically answered on the
list and archived for public access unless privacy is explicitely required and
justified.

saslfinger (debugging SMTP AUTH):
<http://postfix.state-of-mind.de/patrick.koetter/saslfinger/>

From: Wietse Venema on
Patrick Ben Koetter:
> I can put a mail on HOLD and release it later with the postsuper command.
> That's great for debugging purposes, but only if I need to send the message
> just once.
>
> Would it be possible to expand the postsuper command with an optional command
> line parameter that releases the message, but does not delete it from the hold
> queue, so someone who needs to debug can resend it as many times as required
> until I decide to ditch it?

Postfix queue files should not have multiple hard links.

Consider using RSYNC to COPY the file from the hold queue to the
incoming queue, using the same file name. With the current Postfix
queue implementation this is guaranteed not to cause a file name
collision as long as the file in the HOLD queue keeps the same
(device, inode) numbers.

Wietse

> The queue id could change. That's okay, because it is Postfix internal. The
> message-id should not change.
>
> p(a)rick
>
> P.S.
> I know I can write a script that does the same, but I'd rather not take the
> "mailscanner" approach and work around Postfix' control of it's own queue
> management.
>
> --
> All technical questions asked privately will be automatically answered on the
> list and archived for public access unless privacy is explicitely required and
> justified.
>
> saslfinger (debugging SMTP AUTH):
> <http://postfix.state-of-mind.de/patrick.koetter/saslfinger/>
>
>

From: Ralf Hildebrandt on
* Wietse Venema <wietse(a)porcupine.org>:
> Patrick Ben Koetter:
> > I can put a mail on HOLD and release it later with the postsuper command.
> > That's great for debugging purposes, but only if I need to send the message
> > just once.
> >
> > Would it be possible to expand the postsuper command with an optional command
> > line parameter that releases the message, but does not delete it from the hold
> > queue, so someone who needs to debug can resend it as many times as required
> > until I decide to ditch it?
>
> Postfix queue files should not have multiple hard links.
>
> Consider using RSYNC to COPY the file from the hold queue to the
> incoming queue, using the same file name.

Once it's there, will it take the same path as the initial mail (on
HOLD) would have taken?

> With the current Postfix queue implementation this is guaranteed not to
> cause a file name collision as long as the file in the HOLD queue keeps
> the same (device, inode) numbers.

That's ok.

--
Ralf Hildebrandt
Geschäftsbereich IT | Abteilung Netzwerk
Charité - Universitätsmedizin Berlin
Campus Benjamin Franklin
Hindenburgdamm 30 | D-12203 Berlin
Tel. +49 30 450 570 155 | Fax: +49 30 450 570 962
ralf.hildebrandt(a)charite.de | http://www.charite.de


From: Patrick Ben Koetter on
* Ralf Hildebrandt <postfix-users(a)postfix.org>:
> * Wietse Venema <wietse(a)porcupine.org>:
> > Patrick Ben Koetter:
> > > I can put a mail on HOLD and release it later with the postsuper command.
> > > That's great for debugging purposes, but only if I need to send the message
> > > just once.
> > >
> > > Would it be possible to expand the postsuper command with an optional command
> > > line parameter that releases the message, but does not delete it from the hold
> > > queue, so someone who needs to debug can resend it as many times as required
> > > until I decide to ditch it?
> >
> > Postfix queue files should not have multiple hard links.
> >
> > Consider using RSYNC to COPY the file from the hold queue to the
> > incoming queue, using the same file name.
>
> Once it's there, will it take the same path as the initial mail (on
> HOLD) would have taken?

Would it know what the initial path was? It could analyzing the
received:-header. Hmmm...

> > With the current Postfix queue implementation this is guaranteed not to
> > cause a file name collision as long as the file in the HOLD queue keeps
> > the same (device, inode) numbers.

That's good news.

Thanks.

p(a)rick


--
All technical questions asked privately will be automatically answered on the
list and archived for public access unless privacy is explicitely required and
justified.

saslfinger (debugging SMTP AUTH):
<http://postfix.state-of-mind.de/patrick.koetter/saslfinger/>

From: Wietse Venema on
Patrick Ben Koetter:
> > > Postfix queue files should not have multiple hard links.
> > >
> > > Consider using RSYNC to COPY the file from the hold queue to the
> > > incoming queue, using the same file name.
> >
> > Once it's there, will it take the same path as the initial mail (on
> > HOLD) would have taken?
>
> Would it know what the initial path was? It could analyzing the
> received:-header. Hmmm...

If the file was in the incoming queue before it was moved to the
hold queue, then one would expect the same result as if it was not
place on hold.

Note that all this is not promised by any documentation, because
the queue organization may be revised for better performance.

Wietse