On Fri, 19 Oct 2001, DOLIST Technical Center wrote:
> Hello,
>
> This is not clear for us how XMail schedules its message.
> Seems that after n retries it breaks and generates a delivery
> report.
>
> In the doc, we have :
>
> -Qi ratio = Set the increment ratio of the reschedule time in sending
> a messages. At every failure in delivery a message, reschedule time T
> is incremented by ( T / ratio ), therefore T(i) = T(i-1) +
> T(i-1)/ratio. If You set this ratio to zero, T remain unchanged over
> delivery tentatives.
>
> Concretely? ;)
> We have a problem with some message that generates delivery report
> after 12 hours. If the distant mail server is down for any reasons,
> then it is a little short. More if it is the week-end, or a long
> week-end.
>
> How can we deal with this and understand how it works?
>
> BTW, setting default values in the documentation would help everyone
> not to ask many things, my 2 euros :)
I added default values to the doc and i send you this _very_ complex c
source that can be used to get schedule times.
Use it like :
# zinc init_delay delay_incr num_retries
where :
init_delay = -Qt param
delay_incr = -Qi param
num_retries = -Qr param
So for default values we get :
# zinc 480 16 32
01 = 510
02 = 541
03 = 574
04 = 609
05 = 647
06 = 687
07 = 729
08 = 774
09 = 822
10 = 873
11 = 927
12 = 984
13 = 1045
14 = 1110
15 = 1179
16 = 1252
17 = 1330
18 = 1413
19 = 1501
20 = 1594
21 = 1693
22 = 1798
23 = 1910
24 = 2029
25 = 2155
26 = 2289
27 = 2432
28 = 2584
29 = 2745
30 = 2916
31 = 3098
tot = 45230
that means that the first retry is done after 510 sec, the second after
541 sec, and so on.
The message expire after 45320 sec == 12.58 hours
- Davide
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char * argv[])
{
unsigned t, i, n, tot, c;
if (argc < 4)
{
printf("use: %s init_delay delay_incr num_retries\n", argv[0]);
return 1;
}
t = atoi(argv[1]);
i = atoi(argv[2]);
n = atoi(argv[3]);
tot = t;
for (c = 1; c < n; c++)
{
t += t / i;
tot += t;
printf("%02u = %u\n", c, t);
}
printf("tot = %u\n", tot);
return 0;
}