From: mortenp Date: Mon, 21 Dec 2009 06:32:00 +0000 (+1100) Subject: Fixed bug in mlmmj-maintd which caused loss of archive files in some requeue cases... X-Git-Tag: RELEASE_1_2_17~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95df91b26040c15d3245bd37b5d7bb7bd8732c2b;p=thirdparty%2Fmlmmj.git Fixed bug in mlmmj-maintd which caused loss of archive files in some requeue cases (Robin H. Johnson) --- diff --git a/ChangeLog b/ChangeLog index e3c5c940..a2619875 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,5 @@ + o Fixed bug in mlmmj-maintd which caused loss of archive files in some + requeue cases (Robin H. Johnson) o Added README.postfix (Jeremy Hinegardner, Andreas Schneider) o Added support for digest and nomail to +list (Christoph Wilke) o Caseinsensitive string compare for owner addr when +list is invoked. Spotted diff --git a/src/mlmmj-maintd.c b/src/mlmmj-maintd.c index c2a5d78c..3cc67e1c 100644 --- a/src/mlmmj-maintd.c +++ b/src/mlmmj-maintd.c @@ -373,7 +373,7 @@ int resend_requeue(const char *listdir, const char *mlmmjsend) struct stat st; pid_t childpid, pid; time_t t; - int status, fromrequeuedir = 0; + int status, fromrequeuedir; if(chdir(dirname) < 0) { log_error(LOG_ARGS, "Could not chdir(%s)", dirname); @@ -408,6 +408,10 @@ int resend_requeue(const char *listdir, const char *mlmmjsend) archivefilename = concatstr(3, listdir, "/archive/", dp->d_name); + + /* Explicitly initialize for each mail we examine */ + fromrequeuedir = 0; + if(stat(archivefilename, &st) < 0) { /* Might be it's just not moved to the archive * yet because it's still getting sent, so just