From: mmj Date: Sat, 15 Jan 2005 10:53:52 +0000 (+1100) Subject: Removed discardedname var since we don't need it anymore X-Git-Tag: RELEASE_1_2_0~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4ce30cfe7e47ff5edd7a9bc3a54a0dae66640e6;p=thirdparty%2Fmlmmj.git Removed discardedname var since we don't need it anymore --- diff --git a/ChangeLog b/ChangeLog index 39cc2521..6056845d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ + o Add Message-Id: and Date: headers to mail from mlmmj o Make log_oper() varargs capable, thanks Rob Holland 1.1.1-RC1 o Never discard anything from LISTDIR/queue/, let the admin be able to judge diff --git a/VERSION b/VERSION index ddfed28e..08f525b9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1.1-RC1 +1.1.1-RC2 diff --git a/include/mlmmj.h b/include/mlmmj.h index 79050100..615adb32 100644 --- a/include/mlmmj.h +++ b/include/mlmmj.h @@ -54,6 +54,9 @@ #define DIGESTMIMETYPE "digest" /* Which sub-type of multipart to use when * sending digest mails */ #define OPLOGFNAME "mlmmj.operation.log" /* logfile to log operations */ +#define OPLOGSIZE 524288 + +#define MAXVERPRECIPS 100 struct strlist { int count; diff --git a/src/log_oper.c b/src/log_oper.c index 6953f518..d91bca36 100644 --- a/src/log_oper.c +++ b/src/log_oper.c @@ -54,14 +54,9 @@ int log_oper(const char *prefix, const char *basename, const char *fmt, ...) log_error(LOG_ARGS, "Could not stat logfile %s", logfilename); myfree(logfilename); return -1; - } else if((st.st_mode & S_IFMT) == S_IFLNK) { - log_error(LOG_ARGS, "%s is a symbolic link, not opening", - logfilename); - myfree(logfilename); - return -1; } - if(st.st_size > (off_t)524288) { + if(st.st_size > (off_t)OPLOGSIZE) { tmp = concatstr(2, logfilename, ".rotated"); if(rename(logfilename, tmp) < 0) { log_error(LOG_ARGS, "Could not rename %s,%s", diff --git a/src/mlmmj-maintd.c b/src/mlmmj-maintd.c index cab2f0a0..f54f28e9 100644 --- a/src/mlmmj-maintd.c +++ b/src/mlmmj-maintd.c @@ -208,8 +208,7 @@ int resend_queue(const char *listdir, const char *mlmmjsend) DIR *queuedir; struct dirent *dp; char *mailname, *fromname, *toname, *reptoname, *from, *to, *repto; - char *discardedname = NULL, *ch; - char *dirname = concatstr(2, listdir, "/queue/"); + char *ch, *dirname = concatstr(2, listdir, "/queue/"); pid_t childpid, pid; struct stat st; int fromfd, tofd, fd, discarded = 0, status; diff --git a/src/mlmmj-recieve.c b/src/mlmmj-recieve.c index 27286608..2d9446cc 100644 --- a/src/mlmmj-recieve.c +++ b/src/mlmmj-recieve.c @@ -56,7 +56,7 @@ int main(int argc, char **argv) { char *infilename = NULL, *listdir = NULL; char *randomstr = random_str(); - char *mlmmjprocess, *bindir, *logstr; + char *mlmmjprocess, *bindir; int fd, opt, noprocess = 0, nofork = 0; struct stat st; uid_t uid; @@ -139,6 +139,8 @@ int main(int argc, char **argv) exit(EXIT_FAILURE); } + log_oper(listdir, OPLOGFNAME, "mlmmj-recieve got %s", infilename); + fsync(fd); close(fd);