# HG changeset patch # User Ben Schmidt # Date 1286104353 -39600 # Node ID fdc57c9e5f5685b9914301433c736d235427ab53 # Parent dfc9ab125fd47ae12896f95d591e63cfe03bdf37 Remove .sh from mlmmj-make-ml.sh; symlink original name diff -r dfc9ab125fd4 -r fdc57c9e5f56 .hgignore --- a/.hgignore Sun Oct 03 21:40:42 2010 +1100 +++ b/.hgignore Sun Oct 03 22:12:33 2010 +1100 @@ -18,7 +18,7 @@ ^config.h$ ^stamp-h1$ .*\.Po$ -^src/mlmmj-make-ml.sh$ +^src/mlmmj-make-ml$ # Files generated by make .*\.o$ diff -r dfc9ab125fd4 -r fdc57c9e5f56 ChangeLog --- a/ChangeLog Sun Oct 03 21:40:42 2010 +1100 +++ b/ChangeLog Sun Oct 03 22:12:33 2010 +1100 @@ -1,3 +1,4 @@ + o Remove .sh from mlmmj-make-ml.sh; symlink original name o Correct spelling of 'receive' and 'voodoo' throughout the code and documentation, making mlmmj-recieve a symlink to mlmmj-receive (Chris Webb) o Richer MIME list texts with inline messages (English only so far) diff -r dfc9ab125fd4 -r fdc57c9e5f56 Makefile.am --- a/Makefile.am Sun Oct 03 21:40:42 2010 +1100 +++ b/Makefile.am Sun Oct 03 22:12:33 2010 +1100 @@ -10,7 +10,7 @@ dist-hook: rm -rf `find $(distdir)/ -name CVS` -man1_MANS = man/mlmmj-bounce.1 man/mlmmj-make-ml.sh.1 man/mlmmj-receive.1 \ +man1_MANS = man/mlmmj-bounce.1 man/mlmmj-make-ml.1 man/mlmmj-receive.1 \ man/mlmmj-sub.1 man/mlmmj-maintd.1 man/mlmmj-process.1 \ man/mlmmj-send.1 man/mlmmj-unsub.1 man/mlmmj-list.1 diff -r dfc9ab125fd4 -r fdc57c9e5f56 README --- a/README Sun Oct 03 21:40:42 2010 +1100 +++ b/README Sun Oct 03 22:12:33 2010 +1100 @@ -53,7 +53,7 @@ The mmj TUNABLE "delimiter" configures this on a per list basis - 2) Create the mailinglist. There's a script, mlmmj-make-ml.sh, that will make + 2) Create the mailinglist. There's a script, mlmmj-make-ml, that will make a mailinglist for mlmmj. It is highly recommended to use this script to make the lists! What is does is described here: @@ -81,7 +81,7 @@ files as nobody:nogroup or nobody:nobody 3) Make the changes to your mailserver aliases that came as output from - mlmmj-make-ml.sh. Following the example above they will look like this: + mlmmj-make-ml. Following the example above they will look like this: mlmmj-test: "|/usr/bin/mlmmj-receive -L /var/spool/mlmmj/mlmmj-test" diff -r dfc9ab125fd4 -r fdc57c9e5f56 README.listtexts --- a/README.listtexts Sun Oct 03 21:40:42 2010 +1100 +++ b/README.listtexts Sun Oct 03 22:12:33 2010 +1100 @@ -6,7 +6,7 @@ List texts are stored in listdir/text. They specify the content of various automatic emails that Mlmmj sends. They are provided in a number of different languages. The language to use for a list is chosen when you run the -mlmmj-make-ml.sh script and the appropriate files are copied into your +mlmmj-make-ml script and the appropriate files are copied into your listdir/text directory. This file documents diff -r dfc9ab125fd4 -r fdc57c9e5f56 README.postfix --- a/README.postfix Sun Oct 03 21:40:42 2010 +1100 +++ b/README.postfix Sun Oct 03 22:12:33 2010 +1100 @@ -39,7 +39,7 @@ everywhere in this file replace /var/spool/mlmmj with your spool directory. - Create a mailing list using mlmmj-make-ml.sh. Make sure to use the + Create a mailing list using mlmmj-make-ml. Make sure to use the -s flag to set the spool directory if it isn't /var/spool/mlmmj POSTFIX SETUP diff -r dfc9ab125fd4 -r fdc57c9e5f56 README.qmail --- a/README.qmail Sun Oct 03 21:40:42 2010 +1100 +++ b/README.qmail Sun Oct 03 22:12:33 2010 +1100 @@ -20,7 +20,7 @@ Configuration: - the first thing you've to do is to create the list, using the - mlmmj-make-ml.sh script (follow the classic procedure to do this step) + mlmmj-make-ml script (follow the classic procedure to do this step) - enter the control directory for the list (${LISTDIR}/control/), and execute the following command: # cd ${LISTDIR}/control/; echo '-' > delimiter @@ -42,7 +42,7 @@ - Configuring mlmmj to handle ml@programmazione.it mailing list using qmail as MTA and vpopmail for virtual domain support: -# mlmmj-make-ml.sh -c vpopmail:vchkpw -L ml +# mlmmj-make-ml -c vpopmail:vchkpw -L ml Creating Directorys below /var/spool/mlmmj. Use '-s spooldir' to change The Domain for the List? [] : programmazione.it The emailaddress of the list owner? [postmaster] : postmaster@programmazione.it diff -r dfc9ab125fd4 -r fdc57c9e5f56 configure.ac --- a/configure.ac Sun Oct 03 21:40:42 2010 +1100 +++ b/configure.ac Sun Oct 03 22:12:33 2010 +1100 @@ -45,7 +45,7 @@ AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([src/Makefile]) -AC_CONFIG_FILES([src/mlmmj-make-ml.sh]) +AC_CONFIG_FILES([src/mlmmj-make-ml]) AC_CONFIG_FILES([listtexts/Makefile]) AC_CONFIG_FILES([contrib/Makefile]) AC_CONFIG_FILES([contrib/receivestrip/Makefile]) diff -r dfc9ab125fd4 -r fdc57c9e5f56 man/mlmmj-make-ml.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/man/mlmmj-make-ml.1 Sun Oct 03 22:12:33 2010 +1100 @@ -0,0 +1,27 @@ +.TH mlmmj-make-ml "1" "September 2004" mlmmj-make-ml +.SH NAME +mlmmj-make-ml \- create a mailing list for mlmmj +.SH SYNOPSIS +.B mlmmj-make-ml +\fI[OPTIONS] +.HP +\fB\-h\fR: Display help +.HP +\fB\-L\fR: The name of the mailing list +.HP +\fB\-s\fR: The spool directory, if different from /var/spool/mlmmj +.HP +\fB\-a\fR: Create the needed entries in /etc/aliases +.HP +\fB\-z\fR: Do nothing for now. +.SH DESCRIPTION +This is an interactive script which creates the mailing list directory and thus +the list itself for being run by mlmmj. +.SH BUGS +It's not possible to create a mailinglist entirely on the command line. +.SH AUTHORS +This manual page was written by the following persons: +.HP +Søren Boll Overgaard (based on html2man output) +.HP +Mads Martin Jørgensen diff -r dfc9ab125fd4 -r fdc57c9e5f56 man/mlmmj-make-ml.sh.1 --- a/man/mlmmj-make-ml.sh.1 Sun Oct 03 21:40:42 2010 +1100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -.TH mlmmj-make-ml "1" "September 2004" mlmmj-make-ml -.SH NAME -mlmmj-make-ml \- create a mailing list for mlmmj -.SH SYNOPSIS -.B mlmmj-make-ml -\fI[OPTIONS] -.HP -\fB\-h\fR: Display help -.HP -\fB\-L\fR: The name of the mailing list -.HP -\fB\-s\fR: The spool directory, if different from /var/spool/mlmmj -.HP -\fB\-a\fR: Create the needed entries in /etc/aliases -.HP -\fB\-z\fR: Do nothing for now. -.SH DESCRIPTION -This is an interactive script which creates the mailing list directory and thus -the list itself for being run by mlmmj. -.SH BUGS -It's not possible to create a mailinglist entirely on the command line. -.SH AUTHORS -This manual page was written by the following persons: -.HP -Søren Boll Overgaard (based on html2man output) -.HP -Mads Martin Jørgensen diff -r dfc9ab125fd4 -r fdc57c9e5f56 src/Makefile.am --- a/src/Makefile.am Sun Oct 03 21:40:42 2010 +1100 +++ b/src/Makefile.am Sun Oct 03 22:12:33 2010 +1100 @@ -8,9 +8,9 @@ bin_PROGRAMS = mlmmj-send mlmmj-receive mlmmj-process mlmmj-sub \ mlmmj-unsub mlmmj-bounce mlmmj-maintd mlmmj-list -bin_SCRIPTS = mlmmj-make-ml.sh +bin_SCRIPTS = mlmmj-make-ml -EXTRA_DIST = mlmmj-make-ml.sh +EXTRA_DIST = mlmmj-make-ml mlmmj_send_SOURCES = mlmmj-send.c writen.c mail-functions.c itoa.c chomp.c \ incindexfile.c checkwait_smtpreply.c getlistaddr.c \ @@ -62,3 +62,4 @@ install-exec-hook: ln -f -s mlmmj-receive $(DESTDIR)$(bindir)/mlmmj-recieve + ln -f -s mlmmj-make-ml $(DESTDIR)$(bindir)/mlmmj-make-ml.sh diff -r dfc9ab125fd4 -r fdc57c9e5f56 src/mlmmj-make-ml.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/mlmmj-make-ml.in Sun Oct 03 22:12:33 2010 +1100 @@ -0,0 +1,184 @@ +#!/bin/sh +# +# mlmmj-make-ml - henne@hennevogel.de +# + +VERSION="0.1" +DEFAULTDIR="/var/spool/mlmmj" +ALIASFILE=/etc/aliases + +USAGE="mlmmj-make-ml "$VERSION" +"$0" [OPTIONS] + +-h display this help text +-L the name of the mailinglist +-s your spool directory if not "$DEFAULTDIR" +-a create the needed entrys in your $ALIASFILE file +-z nuffn for now +-c chown the spool dir" + +while getopts ":hL:s:azc:" Option +do +case "$Option" in + h ) + echo -e "$USAGE" + exit 0 + ;; + z ) + echo -n "nothing" + exit 0 + ;; + L ) + LISTNAME="$OPTARG" + ;; + s ) + SPOOLDIR="$OPTARG" + ;; + a ) + A_CREATE="YES" + ;; + c ) + DO_CHOWN=1 + CHOWN="$OPTARG" + ;; + * ) + echo -e "$0: invalid option\nTry $0 -h for more information." + exit 1 +esac +done +SHIFTVAL=$((OPTIND-1)) +shift $SHIFTVAL + +if [ -z "$SPOOLDIR" ]; then + SPOOLDIR="$DEFAULTDIR" +fi + +echo "Creating Directorys below $SPOOLDIR. Use '-s spooldir' to change" + +if [ -z "$LISTNAME" ]; then + echo -n "What should the name of the Mailinglist be? [mlmmj-test] : " + read LISTNAME + if [ -z "$LISTNAME" ]; then + LISTNAME="mlmmj-test" + fi +fi + +LISTDIR="$SPOOLDIR/$LISTNAME" + +mkdir -p $LISTDIR + +for DIR in incoming queue queue/discarded archive text subconf unsubconf \ + bounce control moderation subscribers.d digesters.d requeue \ + nomailsubs.d +do + mkdir "$LISTDIR"/"$DIR" +done + +test -f "$LISTDIR"/index || touch "$LISTDIR"/index + +echo -n "The Domain for the List? [] : " +read FQDN +if [ -z "$FQDN" ]; then + FQDN=`domainname -f` +fi + +echo -n "The emailaddress of the list owner? [postmaster] : " +read OWNER +if [ -z "$OWNER" ]; then + OWNER="postmaster" +fi +echo "$OWNER" > "$LISTDIR"/"control/owner" + +( + cd "@textlibdir@" + echo + echo "For the list texts you can choose between the following languages or" + echo "give a absolute path to a directory containing the texts." + echo + echo "Available languages:" + ls + + TEXTPATHDEF=en + echo -n "The path to texts for the list? [$TEXTPATHDEF] : " + read TEXTPATHIN + if [ -z "$TEXTPATHIN" ] ; then + TEXTPATH="$TEXTPATHDEF" + else + TEXTPATH="$TEXTPATHIN" + fi + if [ ! -d "$TEXTPATH" ]; then + echo + echo "**NOTE** Could not copy the texts for the list" + echo "Please manually copy the files from the listtexts/ directory" + echo "in the source distribution of mlmmj." + sleep 2 + else + cp "$TEXTPATH"/* "$LISTDIR"/"text" + fi +) + +LISTADDRESS="$LISTNAME@$FQDN" +echo "$LISTADDRESS" > "$LISTDIR"/control/"listaddress" + +MLMMJRECEIVE=`which mlmmj-receive 2>/dev/null` +if [ -z "$MLMMJRECEIVE" ]; then + MLMMJRECEIVE="/path/to/mlmmj-receive" +fi + +MLMMJMAINTD=`which mlmmj-maintd 2>/dev/null` +if [ -z "$MLMMJMAINTD" ]; then + MLMMJMAINTD="/path/to/mlmmj-maintd" +fi + +ALIAS="$LISTNAME: \"|$MLMMJRECEIVE -L $SPOOLDIR/$LISTNAME/\"" +CRONENTRY="0 */2 * * * \"$MLMMJMAINTD -F -L $SPOOLDIR/$LISTNAME/\"" + +if [ -n "$A_CREATE" ]; then + echo "I want to add the following to your $ALIASFILE file:" + echo "$ALIAS" + + echo -n "is this ok? [y/N] : " + read OKIDOKI + case $OKIDOKI in + y|Y) + echo "$ALIAS" >> $ALIASFILE + ;; + n|N) + exit 0 + ;; + *) + echo "Options was: y, Y, n or N" + esac +else + echo + echo "Don't forget to add this to $ALIASFILE:" + echo "$ALIAS" +fi + +if [ "$DO_CHOWN" ] ; then + echo + echo -n "chown -R $CHOWN $SPOOLDIR/$LISTNAME? [y/n]: " + read OKIDOKI + case $OKIDOKI in + y|Y) + chown -R $CHOWN $SPOOLDIR/$LISTNAME + ;; + n|N) + exit 0 + ;; + *) + echo "option is: y, Y, n, N" + ;; + esac +fi + +echo +echo "If you're not starting mlmmj-maintd in daemon mode," +echo "don't forget to add this to your crontab:" +echo "$CRONENTRY" + +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) Run newaliases" diff -r dfc9ab125fd4 -r fdc57c9e5f56 src/mlmmj-make-ml.sh.in --- a/src/mlmmj-make-ml.sh.in Sun Oct 03 21:40:42 2010 +1100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,184 +0,0 @@ -#!/bin/sh -# -# mlmmj-make-ml.sh - henne@hennevogel.de -# - -VERSION="0.1" -DEFAULTDIR="/var/spool/mlmmj" -ALIASFILE=/etc/aliases - -USAGE="mlmmj-make-ml "$VERSION" -"$0" [OPTIONS] - --h display this help text --L the name of the mailinglist --s your spool directory if not "$DEFAULTDIR" --a create the needed entrys in your $ALIASFILE file --z nuffn for now --c chown the spool dir" - -while getopts ":hL:s:azc:" Option -do -case "$Option" in - h ) - echo -e "$USAGE" - exit 0 - ;; - z ) - echo -n "nothing" - exit 0 - ;; - L ) - LISTNAME="$OPTARG" - ;; - s ) - SPOOLDIR="$OPTARG" - ;; - a ) - A_CREATE="YES" - ;; - c ) - DO_CHOWN=1 - CHOWN="$OPTARG" - ;; - * ) - echo -e "$0: invalid option\nTry $0 -h for more information." - exit 1 -esac -done -SHIFTVAL=$((OPTIND-1)) -shift $SHIFTVAL - -if [ -z "$SPOOLDIR" ]; then - SPOOLDIR="$DEFAULTDIR" -fi - -echo "Creating Directorys below $SPOOLDIR. Use '-s spooldir' to change" - -if [ -z "$LISTNAME" ]; then - echo -n "What should the name of the Mailinglist be? [mlmmj-test] : " - read LISTNAME - if [ -z "$LISTNAME" ]; then - LISTNAME="mlmmj-test" - fi -fi - -LISTDIR="$SPOOLDIR/$LISTNAME" - -mkdir -p $LISTDIR - -for DIR in incoming queue queue/discarded archive text subconf unsubconf \ - bounce control moderation subscribers.d digesters.d requeue \ - nomailsubs.d -do - mkdir "$LISTDIR"/"$DIR" -done - -test -f "$LISTDIR"/index || touch "$LISTDIR"/index - -echo -n "The Domain for the List? [] : " -read FQDN -if [ -z "$FQDN" ]; then - FQDN=`domainname -f` -fi - -echo -n "The emailaddress of the list owner? [postmaster] : " -read OWNER -if [ -z "$OWNER" ]; then - OWNER="postmaster" -fi -echo "$OWNER" > "$LISTDIR"/"control/owner" - -( - cd "@textlibdir@" - echo - echo "For the list texts you can choose between the following languages or" - echo "give a absolute path to a directory containing the texts." - echo - echo "Available languages:" - ls - - TEXTPATHDEF=en - echo -n "The path to texts for the list? [$TEXTPATHDEF] : " - read TEXTPATHIN - if [ -z "$TEXTPATHIN" ] ; then - TEXTPATH="$TEXTPATHDEF" - else - TEXTPATH="$TEXTPATHIN" - fi - if [ ! -d "$TEXTPATH" ]; then - echo - echo "**NOTE** Could not copy the texts for the list" - echo "Please manually copy the files from the listtexts/ directory" - echo "in the source distribution of mlmmj." - sleep 2 - else - cp "$TEXTPATH"/* "$LISTDIR"/"text" - fi -) - -LISTADDRESS="$LISTNAME@$FQDN" -echo "$LISTADDRESS" > "$LISTDIR"/control/"listaddress" - -MLMMJRECEIVE=`which mlmmj-receive 2>/dev/null` -if [ -z "$MLMMJRECEIVE" ]; then - MLMMJRECEIVE="/path/to/mlmmj-receive" -fi - -MLMMJMAINTD=`which mlmmj-maintd 2>/dev/null` -if [ -z "$MLMMJMAINTD" ]; then - MLMMJMAINTD="/path/to/mlmmj-maintd" -fi - -ALIAS="$LISTNAME: \"|$MLMMJRECEIVE -L $SPOOLDIR/$LISTNAME/\"" -CRONENTRY="0 */2 * * * \"$MLMMJMAINTD -F -L $SPOOLDIR/$LISTNAME/\"" - -if [ -n "$A_CREATE" ]; then - echo "I want to add the following to your $ALIASFILE file:" - echo "$ALIAS" - - echo -n "is this ok? [y/N] : " - read OKIDOKI - case $OKIDOKI in - y|Y) - echo "$ALIAS" >> $ALIASFILE - ;; - n|N) - exit 0 - ;; - *) - echo "Options was: y, Y, n or N" - esac -else - echo - echo "Don't forget to add this to $ALIASFILE:" - echo "$ALIAS" -fi - -if [ "$DO_CHOWN" ] ; then - echo - echo -n "chown -R $CHOWN $SPOOLDIR/$LISTNAME? [y/n]: " - read OKIDOKI - case $OKIDOKI in - y|Y) - chown -R $CHOWN $SPOOLDIR/$LISTNAME - ;; - n|N) - exit 0 - ;; - *) - echo "option is: y, Y, n, N" - ;; - esac -fi - -echo -echo "If you're not starting mlmmj-maintd in daemon mode," -echo "don't forget to add this to your crontab:" -echo "$CRONENTRY" - -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) Run newaliases"