Skip to content
Snippets Groups Projects
Commit c308a1e8 authored by rswindell's avatar rswindell
Browse files

More startup values set to sensible defaults (if 0/uninitialized).

parent 63b68301
No related branches found
No related tags found
No related merge requests found
......@@ -2314,8 +2314,13 @@ void DLLCALL mail_server(void* arg)
return;
}
if(startup->relay_port==0)
startup->relay_port=IPPORT_SMTP;
/* Setup intelligent defaults */
if(startup->relay_port==0) startup->relay_port=IPPORT_SMTP;
if(startup->smtp_port==0) startup->smtp_port=IPPORT_SMTP;
if(startup->pop3_port==0) startup->pop3_port=110;
if(startup->rescan_frequency==0) startup->rescan_frequency=3600; /* 60 minutes */
if(startup->max_delivery_attempts==0) startup->max_delivery_attempts=50;
if(startup->max_inactivity==0) startup->max_inactivity=120; /* seconds */
thread_up();
......@@ -2374,7 +2379,7 @@ void DLLCALL mail_server(void* arg)
return;
}
if(!startup->max_clients) {
if(startup->max_clients==0) {
startup->max_clients=scfg.sys_nodes;
if(startup->max_clients<10)
startup->max_clients=10;
......@@ -2382,9 +2387,6 @@ void DLLCALL mail_server(void* arg)
lprintf("Maximum clients: %u",startup->max_clients);
if(!startup->max_inactivity)
startup->max_inactivity=120; /* seconds */
lprintf("Maximum inactivity: %u seconds",startup->max_inactivity);
active_clients=0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment