git://git.exim.org
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9a26b6b
)
Implement daemon_startup_{retries,sleep} to control startup retrying.
author
Philip Hazel
<ph10@hermes.cam.ac.uk>
Tue, 21 Jun 2005 14:14:55 +0000
(14:14 +0000)
committer
Philip Hazel
<ph10@hermes.cam.ac.uk>
Tue, 21 Jun 2005 14:14:55 +0000
(14:14 +0000)
doc/doc-misc/WishList
patch
|
blob
|
history
doc/doc-txt/ChangeLog
patch
|
blob
|
history
doc/doc-txt/NewStuff
patch
|
blob
|
history
doc/doc-txt/OptionLists.txt
patch
|
blob
|
history
src/src/daemon.c
patch
|
blob
|
history
src/src/globals.c
patch
|
blob
|
history
src/src/globals.h
patch
|
blob
|
history
src/src/readconf.c
patch
|
blob
|
history
diff --git
a/doc/doc-misc/WishList
b/doc/doc-misc/WishList
index adc8b0bba9a41e5ce582df8c59aef2792d22f351..7624940c42aecb7124dc303291130392fcdc4792 100644
(file)
--- a/
doc/doc-misc/WishList
+++ b/
doc/doc-misc/WishList
@@
-1,4
+1,4
@@
-$Cambridge: exim/doc/doc-misc/WishList,v 1.
39 2005/06/16 15:48:58
ph10 Exp $
+$Cambridge: exim/doc/doc-misc/WishList,v 1.
40 2005/06/21 14:14:55
ph10 Exp $
EXIM 4 WISH LIST
----------------
EXIM 4 WISH LIST
----------------
@@
-1881,12
+1881,6
@@
file would contain the complete email. I suppose there may be other scanning
solutions with a similar requirement."
------------------------------------------------------------------------------
solutions with a similar requirement."
------------------------------------------------------------------------------
-(320) 03-Mar-05 T Options to control daemon retry binding
-
-Currently the daemon tries 10 times at 30-second intervals to listen on an IP
-address. The wish is for options to control these numbers.
-------------------------------------------------------------------------------
-
(321) 07-Mar-05 S Run an ACL on a sync error
... and possibly "accept" or "deny" it.
(321) 07-Mar-05 S Run an ACL on a sync error
... and possibly "accept" or "deny" it.
diff --git
a/doc/doc-txt/ChangeLog
b/doc/doc-txt/ChangeLog
index aea7fe9e8e9c3c1bf7d5703f273f8ff4eb985c14..158929d038d07a837632f82fcf8e468c3a806eef 100644
(file)
--- a/
doc/doc-txt/ChangeLog
+++ b/
doc/doc-txt/ChangeLog
@@
-1,4
+1,4
@@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.16
5 2005/06/20 13:58:22
ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.16
6 2005/06/21 14:14:55
ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
Change log file for Exim from version 4.21
-------------------------------------------
@@
-172,6
+172,8
@@
PH/22 Fixed some oversights/typos causing bugs when Exim is compiled with
These problems did NOT occur unless DomainKeys support was compiled.
These problems did NOT occur unless DomainKeys support was compiled.
+PH/23 Added daemon_startup_retries and daemon_startup_sleep.
+
Exim version 4.51
-----------------
Exim version 4.51
-----------------
diff --git
a/doc/doc-txt/NewStuff
b/doc/doc-txt/NewStuff
index 65b0fc6782e1cf888e45ee28578d0964b537b927..0805e0b5b67c17efad21f7c9020ebd6b3f7617a5 100644
(file)
--- a/
doc/doc-txt/NewStuff
+++ b/
doc/doc-txt/NewStuff
@@
-1,4
+1,4
@@
-$Cambridge: exim/doc/doc-txt/NewStuff,v 1.5
0 2005/06/16 20:03:43 tom
Exp $
+$Cambridge: exim/doc/doc-txt/NewStuff,v 1.5
1 2005/06/21 14:14:55 ph10
Exp $
New Features in Exim
--------------------
New Features in Exim
--------------------
@@
-342,6
+342,12
@@
TK/02 There are two new expansion items to help with the implementation of
sender='${quote_mysql:$sender_address}'} \
{$value}fail}}}
sender='${quote_mysql:$sender_address}'} \
{$value}fail}}}
+PH/04 There are two new options that control the retrying done by the daemon
+ at startup when it cannot immediately bind a socket (typically because
+ the socket is already in use). The default values reproduce what were
+ built-in constants previously: daemon_startup_retries defines the number
+ of retries after the first failure (default 9); daemon_startup_sleep
+ defines the length of time to wait between retries (default 30s).
Version 4.51
Version 4.51
diff --git
a/doc/doc-txt/OptionLists.txt
b/doc/doc-txt/OptionLists.txt
index ac1e06a112282fbaa52d4d4e9c16a5df26b45c03..53b76d304f9c4e423af30a15ffe45c071bce5015 100644
(file)
--- a/
doc/doc-txt/OptionLists.txt
+++ b/
doc/doc-txt/OptionLists.txt
@@
-1,4
+1,4
@@
-$Cambridge: exim/doc/doc-txt/OptionLists.txt,v 1.
8 2005/05/03 14:20:00
ph10 Exp $
+$Cambridge: exim/doc/doc-txt/OptionLists.txt,v 1.
9 2005/06/21 14:14:55
ph10 Exp $
LISTS OF EXIM OPTIONS
---------------------
LISTS OF EXIM OPTIONS
---------------------
@@
-140,6
+140,8
@@
create_file string "anywhere" appendfile
current_directory string unset transports 4.00
unset queryprogram 4.00
daemon_smtp_ports string unset main 1.75 pluralised in 4.21
current_directory string unset transports 4.00
unset queryprogram 4.00
daemon_smtp_ports string unset main 1.75 pluralised in 4.21
+daemon_startup_retries int 9 main 4.52
+daemon_startup_sleep time 30s main 4.52
data string unset redirect 4.00
data_timeout time 5m smtp
debug_print string* unset authenticators 4.00
data string unset redirect 4.00
data_timeout time 5m smtp
debug_print string* unset authenticators 4.00
diff --git
a/src/src/daemon.c
b/src/src/daemon.c
index 21d11102381921d9c9ecfc367589117894a257fd..974785c24282d61ce9a7375638bb27980bd30b29 100644
(file)
--- a/
src/src/daemon.c
+++ b/
src/src/daemon.c
@@
-1,4
+1,4
@@
-/* $Cambridge: exim/src/src/daemon.c,v 1.1
0 2005/03/15 14:09:12
ph10 Exp $ */
+/* $Cambridge: exim/src/src/daemon.c,v 1.1
1 2005/06/21 14:14:55
ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/*************************************************
* Exim - an Internet mail transport agent *
@@
-1249,7
+1249,6
@@
if (daemon_listen)
{
BOOL wildcard;
ip_address_item *ipa2;
{
BOOL wildcard;
ip_address_item *ipa2;
- int retries = 9;
int af;
if (Ustrchr(ipa->address, ':') != NULL)
int af;
if (Ustrchr(ipa->address, ':') != NULL)
@@
-1327,13
+1326,16
@@
if (daemon_listen)
msg = US strerror(errno);
addr = wildcard? ((af == AF_INET6)? US"(any IPv6)" : US"(any IPv4)") :
ipa->address;
msg = US strerror(errno);
addr = wildcard? ((af == AF_INET6)? US"(any IPv6)" : US"(any IPv4)") :
ipa->address;
- if (
retries--
<= 0)
+ if (
daemon_startup_retries
<= 0)
log_write(0, LOG_MAIN|LOG_PANIC_DIE,
"socket bind() to port %d for address %s failed: %s: "
"daemon abandoned", ipa->port, addr, msg);
log_write(0, LOG_MAIN, "socket bind() to port %d for address %s "
log_write(0, LOG_MAIN|LOG_PANIC_DIE,
"socket bind() to port %d for address %s failed: %s: "
"daemon abandoned", ipa->port, addr, msg);
log_write(0, LOG_MAIN, "socket bind() to port %d for address %s "
- "failed: %s: waiting before trying again", ipa->port, addr, msg);
- sleep(30);
+ "failed: %s: waiting %s before trying again (%d more %s)",
+ ipa->port, addr, msg, readconf_printtime(daemon_startup_sleep),
+ daemon_startup_retries, (daemon_startup_retries > 1)? "tries" : "try");
+ daemon_startup_retries--;
+ sleep(daemon_startup_sleep);
}
DEBUG(D_any)
}
DEBUG(D_any)
diff --git
a/src/src/globals.c
b/src/src/globals.c
index ee0fb6e6508f3f8010d230171391448c3cceac96..1f57ff3836d41c149553c88bdf49bdb5a9f85fce 100644
(file)
--- a/
src/src/globals.c
+++ b/
src/src/globals.c
@@
-1,4
+1,4
@@
-/* $Cambridge: exim/src/src/globals.c,v 1.
29 2005/06/16 20:01:29 tom
Exp $ */
+/* $Cambridge: exim/src/src/globals.c,v 1.
30 2005/06/21 14:14:55 ph10
Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/*************************************************
* Exim - an Internet mail transport agent *
@@
-392,6
+392,8
@@
uschar *csa_status = NULL;
BOOL daemon_listen = FALSE;
uschar *daemon_smtp_port = US"smtp";
BOOL daemon_listen = FALSE;
uschar *daemon_smtp_port = US"smtp";
+int daemon_startup_retries = 9;
+int daemon_startup_sleep = 30;
BOOL debug_daemon = FALSE;
int debug_fd = -1;
FILE *debug_file = NULL;
BOOL debug_daemon = FALSE;
int debug_fd = -1;
FILE *debug_file = NULL;
diff --git
a/src/src/globals.h
b/src/src/globals.h
index aed97d3e90cb28be437a3a1cb828a6a68fc19088..0c64224a289bc143c90a54a8e6a4bcd918900975 100644
(file)
--- a/
src/src/globals.h
+++ b/
src/src/globals.h
@@
-1,4
+1,4
@@
-/* $Cambridge: exim/src/src/globals.h,v 1.2
1 2005/06/16 20:01:29 tom
Exp $ */
+/* $Cambridge: exim/src/src/globals.h,v 1.2
2 2005/06/21 14:14:55 ph10
Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/*************************************************
* Exim - an Internet mail transport agent *
@@
-218,6
+218,8
@@
extern uschar *csa_status; /* Client SMTP Authorization result */
extern BOOL daemon_listen; /* True if listening required */
extern uschar *daemon_smtp_port; /* Can be a list of ports */
extern BOOL daemon_listen; /* True if listening required */
extern uschar *daemon_smtp_port; /* Can be a list of ports */
+extern int daemon_startup_retries; /* Number of times to retry */
+extern int daemon_startup_sleep; /* Sleep between retries */
extern BOOL debug_daemon; /* Debug the daemon process only */
extern int debug_fd; /* The fd for debug_file */
extern FILE *debug_file; /* Where to write debugging info */
extern BOOL debug_daemon; /* Debug the daemon process only */
extern int debug_fd; /* The fd for debug_file */
extern FILE *debug_file; /* Where to write debugging info */
diff --git
a/src/src/readconf.c
b/src/src/readconf.c
index 6a6b3ba2ac288617dc27f37b3aebcddfaf3941ac..b5c11301465b5f91ea3499901eec4dbe14988093 100644
(file)
--- a/
src/src/readconf.c
+++ b/
src/src/readconf.c
@@
-1,4
+1,4
@@
-/* $Cambridge: exim/src/src/readconf.c,v 1.
9 2005/05/24 08:15:02 tom
Exp $ */
+/* $Cambridge: exim/src/src/readconf.c,v 1.
10 2005/06/21 14:14:55 ph10
Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/*************************************************
* Exim - an Internet mail transport agent *
@@
-186,6
+186,8
@@
static optionlist optionlist_config[] = {
{ "check_spool_space", opt_Kint, &check_spool_space },
{ "daemon_smtp_port", opt_stringptr|opt_hidden, &daemon_smtp_port },
{ "daemon_smtp_ports", opt_stringptr, &daemon_smtp_port },
{ "check_spool_space", opt_Kint, &check_spool_space },
{ "daemon_smtp_port", opt_stringptr|opt_hidden, &daemon_smtp_port },
{ "daemon_smtp_ports", opt_stringptr, &daemon_smtp_port },
+ { "daemon_startup_retries", opt_int, &daemon_startup_retries },
+ { "daemon_startup_sleep", opt_time, &daemon_startup_sleep },
{ "delay_warning", opt_timelist, &delay_warning },
{ "delay_warning_condition", opt_stringptr, &delay_warning_condition },
{ "deliver_drop_privilege", opt_bool, &deliver_drop_privilege },
{ "delay_warning", opt_timelist, &delay_warning },
{ "delay_warning_condition", opt_stringptr, &delay_warning_condition },
{ "deliver_drop_privilege", opt_bool, &deliver_drop_privilege },