report a bug |  advanced search |  statistics |  developer log in/out
Return to Bug #65
Patch mlmmj-make-ml-dol.patch revision 2018-01-16 17:21 UTC by zhb at iredmail dot org
revision 2017-08-27 20:51 UTC by zhb at iredmail dot org
Patch mlmmj-make-ml-do.patch revision 2017-08-27 20:34 UTC by zhb at iredmail dot org
Patch mlmmj-make-ml-d-man.patch revision 2017-08-27 17:30 UTC by zhb at iredmail dot org
Patch mlmmj-make-ml-d.patch revision 2017-08-27 08:49 UTC by zhb at iredmail dot org

Patch mlmmj-make-ml-dol.patch for Generic Bug #65

Patch version 2018-01-16 17:21 UTC

Return to Bug #65 | Download this patch
This patch renders other patches obsolete

Obsolete patches:

Patch Revisions:

Developer: zhb@iredmail.org

diff -Naur mlmmj-1.3.0.orig/man/mlmmj-make-ml.1 mlmmj-1.3.0/man/mlmmj-make-ml.1
--- mlmmj-1.3.0.orig/man/mlmmj-make-ml.1	2018-01-16 19:18:09.000000000 +0800
+++ mlmmj-1.3.0/man/mlmmj-make-ml.1	2018-01-16 19:18:39.000000000 +0800
@@ -9,12 +9,18 @@
 .HP
 \fB\-L\fR: The name of the mailing list
 .HP
+\fB\-d\fR: The domain name part of the mailing list
+.HP
 \fB\-s\fR: Your spool directory (default /var/spool/mlmmj)
 .HP
 \fB\-a\fR: Create the needed entries in your /etc/aliases file
 .HP
 \fB\-c\fR: User to chown the spool directory to (default not to chown at all)
 .HP
+\fB\-o\fR: The email address of the list owner
+.HP
+\fB\-l\fR: The language of list text template files
+.HP
 \fB\-z\fR: Do nothing for now
 .SH DESCRIPTION
 This is an interactive script which creates the mailing list directory and thus
diff -Naur mlmmj-1.3.0.orig/src/mlmmj-make-ml.in mlmmj-1.3.0/src/mlmmj-make-ml.in
--- mlmmj-1.3.0.orig/src/mlmmj-make-ml.in	2018-01-16 19:18:10.000000000 +0800
+++ mlmmj-1.3.0/src/mlmmj-make-ml.in	2018-01-16 19:19:03.000000000 +0800
@@ -12,13 +12,16 @@
              [-h] [-L listname] [-s spooldir] [-a] [-c user] [-z]
  -h: display this help text
  -L: the name of the mailing list
+ -d: the domain name part of the mailing list
  -s: your spool directory (default $DEFAULTDIR)
  -a: create the needed entries in your $ALIASFILE file
  -c: user to chown the spool directory to (default not to chown at all)
+ -o: email address of the list owner (default 'postmaster')
+ -l: the language of list text template files
  -z: do nothing for now
 "
 
-while getopts ":hL:s:azc:" Option
+while getopts ":hL:s:azc:d:o:l:" Option
 do
 case "$Option" in 
 	h )
@@ -32,6 +35,9 @@
 	L )
 	LISTNAME="$OPTARG"
 	;;
+	d )
+	FQDN="$OPTARG"
+	;;
 	s )
 	SPOOLDIR="$OPTARG"
 	;;
@@ -42,6 +48,12 @@
 	DO_CHOWN=1
 	CHOWN="$OPTARG"
 	;;
+	o )
+	OWNER="$OPTARG"
+	;;
+	l )
+	TEXTPATH="$OPTARG"
+	;;
 	* )
 	echo "$0: invalid option"
 	echo "Try $0 -h for more information."
@@ -78,47 +90,54 @@
 
 test -f "$LISTDIR"/index || touch "$LISTDIR"/index
 
-echo -n "The Domain for the List? [] : "
-read FQDN
 if [ -z "$FQDN" ]; then
-	FQDN=`domainname -f`
+    echo -n "The Domain for the List? [] : "
+    read FQDN
+    if [ -z "$FQDN" ]; then
+        FQDN=`domainname -f`
+    fi
 fi
 
-echo -n "The emailaddress of the list owner? [postmaster] : "
-read OWNER
-if [ -z "$OWNER" ]; then
-	OWNER="postmaster"
+if [ -z $OWNER ]; then
+    echo -n "The emailaddress of the list owner? [postmaster] : "
+    read OWNER
+    if [ -z "$OWNER" ]; then
+        OWNER="postmaster"
+    fi
 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
+    cd "@textlibdir@"
+    if [ -z $TEXTPATH ]; then
+        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
+    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"
 
 
Based on the PHP bug tracker.
Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Jan 30 01:27:44 2013 UTC