1 Description: Randomize the retry timeouts a bit.
2 Origin: other: http://svn.ringlet.net/svn/ringlet/mail/dma/
3 Forwarded: http://bugs.launchpad.net/dma/+bug/599542
4 Author: Peter Pentchev <roam@ringlet.net>
5 Last-Update: 2010-06-28
10 deliver(struct qitem *it)
13 - unsigned int backoff = MIN_RETRY;
14 + unsigned int backoff = it->remote? MIN_RETRY: MIN_RETRY_LOCAL;
15 const char *errmsg = "unknown bounce reason";
19 "delay cannot be interrupted");
21 signal(SIGALRM, SIG_DFL);
23 + backoff = backoff * 2 + (
30 if (backoff > MAX_RETRY)
38 #define MIN_RETRY 300 /* 5 minutes */
39 +#define MIN_RETRY_LOCAL 30 /* 30 seconds */
40 #define MAX_RETRY (3*60*60) /* retry at least every 3 hours */
41 +#define RETRY_JITTER 10
42 #define MAX_TIMEOUT (5*24*60*60) /* give up after 5 days */
44 #define PATH_MAX 1024 /* Max path len */