Removed the signature code and all code that depended on it. In the
new Petidomo, the signature mechanism for server mails will work differently.
This commit is contained in:
parent
147e9c87fe
commit
069042ad61
27
Makefile.in
27
Makefile.in
@ -31,7 +31,7 @@ LDFLAGS = @LDFLAGS@
|
||||
OBJS = acl.o archive.o authen.o config.o \
|
||||
filter.o handleacl.o help.o hermes.o index.o io.o listserv.o \
|
||||
mailer.o members.o parsearray.o password.o rfcparse.o \
|
||||
subscribe.o tool.o signature.o unsubscribe.o main.o
|
||||
subscribe.o tool.o unsubscribe.o main.o
|
||||
LIBS = librfc822/librfc822.a liblists/liblists.a libargv/libargv.a \
|
||||
libconfigfile/libconfigfile.a libtext/libtext.a
|
||||
|
||||
@ -81,28 +81,3 @@ realclean:: distclean
|
||||
|
||||
# Dependencies
|
||||
|
||||
acl.o: libtext/text.h petidomo.h libargv/argv.h acl_scan.c acl_scan.h
|
||||
acl_scan.o: acl_scan.h
|
||||
archive.o: libtext/text.h petidomo.h libargv/argv.h
|
||||
authen.o: libtext/text.h petidomo.h libargv/argv.h
|
||||
config.o: liblists/lists.h libconfigfile/configfile.h petidomo.h
|
||||
config.o: libargv/argv.h
|
||||
exit.o: libtext/text.h petidomo.h libargv/argv.h
|
||||
filter.o: petidomo.h libargv/argv.h
|
||||
handleacl.o: petidomo.h libargv/argv.h
|
||||
help.o: libtext/text.h petidomo.h libargv/argv.h
|
||||
hermes.o: libtext/text.h petidomo.h libargv/argv.h
|
||||
index.o: libtext/text.h petidomo.h libargv/argv.h
|
||||
io.o: petidomo.h libargv/argv.h
|
||||
listserv.o: libtext/text.h petidomo.h libargv/argv.h
|
||||
mailer.o: libtext/text.h petidomo.h libargv/argv.h
|
||||
main.o: petidomo.h libargv/argv.h
|
||||
members.o: libtext/text.h petidomo.h libargv/argv.h
|
||||
parsearray.o: petidomo.h libargv/argv.h
|
||||
password.o: petidomo.h libargv/argv.h
|
||||
rfcparse.o: librfc822/rfc822.h libtext/text.h petidomo.h libargv/argv.h
|
||||
rfcparse.o:
|
||||
signature.o: petidomo.h libargv/argv.h
|
||||
subscribe.o: libtext/text.h petidomo.h libargv/argv.h
|
||||
tool.o: libtext/text.h petidomo.h libargv/argv.h
|
||||
unsubscribe.o: libtext/text.h petidomo.h libargv/argv.h
|
||||
|
||||
1
config.c
1
config.c
@ -36,7 +36,6 @@ static char * fqdn = NULL;
|
||||
static char * master_password = NULL;
|
||||
static char * mta = "/usr/sbin/sendmail";
|
||||
static char * mta_options = "-i -f%s";
|
||||
static bool detach = FALSE;
|
||||
|
||||
int
|
||||
InitPetidomo(void)
|
||||
|
||||
4
help.c
4
help.c
@ -77,7 +77,6 @@ SendHelp(struct Mail * MailStruct,
|
||||
syslog(LOG_NOTICE, "List \"%s\" doesn't have a description.", param1);
|
||||
fprintf(fh, "No description available.\n");
|
||||
}
|
||||
AppendSignature(fh);
|
||||
CloseMailer(fh);
|
||||
}
|
||||
else {
|
||||
@ -111,7 +110,6 @@ SendHelp(struct Mail * MailStruct,
|
||||
"mailing list server.", param1);
|
||||
text_wordwrap(buffer, 75);
|
||||
fprintf(fh, "%s\n", buffer);
|
||||
AppendSignature(fh);
|
||||
CloseMailer(fh);
|
||||
}
|
||||
}
|
||||
@ -147,7 +145,6 @@ SendHelp(struct Mail * MailStruct,
|
||||
syslog(LOG_ERR, "There is no help file for Petidomo!");
|
||||
fprintf(fh, "No help text available.\n");
|
||||
}
|
||||
AppendSignature(fh);
|
||||
CloseMailer(fh);
|
||||
}
|
||||
|
||||
@ -204,7 +201,6 @@ Indecipherable(struct Mail * MailStruct, const char * defaultlist)
|
||||
syslog(LOG_ERR, "There is no help file for Petidomo!");
|
||||
fprintf(fh, "No help text available.\n");
|
||||
}
|
||||
AppendSignature(fh);
|
||||
CloseMailer(fh);
|
||||
return 0;
|
||||
}
|
||||
|
||||
1
index.c
1
index.c
@ -148,7 +148,6 @@ GenIndex(struct Mail * MailStruct,
|
||||
fprintf(fh, "Found %d mailing lists.\n", entry_num);
|
||||
}
|
||||
|
||||
AppendSignature(fh);
|
||||
CloseMailer(fh);
|
||||
|
||||
return 0;
|
||||
|
||||
@ -89,7 +89,6 @@ SendSubscriberList(struct Mail * MailStruct,
|
||||
"under the address \"%s\" instead.", owner);
|
||||
text_wordwrap(buffer, 75);
|
||||
fprintf(fh, "%s\n", buffer);
|
||||
AppendSignature(fh);
|
||||
CloseMailer(fh);
|
||||
}
|
||||
else
|
||||
@ -135,7 +134,6 @@ SendSubscriberList(struct Mail * MailStruct,
|
||||
fputc(*p, fh);
|
||||
}
|
||||
}
|
||||
AppendSignature(fh);
|
||||
CloseMailer(fh);
|
||||
}
|
||||
else {
|
||||
|
||||
73
signature.c
73
signature.c
@ -1,73 +0,0 @@
|
||||
/*
|
||||
$Source$
|
||||
$Revision$
|
||||
|
||||
Copyright (C) 2000 by CyberSolutions GmbH, Germany.
|
||||
|
||||
This file is part of OpenPetidomo.
|
||||
|
||||
OpenPetidomo is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
OpenPetidomo is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/resource.h>
|
||||
#ifndef RUSAGE_SELF
|
||||
# define RUSAGE_SELF 0
|
||||
#endif
|
||||
#ifndef RUSAGE_CHILDREN
|
||||
# define RUSAGE_CHILDREN -1
|
||||
#endif
|
||||
|
||||
#include "petidomo.h"
|
||||
|
||||
void
|
||||
AppendSignature(FILE * fh)
|
||||
{
|
||||
struct utsname machine_name;
|
||||
struct rusage resource_usage;
|
||||
|
||||
/* 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");
|
||||
|
||||
/* Determine what machine we are. */
|
||||
|
||||
if (uname(&machine_name) == 0)
|
||||
{
|
||||
fprintf(fh, " * Server hardware : %s-%s\n",
|
||||
machine_name.sysname,
|
||||
machine_name.machine);
|
||||
}
|
||||
|
||||
/* Determine our 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);
|
||||
|
||||
/* Close signature. */
|
||||
|
||||
fprintf(fh, " */\n");
|
||||
fflush(fh);
|
||||
|
||||
}
|
||||
|
||||
@ -103,7 +103,6 @@ AddAddress(struct Mail * MailStruct,
|
||||
"be notified as soon as possible.", listname);
|
||||
text_wordwrap(buffer, 75);
|
||||
fprintf(fh, "%s\n", buffer);
|
||||
AppendSignature(fh);
|
||||
CloseMailer(fh);
|
||||
}
|
||||
else
|
||||
@ -129,7 +128,6 @@ AddAddress(struct Mail * MailStruct,
|
||||
fprintf(fh, "%s\n\n", buffer);
|
||||
fprintf(fh, "password <AdminPassword>\n");
|
||||
fprintf(fh, "subscribe %s %s\n", address, listname);
|
||||
AppendSignature(fh);
|
||||
CloseMailer(fh);
|
||||
}
|
||||
else {
|
||||
@ -166,7 +164,6 @@ AddAddress(struct Mail * MailStruct,
|
||||
"as soon as possible.", listname);
|
||||
text_wordwrap(buffer, 75);
|
||||
fprintf(fh, "%s\n", buffer);
|
||||
AppendSignature(fh);
|
||||
CloseMailer(fh);
|
||||
}
|
||||
else
|
||||
@ -193,7 +190,6 @@ AddAddress(struct Mail * MailStruct,
|
||||
fprintf(fh, "%s\n\n", buffer);
|
||||
fprintf(fh, "password <AdminPassword>\n");
|
||||
fprintf(fh, "subscribe %s %s\n", address, listname);
|
||||
AppendSignature(fh);
|
||||
CloseMailer(fh);
|
||||
}
|
||||
else {
|
||||
@ -224,7 +220,6 @@ AddAddress(struct Mail * MailStruct,
|
||||
fprintf(fh, "Sender: %s\n", envelope);
|
||||
fprintf(fh, "\n");
|
||||
fprintf(fh, "The address is subscribed to this list already.\n");
|
||||
AppendSignature(fh);
|
||||
CloseMailer(fh);
|
||||
}
|
||||
else {
|
||||
@ -285,7 +280,6 @@ AddAddress(struct Mail * MailStruct,
|
||||
fprintf(fh, "unsubscribe %s\n\n", address);
|
||||
fprintf(fh, "Please save a copy of this mail, to make sure you remember how " \
|
||||
"to\nunsubscribe!\n");
|
||||
AppendSignature(fh);
|
||||
CloseMailer(fh);
|
||||
}
|
||||
else {
|
||||
|
||||
@ -104,7 +104,6 @@ DeleteAddress(struct Mail * MailStruct,
|
||||
"be notified as soon as possible.", listname);
|
||||
text_wordwrap(buffer, 75);
|
||||
fprintf(fh, "%s\n", buffer);
|
||||
AppendSignature(fh);
|
||||
CloseMailer(fh);
|
||||
}
|
||||
else
|
||||
@ -130,7 +129,6 @@ DeleteAddress(struct Mail * MailStruct,
|
||||
fprintf(fh, "%s\n\n", buffer);
|
||||
fprintf(fh, "password <AdminPassword>\n");
|
||||
fprintf(fh, "unsubscribe %s %s\n", address, listname);
|
||||
AppendSignature(fh);
|
||||
CloseMailer(fh);
|
||||
}
|
||||
else {
|
||||
@ -167,7 +165,6 @@ DeleteAddress(struct Mail * MailStruct,
|
||||
"as soon as possible.", listname);
|
||||
text_wordwrap(buffer, 75);
|
||||
fprintf(fh, "%s\n", buffer);
|
||||
AppendSignature(fh);
|
||||
CloseMailer(fh);
|
||||
}
|
||||
else
|
||||
@ -194,7 +191,6 @@ DeleteAddress(struct Mail * MailStruct,
|
||||
fprintf(fh, "%s\n\n", buffer);
|
||||
fprintf(fh, "password <AdminPassword>\n");
|
||||
fprintf(fh, "unsubscribe %s %s\n", address, listname);
|
||||
AppendSignature(fh);
|
||||
CloseMailer(fh);
|
||||
}
|
||||
else {
|
||||
@ -225,7 +221,6 @@ DeleteAddress(struct Mail * MailStruct,
|
||||
fprintf(fh, "Sender: %s\n", envelope);
|
||||
fprintf(fh, "\n");
|
||||
fprintf(fh, "The address is not subscribed to this list.\n");
|
||||
AppendSignature(fh);
|
||||
CloseMailer(fh);
|
||||
}
|
||||
else {
|
||||
@ -280,7 +275,6 @@ DeleteAddress(struct Mail * MailStruct,
|
||||
}
|
||||
text_wordwrap(buffer, 75);
|
||||
fprintf(fh, "%s", buffer);
|
||||
AppendSignature(fh);
|
||||
CloseMailer(fh);
|
||||
}
|
||||
else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user