From: mmj Date: Sun, 6 Jun 2004 18:29:13 +0000 (+1000) Subject: getlistaddr was tought that listaddress moved to control/listaddress X-Git-Tag: RELEASE_1_0_0~146 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=074eb4373cc5b9c2fe61cc9a07db91f8b407d87f;p=thirdparty%2Fmlmmj.git getlistaddr was tought that listaddress moved to control/listaddress mlmmj-maintd is no longer cleaning moderation/queue, now that dir is gone mlmmj-make-ml.sh now doesn't make moderation/queue mlmmj-process now uses queue for outgoing moderator mail, not modetaion/queue --- diff --git a/src/getlistaddr.c b/src/getlistaddr.c index 52a80c70..16e2edf6 100644 --- a/src/getlistaddr.c +++ b/src/getlistaddr.c @@ -23,7 +23,7 @@ char *getlistaddr(const char *listdir) char *tmpstr; int listnamefd; - tmpstr = concatstr(2, listdir, "/listaddress");; + tmpstr = concatstr(2, listdir, "/control/listaddress");; if((listnamefd = open(tmpstr, O_RDONLY)) < 0) { log_error(LOG_ARGS, "Could not open '%s'", tmpstr); exit(EXIT_FAILURE); diff --git a/src/mlmmj-maintd.c b/src/mlmmj-maintd.c index 12534450..6d513e86 100644 --- a/src/mlmmj-maintd.c +++ b/src/mlmmj-maintd.c @@ -74,11 +74,6 @@ int clean_moderation(const char *listdir) free(moddirname); - moddirname = concatstr(2, listdir, "/moderation/queue"); - delolder(moddirname, MODREQLIFE); - - free(moddirname); - return 0; } diff --git a/src/mlmmj-make-ml.sh b/src/mlmmj-make-ml.sh index 773f092e..c2d1d4eb 100755 --- a/src/mlmmj-make-ml.sh +++ b/src/mlmmj-make-ml.sh @@ -61,7 +61,7 @@ LISTDIR="$SPOOLDIR/$LISTNAME" mkdir -p $LISTDIR for DIR in incoming queue queue/discarded archive text subconf unsubconf \ - bounce control moderation moderation/queue subscribers.d requeue + bounce control moderation subscribers.d requeue do mkdir "$LISTDIR"/"$DIR" done @@ -85,7 +85,7 @@ else fi LISTADDRESS="$LISTNAME@$FQDN" -echo "$LISTADDRESS" > "$LISTDIR"/"listaddress" +echo "$LISTADDRESS" > "$LISTDIR"/control/"listaddress" MLMMJRECIEVE=`which mlmmj-recieve 2>/dev/null` if [ -z "$MLMMJRECIEVE" ]; then @@ -111,11 +111,13 @@ if [ -n "$A_CREATE" ]; then echo "Options was: y, Y, n or N" esac else + echo echo "Don't forget to add this to /etc/aliases:" echo "$ALIAS" fi -echo " ** DON'T FORGET ** +echo +echo " ** FINAL NOTES ** 1) The mailinglist directory have to be owned by the user running the mailserver (i.e. starting the binaries to work the list) 2) To run newaliases" diff --git a/src/mlmmj-process.c b/src/mlmmj-process.c index c7c794e8..a4bcfe90 100644 --- a/src/mlmmj-process.c +++ b/src/mlmmj-process.c @@ -51,7 +51,7 @@ void newmoderated(const char *listdir, const char *mailfilename, exit(EXIT_FAILURE); } free(moderatorfilename); - queuefilename = concatstr(3, listdir, "/moderation/queue/", randomstr); + queuefilename = concatstr(3, listdir, "/queue/", randomstr); if((queuefd = open(queuefilename, O_WRONLY|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR)) < 0) { @@ -251,7 +251,7 @@ int main(int argc, char **argv) if(do_all_the_voodo_here(rawmailfd, donemailfd, hdrfd, footfd, badheaders, readhdrs, subjectprefix) < 0) { - log_error(LOG_ARGS, "Error in do_all_the_voodo_here."); + log_error(LOG_ARGS, "Error in do_all_the_voodo_here"); exit(EXIT_FAILURE); } @@ -311,8 +311,6 @@ int main(int argc, char **argv) if(moderated) { mqueuename = concatstr(3, listdir, "/moderation/", randomstr); - printf("Going into moderatemode, mqueuename = [%s]\n", - mqueuename); free(randomstr); if(rename(donemailname, mqueuename) < 0) { log_error(LOG_ARGS, "could not rename(%s,%s)",