Re: Setting short minutes in delay_warning_time triggers warningu

2020-03-11 Thread Bill Cole

On 11 Mar 2020, at 10:42, Dominic Raferd wrote:

Has anyone successfully set a delay_warning_time of less than 1 hour 
(or,
better, less than 30 minutes) without creating a bespoke bounce 
template?


If by "successfully" you mean that the value is honored to the degree 
that the queue run frequency allows, yes. The delay warning message is 
sent after the first unsuccessful delivery attempt past the 
delay_warning_time.


If you mean that the delay warning message is sent precisely when the 
message has been deferred for delay_warning_time and/or that the delay 
message doesn't include the odd assertion that "Your message could not 
be delivered for more than 0 hour(s)" then the answer is no.


--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire


Re: Setting short minutes in delay_warning_time triggers warningu

2020-03-11 Thread Jivan Pal
> the following names may appear in bounce templates. They have no meaning
anywhere else in Postfix.

Apologies, I didn't realise that Dominic was asking about doing so
specifically *without* using a bounce template.
-- 
Jivan


Re: Setting short minutes in delay_warning_time triggers warningu

2020-03-11 Thread Wietse Venema
As extensively documented, the following names may appear in
bounce templates.

> - delay_warning_time_seconds
> - delay_warning_time_minutes
> - delay_warning_time_hours
> - delay_warning_time_days
> - delay_warning_time_weeks

They have no meaning anywhere else in Postfix.

Wietse


Re: Setting short minutes in delay_warning_time triggers warningu

2020-03-11 Thread Jivan Pal
@Dominic:

Have you not tried `delay_warning_time_minutes = 15` as the quoted
documentation specifies?

>delay_warning_time_suffix
>   Expands into the  value  of  the
>   delay_warning_time parameter, expressed  in the
>   time unit specified by suffix, which is one of
>   seconds, minutes, hours, days, or weeks.

It means that the following are all valid parameters:

- delay_warning_time_seconds
- delay_warning_time_minutes
- delay_warning_time_hours
- delay_warning_time_days
- delay_warning_time_weeks

Regards,
Jivan


Re: Setting short minutes in delay_warning_time triggers warningu

2020-03-11 Thread Dominic Raferd
On Wed, 11 Mar 2020 at 16:38, Wietse Venema  wrote:

> Dominic Raferd:
> > Has anyone successfully set a delay_warning_time of less than 1 hour (or,
> > better, less than 30 minutes) without creating a bespoke bounce template?
>
> Unlikely, because that would tell the sender that their message
> could not be delivered in 0 hours (and using floating point, 0.12
> hours, would also look silly). In theory it would be possible to
> turn the bounce template expander into a programming language, but
> this is such an unlikely scenario that the development cycles are
> better spent on things that benefit more people.
>

OK understood and thanks for the confirmation.


Re: Setting short minutes in delay_warning_time triggers warningu

2020-03-11 Thread Wietse Venema
Dominic Raferd:
> Has anyone successfully set a delay_warning_time of less than 1 hour (or,
> better, less than 30 minutes) without creating a bespoke bounce template?

Unlikely, because that would tell the sender that their message
could not be delivered in 0 hours (and using floating point, 0.12
hours, would also look silly). In theory it would be possible to
turn the bounce template expander into a programming language, but
this is such an unlikely scenario that the development cycles are
better spent on things that benefit more people.

Wietse


Re: Setting short minutes in delay_warning_time triggers warningu

2020-03-11 Thread Viktor Dukhovni
On Wed, Mar 11, 2020 at 02:42:20PM +, Dominic Raferd wrote:

> > > >delay_warning_time_suffix
> > > >   Expands into the  value  of  the
> > > >   delay_warning_time parameter, expressed  in the
> > > >   time unit specified by suffix, which is one of
> > > >   seconds, minutes, hours, days, or weeks.
> > >
> > > Thanks again. I add to main.cf:
> > > # match text in delay message to the setting delay_warning_time = 15m
> > > delay_warning_time_hours = 0.25

Floating point is not supported in this context.

> OK thanks Wietse. But as I don't want to be bothered with a bespoke bounce
> template (and the risk that it gets out-dated as/when the default template
> changes) I seem to be limited to a minimum delay_warning_time of 1h.

If you can't be bothered with updating the bounce template, then you
probably shouldn't bother to customize the warning time to a different
scale.

And at least 1h is a good idea anyway; too short a warning time runs
into too many false positives with greylisting...

> Has anyone successfully set a delay_warning_time of less than 1 hour (or,
> better, less than 30 minutes) without creating a bespoke bounce template?

Obviously not, since floating point is not supported in bounce
templates.

-- 
Viktor.


Re: Setting short minutes in delay_warning_time triggers warningu

2020-03-11 Thread Dominic Raferd
On Wed, 11 Mar 2020 at 14:08, Wietse Venema  wrote:

> Dominic Raferd:
> > > man 5 bounce
> > >
> > >delay_warning_time_suffix
> > >   Expands into the  value  of  the  delay_warning_time
> > > parameter,
> > >   expressed  in the time unit specified by suffix, which is
> > > one of
> > >   seconds, minutes, hours, days, or weeks.
> > >
> > > man 1 postconf
> > >
> > >-t [template_file]
> > >   Display  the templates for text that appears at the
> > > beginning of
> > >   delivery status notification (DSN) messages,  without
> > > expanding
> > >   $name expressions.
> > >
> > > man 5 bounce
> > >
> > > GENERAL PROCEDURE
> > >To create a customized bounce template file, create a temporary
> > > copy of
> > >the file /etc/postfix/bounce.cf.default and edit the temporary
> file.
> > >
> > > And so on.
> > >
> > > Wietse
> > >
> > > postconf -t
> > >
> >
> > Thanks again. I add to main.cf:
> > # match text in delay message to the setting delay_warning_time = 15m
> > delay_warning_time_hours = 0.25
>
> It goes in the bounce template. Please read "GENERAL PROCEDURE" above.
>

OK thanks Wietse. But as I don't want to be bothered with a bespoke bounce
template (and the risk that it gets out-dated as/when the default template
changes) I seem to be limited to a minimum delay_warning_time of 1h. If I
try to specify delay_warning_time of less (for example 15m) I get
error/warning messages that AFAIK can only be fully resolved by creating a
bespoke bounce template. It is also causes a fatal 'bad time value or unit'
error if I specify a non-integer value for delay_warning_time.

Has anyone successfully set a delay_warning_time of less than 1 hour (or,
better, less than 30 minutes) without creating a bespoke bounce template?


Re: Setting short minutes in delay_warning_time triggers warningu

2020-03-11 Thread Wietse Venema
Dominic Raferd:
> > man 5 bounce
> >
> >delay_warning_time_suffix
> >   Expands into the  value  of  the  delay_warning_time
> > parameter,
> >   expressed  in the time unit specified by suffix, which is
> > one of
> >   seconds, minutes, hours, days, or weeks.
> >
> > man 1 postconf
> >
> >-t [template_file]
> >   Display  the templates for text that appears at the
> > beginning of
> >   delivery status notification (DSN) messages,  without
> > expanding
> >   $name expressions.
> >
> > man 5 bounce
> >
> > GENERAL PROCEDURE
> >To create a customized bounce template file, create a temporary
> > copy of
> >the file /etc/postfix/bounce.cf.default and edit the temporary file.
> >
> > And so on.
> >
> > Wietse
> >
> > postconf -t
> >
> 
> Thanks again. I add to main.cf:
> # match text in delay message to the setting delay_warning_time = 15m
> delay_warning_time_hours = 0.25

It goes in the bounce template. Please read "GENERAL PROCEDURE" above.

Wietse


Re: Setting short minutes in delay_warning_time triggers warningu

2020-03-11 Thread Dominic Raferd
On Wed, 11 Mar 2020 at 11:15, Wietse Venema  wrote:

> Dominic Raferd:
> > On Wed, 11 Mar 2020 at 11:06, Wietse Venema 
> wrote:
> >
> > > Dominic Raferd:
> > > > Using postfix 3.3.0 I recently set, in main.cf, 'delay_warning_time
> =
> > > 15m'.
> > > > Now when an outgoing message is delayed I see these in the log:
> > > >
> > > > ... postfix/bounce[12303]: warning: [built-in]: zero result in delay
> > > > template conversion of parameter "delay_warning_time_hours"
> > > > ... postfix/bounce[12303]: warning: please reduce time unit "hours"
> of
> > > > "delay_warning_time_hours" in delay template
> > > > ... postfix/bounce[12303]: warning: for instructions see the
> bounce(5)
> > > > manual
> > > >
> > > > Strangely (to me), these messages appear 20 minutes (not 15 minutes)
> > > after
> > > > the original message was delayed.
> > > >
> > > > I am not using any special delay template:
> > > > # postconf bounce_template_file
> > > > bounce_template_file =
> > > >
> > > > I have looked at man 5 bounce. Does the built-in template use an
> > > > undocumented parameter 'delay_warning_time_hours'?
> > >
> > > use 'delay_warning_time_minutes'
> > >
> > > Wietse
> > >
> >
> > Thanks but where do I use this? I never used delay_warning_time_hours
> > anywhere! I only set 'delay_warning_time = 15m' in main.cf.
> >
> > If I need to create a bespoke bounce template file (because
> > delay_warning_time_hours is used in the built-in default template), where
> > can I see the built-in default template so that I can work from it?
>
> man 5 bounce
>
>delay_warning_time_suffix
>   Expands into the  value  of  the  delay_warning_time
> parameter,
>   expressed  in the time unit specified by suffix, which is
> one of
>   seconds, minutes, hours, days, or weeks.
>
> man 1 postconf
>
>-t [template_file]
>   Display  the templates for text that appears at the
> beginning of
>   delivery status notification (DSN) messages,  without
> expanding
>   $name expressions.
>
> man 5 bounce
>
> GENERAL PROCEDURE
>To create a customized bounce template file, create a temporary
> copy of
>the file /etc/postfix/bounce.cf.default and edit the temporary file.
>
> And so on.
>
> Wietse
>
> postconf -t
>

Thanks again. I add to main.cf:
# match text in delay message to the setting delay_warning_time = 15m
delay_warning_time_hours = 0.25

but then:
# postfix reload
/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter:
delay_warning_time_hours=0.25

.. yet this parameter is used in the default bounce template as shown by
postconf -t.

(Still I am not using a bespoke bounce template file, maybe I have to, even
if it is identical to the default, to make this warning message go away?)


Re: Setting short minutes in delay_warning_time triggers warningu

2020-03-11 Thread Wietse Venema
Dominic Raferd:
> On Wed, 11 Mar 2020 at 11:06, Wietse Venema  wrote:
> 
> > Dominic Raferd:
> > > Using postfix 3.3.0 I recently set, in main.cf, 'delay_warning_time =
> > 15m'.
> > > Now when an outgoing message is delayed I see these in the log:
> > >
> > > ... postfix/bounce[12303]: warning: [built-in]: zero result in delay
> > > template conversion of parameter "delay_warning_time_hours"
> > > ... postfix/bounce[12303]: warning: please reduce time unit "hours" of
> > > "delay_warning_time_hours" in delay template
> > > ... postfix/bounce[12303]: warning: for instructions see the bounce(5)
> > > manual
> > >
> > > Strangely (to me), these messages appear 20 minutes (not 15 minutes)
> > after
> > > the original message was delayed.
> > >
> > > I am not using any special delay template:
> > > # postconf bounce_template_file
> > > bounce_template_file =
> > >
> > > I have looked at man 5 bounce. Does the built-in template use an
> > > undocumented parameter 'delay_warning_time_hours'?
> >
> > use 'delay_warning_time_minutes'
> >
> > Wietse
> >
> 
> Thanks but where do I use this? I never used delay_warning_time_hours
> anywhere! I only set 'delay_warning_time = 15m' in main.cf.
> 
> If I need to create a bespoke bounce template file (because
> delay_warning_time_hours is used in the built-in default template), where
> can I see the built-in default template so that I can work from it?

man 5 bounce

   delay_warning_time_suffix
  Expands into the  value  of  the  delay_warning_time  parameter,
  expressed  in the time unit specified by suffix, which is one of
  seconds, minutes, hours, days, or weeks.

man 1 postconf

   -t [template_file]
  Display  the templates for text that appears at the beginning of
  delivery status notification (DSN) messages,  without  expanding
  $name expressions.

man 5 bounce

GENERAL PROCEDURE
   To create a customized bounce template file, create a temporary copy of
   the file /etc/postfix/bounce.cf.default and edit the temporary file.

And so on.

Wietse

postconf -t