Mercurial > hg > mlmmj
changeset 430:4ec6c541b7c0
Logging
author | mmj |
---|---|
date | Tue, 18 Jan 2005 19:03:47 +1100 |
parents | 2e0ef09de41f |
children | 37671335fe17 |
files | ChangeLog README src/Makefile.am src/listcontrol.c src/mlmmj-maintd.c src/mlmmj-process.c src/mlmmj-recieve.c |
diffstat | 7 files changed, 61 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Jan 18 18:52:47 2005 +1100 +++ b/ChangeLog Tue Jan 18 19:03:47 2005 +1100 @@ -1,5 +1,12 @@ +1.2.0-RC2 + o Add logging regular operation to mlmmj.operation.log + o Fix the sending loop by not sending the rest of the batch in every + iteration 1.2.0-RC1 - o Add VERP support. http://www.postfix.org/VERP_README.html for Postfix howto + o Add VERP support. http://cr.yp.to/proto/verp.txt + For Postfix: http://www.postfix.org/VERP_README.html, add "postfix" to + LISTDIR/control/verp + $smtpd_authorized_verp_clients should be the only one needed to touch 1.1.1-RC2 o It's ok to log to a symbolic link to somewhere else o Add Message-Id: and Date: headers to mail from mlmmj
--- a/README Tue Jan 18 18:52:47 2005 +1100 +++ b/README Tue Jan 18 19:03:47 2005 +1100 @@ -1,4 +1,4 @@ -README mlmmj-1.1.1-RC1 January 13th 2005 +README mlmmj-1.2.0-RC1 January 16th 2005 This is an attempt at implementing a mailing list manager with the same functionality as the brilliant ezmlm, but with a decent license and mail server @@ -18,6 +18,7 @@ · Web-interface · Digests · No mail delivery subscription + · VERP support To use mlmmj, do the following:
--- a/src/Makefile.am Tue Jan 18 18:52:47 2005 +1100 +++ b/src/Makefile.am Tue Jan 18 19:03:47 2005 +1100 @@ -28,7 +28,7 @@ print-version.c send_help.c prepstdreply.c \ do_all_the_voodo_here.c mygetline.c gethdrline.c \ log_error.c statctrl.c ctrlvalue.c dumpfd2fd.c \ - subscriberfuncs.c ctrlvalues.c memory.c + subscriberfuncs.c ctrlvalues.c memory.c log_oper.c mlmmj_sub_SOURCES = mlmmj-sub.c writen.c mylocking.c \ getlistaddr.c chomp.c random-int.c strgen.c \ @@ -49,7 +49,7 @@ mlmmj_maintd_SOURCES = mlmmj-maintd.c print-version.c log_error.c mygetline.c \ strgen.c random-int.c chomp.c writen.c memory.c \ ctrlvalue.c send_digest.c getlistaddr.c dumpfd2fd.c \ - mylocking.c + mylocking.c log_oper.c mlmmj_list_SOURCES = mlmmj-list.c strgen.c writen.c print-version.c memory.c \ log_error.c random-int.c
--- a/src/listcontrol.c Tue Jan 18 18:52:47 2005 +1100 +++ b/src/listcontrol.c Tue Jan 18 19:03:47 2005 +1100 @@ -41,6 +41,7 @@ #include "mygetline.h" #include "chomp.h" #include "memory.h" +#include "log_oper.h" enum ctrl_e { CTRL_SUBSCRIBE_DIGEST, @@ -170,6 +171,9 @@ if (!strchr(fromemails->emaillist[0], '@')) /* Not a valid From: address, silently ignore */ exit(EXIT_SUCCESS); + log_oper(listdir, OPLOGFNAME, "mlmmj-sub: request for digest" + " subscription from %s", + fromemails->emaillist[0]); execlp(mlmmjsub, mlmmjsub, "-L", listdir, "-a", fromemails->emaillist[0], @@ -188,6 +192,9 @@ if (!strchr(fromemails->emaillist[0], '@')) /* Not a valid From: address, silently ignore */ exit(EXIT_SUCCESS); + log_oper(listdir, OPLOGFNAME, "mlmmj-sub: request for nomail" + " subscription from %s", + fromemails->emaillist[0]); execlp(mlmmjsub, mlmmjsub, "-L", listdir, "-a", fromemails->emaillist[0], @@ -206,6 +213,9 @@ if (!strchr(fromemails->emaillist[0], '@')) /* Not a valid From: address, silently ignore */ exit(EXIT_SUCCESS); + log_oper(listdir, OPLOGFNAME, "mlmmj-sub: request for regular" + " subscription from %s", + fromemails->emaillist[0]); execlp(mlmmjsub, mlmmjsub, "-L", listdir, "-a", fromemails->emaillist[0], @@ -230,6 +240,8 @@ chomp(tmpstr); close(tmpfd); unlink(conffilename); + log_oper(listdir, OPLOGFNAME, "mlmmj-sub: %s confirmed" + " subscription to digest", tmpstr); execlp(mlmmjsub, mlmmjsub, "-L", listdir, "-a", tmpstr, @@ -255,6 +267,8 @@ chomp(tmpstr); close(tmpfd); unlink(conffilename); + log_oper(listdir, OPLOGFNAME, "mlmmj-sub: %s confirmed" + " subscription to nomail", tmpstr); execlp(mlmmjsub, mlmmjsub, "-L", listdir, "-a", tmpstr, @@ -280,6 +294,9 @@ chomp(tmpstr); close(tmpfd); unlink(conffilename); + log_oper(listdir, OPLOGFNAME, "mlmmj-sub: %s confirmed" + " subscription to regular list", + tmpstr); execlp(mlmmjsub, mlmmjsub, "-L", listdir, "-a", tmpstr, @@ -297,6 +314,9 @@ if (!strchr(fromemails->emaillist[0], '@')) /* Not a valid From: address, silently ignore */ exit(EXIT_SUCCESS); + log_oper(listdir, OPLOGFNAME, "mlmmj-unsub: %s requests" + " unsubscribe from digest", + fromemails->emaillist[0]); execlp(mlmmjunsub, mlmmjunsub, "-L", listdir, "-a", fromemails->emaillist[0], @@ -315,6 +335,9 @@ if (!strchr(fromemails->emaillist[0], '@')) /* Not a valid From: address, silently ignore */ exit(EXIT_SUCCESS); + log_oper(listdir, OPLOGFNAME, "mlmmj-unsub: %s requests" + " unsubscribe from nomail", + fromemails->emaillist[0]); execlp(mlmmjunsub, mlmmjunsub, "-L", listdir, "-a", fromemails->emaillist[0], @@ -333,6 +356,9 @@ if (!strchr(fromemails->emaillist[0], '@')) /* Not a valid From: address, silently ignore */ exit(EXIT_SUCCESS); + log_oper(listdir, OPLOGFNAME, "mlmmj-unsub: %s requests" + " unsubscribe from regular list", + fromemails->emaillist[0]); execlp(mlmmjunsub, mlmmjunsub, "-L", listdir, "-a", fromemails->emaillist[0], @@ -357,6 +383,8 @@ close(tmpfd); chomp(tmpstr); unlink(conffilename); + log_oper(listdir, OPLOGFNAME, "mlmmj-unsub: %s confirmed" + " unsubscribe from digest", tmpstr); execlp(mlmmjunsub, mlmmjunsub, "-L", listdir, "-a", tmpstr, @@ -382,6 +410,8 @@ close(tmpfd); chomp(tmpstr); unlink(conffilename); + log_oper(listdir, OPLOGFNAME, "mlmmj-unsub: %s confirmed" + " unsubscribe from nomail", tmpstr); execlp(mlmmjunsub, mlmmjunsub, "-L", listdir, "-a", tmpstr, @@ -407,6 +437,9 @@ close(tmpfd); chomp(tmpstr); unlink(conffilename); + log_oper(listdir, OPLOGFNAME, "mlmmj-unsub: %s confirmed" + " unsubscribe from regular list", + tmpstr); execlp(mlmmjunsub, mlmmjunsub, "-L", listdir, "-a", tmpstr, @@ -444,6 +477,8 @@ myfree(moderatefilename); exit(EXIT_SUCCESS); /* just exit, no mail to moderate */ } + log_oper(listdir, OPLOGFNAME, "%s moderated %s", + fromemails->emaillist[0], moderatefilename); execlp(mlmmjsend, mlmmjsend, "-L", listdir, "-m", moderatefilename, NULL); @@ -455,9 +490,12 @@ /* listname+help@domain.tld */ case CTRL_HELP: unlink(mailname); - if(strchr(fromemails->emaillist[0], '@')) + if(strchr(fromemails->emaillist[0], '@')) { + log_oper(listdir, OPLOGFNAME, "%s requested help", + fromemails->emaillist[0]); send_help(listdir, fromemails->emaillist[0], mlmmjsend); + } break; /* listname+get-INDEX@domain.tld */ @@ -475,6 +513,8 @@ param); if(stat(archivefilename, &stbuf) < 0) exit(EXIT_SUCCESS); + log_oper(listdir, OPLOGFNAME, "%s got archive/%s", + fromemails->emaillist[0], archivefilename); execlp(mlmmjsend, mlmmjsend, "-T", fromemails->emaillist[0], "-L", listdir,
--- a/src/mlmmj-maintd.c Tue Jan 18 18:52:47 2005 +1100 +++ b/src/mlmmj-maintd.c Tue Jan 18 19:03:47 2005 +1100 @@ -44,8 +44,7 @@ #include "ctrlvalue.h" #include "send_digest.h" #include "mylocking.h" - -static int maintdlogfd = -1; +#include "log_oper.h" static void print_help(const char *prg) { @@ -590,7 +589,7 @@ DIR *bouncedir; char *dirname = concatstr(2, listdir, "/bounce/"); char *probefile, *address, *a, *firstbounce, *bouncedata; - char *logstr, *bouncelifestr; + char *bouncelifestr; struct dirent *dp; struct stat st; pid_t pid, childpid;
--- a/src/mlmmj-process.c Tue Jan 18 18:52:47 2005 +1100 +++ b/src/mlmmj-process.c Tue Jan 18 19:03:47 2005 +1100 @@ -49,7 +49,7 @@ #include "prepstdreply.h" #include "subscriberfuncs.h" #include "memory.h" - +#include "log_oper.h" enum action { ALLOW, @@ -558,6 +558,9 @@ close(rawmailfd); close(donemailfd); unlink(mailfile); + log_oper(listdir, OPLOGFNAME, "mlmmj-recieve: sending" + " mail from %s to owner", + efromemails.emaillist[0]); execlp(mlmmjsend, mlmmjsend, "-l", "4", "-F", efromemails.emaillist[0],
--- a/src/mlmmj-recieve.c Tue Jan 18 18:52:47 2005 +1100 +++ b/src/mlmmj-recieve.c Tue Jan 18 19:03:47 2005 +1100 @@ -37,7 +37,6 @@ #include "strgen.h" #include "log_error.h" #include "memory.h" -#include "log_oper.h" extern char *optarg; @@ -139,8 +138,9 @@ exit(EXIT_FAILURE); } +#if 0 log_oper(listdir, OPLOGFNAME, "mlmmj-recieve got %s", infilename); - +#endif fsync(fd); close(fd);