Removed the global configuration options "DetachImmediately" and
"ShowStatistics". Consequently removed all code that deals with these options, too.
This commit is contained in:
parent
e1d0179fbb
commit
147e9c87fe
5
config.c
5
config.c
@ -37,7 +37,6 @@ static char * master_password = NULL;
|
||||
static char * mta = "/usr/sbin/sendmail";
|
||||
static char * mta_options = "-i -f%s";
|
||||
static bool detach = FALSE;
|
||||
static bool show_stats = TRUE;
|
||||
|
||||
int
|
||||
InitPetidomo(void)
|
||||
@ -53,8 +52,6 @@ InitPetidomo(void)
|
||||
{ "AdminPassword", CF_STRING, &master_password },
|
||||
{ "MTA", CF_STRING, &mta },
|
||||
{ "MTA_Options", CF_STRING, &mta_options },
|
||||
{ "DetachImmediately", CF_YES_NO, &detach },
|
||||
{ "ShowStatistics", CF_YES_NO, &show_stats },
|
||||
{ NULL, 0, NULL}
|
||||
};
|
||||
|
||||
@ -120,8 +117,6 @@ InitPetidomo(void)
|
||||
MasterConfig->master_password = master_password;
|
||||
MasterConfig->mta = mta;
|
||||
MasterConfig->mta_options = mta_options;
|
||||
MasterConfig->detach = detach;
|
||||
MasterConfig->show_stats = show_stats;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -61,45 +61,3 @@ MTA @MTA@
|
||||
#
|
||||
# The default, if the option is unset, is the string '-f%s'.
|
||||
#MTA_Options "-odq -f%s"
|
||||
|
||||
# TAG: DetachImmediately <yes|no>
|
||||
# This option decides whether Petidomo will run in syncronous or
|
||||
# asyncronous mode. When a part of the package is called, it expects
|
||||
# an incoming email message on standard input, which has usually been
|
||||
# received by the SMTP daemon before. So the daemon will pipe the mail
|
||||
# into the binary.
|
||||
#
|
||||
# In syncronous mode, Petidomo will process the mail completely,
|
||||
# before it terminates. Hence, the SMTP daemon has to wait until the
|
||||
# whole mail is processed, before it can terminate itself. This may
|
||||
# cause memory problems at high-load servers, where several dozen, or
|
||||
# even hundreds of emails can arrive at the same time.
|
||||
#
|
||||
# In asyncronous mode, Petidomo will read the mail and then detach
|
||||
# itself. The advantage is that the SMTP daemon can terminate
|
||||
# immediately and doesn't have to wait until Petidomo is finished
|
||||
# processing the mail. The disadvantage is that in case of an error,
|
||||
# the SMTP daemon will not receive the return code from Petidomo. For
|
||||
# smaller servers, syncronous mode is recommended -- larger servers
|
||||
# should use asyncronous mode.
|
||||
#
|
||||
# Please specify "no" to run in syncronous mode and "yes" for
|
||||
# asyncronous mode.
|
||||
#
|
||||
# The default, if the option is unset, is to operate syncronously.
|
||||
#DetachImmediately no
|
||||
|
||||
# TAG: ShowStatistics <yes|no>
|
||||
# Petidomo appends some run-time statistics at the end of every
|
||||
# reply to a command it processed, such as SUBSCRIBE or INDEX.
|
||||
# While this is often interesting or useful, some administrators
|
||||
# prefer Petidomo not to reveal any details of their
|
||||
# installation.
|
||||
#
|
||||
# In this case, setting this switch to "no" will tell Petidomo
|
||||
# to be quiet. Please note that this switch is ignored in the
|
||||
# non-commercial trial version.
|
||||
#
|
||||
# The default, if the option is unset, is to append the run-time
|
||||
# statistics.
|
||||
#ShowStatistics no
|
||||
|
||||
50
signature.c
50
signature.c
@ -33,43 +33,41 @@
|
||||
|
||||
void
|
||||
AppendSignature(FILE * fh)
|
||||
{
|
||||
const struct PD_Config * MasterConfig = getMasterConfig();
|
||||
{
|
||||
struct utsname machine_name;
|
||||
struct rusage resource_usage;
|
||||
|
||||
if (MasterConfig->show_stats == TRUE) {
|
||||
/* Start with the part of the signature that never fails. */
|
||||
|
||||
/* Start with the part of the signature that never fails. */
|
||||
fflush(fh);
|
||||
fprintf(fh, "\n\n-- \n");
|
||||
fprintf(fh, " /*\n");
|
||||
fprintf(fh, " * Listserver software: OpenPetidomo\n");
|
||||
|
||||
fflush(fh);
|
||||
fprintf(fh, "\n\n-- \n");
|
||||
fprintf(fh, " /*\n");
|
||||
fprintf(fh, " * Listserver software: OpenPetidomo\n");
|
||||
/* Determine what machine we are. */
|
||||
|
||||
/* Determine what machine we are. */
|
||||
|
||||
if (uname(&machine_name) == 0) {
|
||||
fprintf(fh, " * Server hardware : %s-%s\n",
|
||||
machine_name.sysname,
|
||||
machine_name.machine);
|
||||
if (uname(&machine_name) == 0)
|
||||
{
|
||||
fprintf(fh, " * Server hardware : %s-%s\n",
|
||||
machine_name.sysname,
|
||||
machine_name.machine);
|
||||
}
|
||||
|
||||
/* Determine our resource usage. */
|
||||
/* Determine our resource usage. */
|
||||
|
||||
getrusage(RUSAGE_SELF, &resource_usage);
|
||||
getrusage(RUSAGE_SELF, &resource_usage);
|
||||
|
||||
fprintf(fh, " * Utilized cpu time : %ld.%ld seconds\n",
|
||||
resource_usage.ru_utime.tv_sec + resource_usage.ru_stime.tv_sec,
|
||||
resource_usage.ru_utime.tv_usec + resource_usage.ru_stime.tv_usec);
|
||||
fprintf(fh, " * Utilized memory : %ld KByte\n",
|
||||
(resource_usage.ru_idrss > 0) ? resource_usage.ru_idrss :
|
||||
(long int)sbrk(0) / 1024);
|
||||
fprintf(fh, " * Utilized cpu time : %ld.%ld seconds\n",
|
||||
resource_usage.ru_utime.tv_sec + resource_usage.ru_stime.tv_sec,
|
||||
resource_usage.ru_utime.tv_usec + resource_usage.ru_stime.tv_usec);
|
||||
fprintf(fh, " * Utilized memory : %ld KByte\n",
|
||||
(resource_usage.ru_idrss > 0) ? resource_usage.ru_idrss :
|
||||
(long int)sbrk(0) / 1024);
|
||||
|
||||
/* Close signature. */
|
||||
/* Close signature. */
|
||||
|
||||
fprintf(fh, " */\n");
|
||||
fflush(fh);
|
||||
fprintf(fh, " */\n");
|
||||
fflush(fh);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user