瀏覽代碼

Change terminology from mailing list to group

Bob Mottram 10 年之前
父節點
當前提交
8f5be8cdfe
共有 5 個文件被更改,包括 18 次插入19 次删除
  1. 3
    3
      doc/EN/usage.org
  2. 二進制
      man/freedombone-addemail.1.gz
  3. 11
    11
      src/freedombone-addemail
  4. 0
    1
      src/freedombone-rmemail
  5. 4
    4
      website/EN/usage.html

+ 3
- 3
doc/EN/usage.org 查看文件

239
 
239
 
240
 The subject tag should be the word or phrase which appears within the brackets in the subject line of emails from the mailing list. The mailing list name should be something short so that it is readable within the left side column of the mutt email client, and contain no spaces.
240
 The subject tag should be the word or phrase which appears within the brackets in the subject line of emails from the mailing list. The mailing list name should be something short so that it is readable within the left side column of the mutt email client, and contain no spaces.
241
 ** Adding email addresses to a group/folder
241
 ** Adding email addresses to a group/folder
242
-Similar to adding mailing list folders you can also add specified email addresses into a folder.
242
+Similar to adding mailing list folders you can also add specified email addresses into a group/folder.
243
 
243
 
244
 #+BEGIN_SRC bash
244
 #+BEGIN_SRC bash
245
 ssh username@domainname -p 2222
245
 ssh username@domainname -p 2222
246
-freedombone-addemail -e <email address> -l <mailing list name>
246
+freedombone-addemail -e <email address> -g <group name>
247
 exit
247
 exit
248
 #+END_SRC
248
 #+END_SRC
249
 
249
 
250
-The mailing list name should be something short so that it is readable within the left side column of the mutt email client, and not contain any spaces.
250
+The group name should be something short so that it is readable within the left side column of the mutt email client, and not contain any spaces.
251
 
251
 
252
 ** Ignoring incoming emails
252
 ** Ignoring incoming emails
253
 It is possible to ignore incoming emails if they are from a particular email address or if the subject line contains particular text.
253
 It is possible to ignore incoming emails if they are from a particular email address or if the subject line contains particular text.

二進制
man/freedombone-addemail.1.gz 查看文件


+ 11
- 11
src/freedombone-addemail 查看文件

31
 
31
 
32
 MYUSERNAME=$USER
32
 MYUSERNAME=$USER
33
 EMAILADDRESS=
33
 EMAILADDRESS=
34
-MAILINGLIST=
34
+GROUP_NAME=
35
 
35
 
36
 function show_help {
36
 function show_help {
37
     echo ''
37
     echo ''
38
-    echo 'freedombone-addemail -u [username] -e [email address] -l [mailing list name]'
38
+    echo 'freedombone-addemail -u [username] -e [email address] -g [group name]'
39
     echo ''
39
     echo ''
40
     exit 0
40
     exit 0
41
 }
41
 }
56
     shift
56
     shift
57
     EMAILADDRESS="$1"
57
     EMAILADDRESS="$1"
58
     ;;
58
     ;;
59
-    -l|--list)
59
+    -g|--group)
60
     shift
60
     shift
61
-    MAILINGLIST="$1"
61
+    GROUP_NAME="$1"
62
     ;;
62
     ;;
63
     *)
63
     *)
64
     # unknown option
64
     # unknown option
67
 shift
67
 shift
68
 done
68
 done
69
 
69
 
70
-if ! [[ $MYUSERNAME && $EMAILADDRESS && $MAILINGLIST ]]; then
70
+if ! [[ $MYUSERNAME && $EMAILADDRESS && $GROUP_NAME ]]; then
71
     show_help
71
     show_help
72
 fi
72
 fi
73
 
73
 
74
 MUTTRC=/home/$MYUSERNAME/.muttrc
74
 MUTTRC=/home/$MYUSERNAME/.muttrc
75
 PM=/home/$MYUSERNAME/.procmailrc
75
 PM=/home/$MYUSERNAME/.procmailrc
76
-LISTDIR=/home/$MYUSERNAME/Maildir/$MAILINGLIST
76
+LISTDIR=/home/$MYUSERNAME/Maildir/$GROUP_NAME
77
 
77
 
78
 if [ ! -d "$LISTDIR" ]; then
78
 if [ ! -d "$LISTDIR" ]; then
79
     mkdir -m 700 $LISTDIR
79
     mkdir -m 700 $LISTDIR
82
     mkdir -m 700 $LISTDIR/cur
82
     mkdir -m 700 $LISTDIR/cur
83
 fi
83
 fi
84
 chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR
84
 chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR
85
-if ! grep -q "Email rule for $EMAILADDRESS -> $MAILINGLIST" $PM; then
86
-    echo "# Email rule for $EMAILADDRESS -> $MAILINGLIST" >> $PM
85
+if ! grep -q "Email rule for $EMAILADDRESS -> $GROUP_NAME" $PM; then
86
+    echo "# Email rule for $EMAILADDRESS -> $GROUP_NAME" >> $PM
87
     echo ":0" >> $PM
87
     echo ":0" >> $PM
88
     echo "  * ^From:.*$EMAILADDRESS" >> $PM
88
     echo "  * ^From:.*$EMAILADDRESS" >> $PM
89
     echo "$LISTDIR/new" >> $PM
89
     echo "$LISTDIR/new" >> $PM
100
   chown -R $MYUSERNAME:$MYUSERNAME $PROCMAILLOG
100
   chown -R $MYUSERNAME:$MYUSERNAME $PROCMAILLOG
101
 fi
101
 fi
102
 MUTT_MAILBOXES=$(grep "mailboxes =" $MUTTRC)
102
 MUTT_MAILBOXES=$(grep "mailboxes =" $MUTTRC)
103
-if [[ $MUTT_MAILBOXES != *$MAILINGLIST* ]]; then
104
-  if ! grep -q "=$MAILINGLIST" $MUTTRC; then
105
-    sed -i "s|$MUTT_MAILBOXES|$MUTT_MAILBOXES =$MAILINGLIST|g" $MUTTRC
103
+if [[ $MUTT_MAILBOXES != *$GROUP_NAME* ]]; then
104
+  if ! grep -q "=$GROUP_NAME" $MUTTRC; then
105
+    sed -i "s|$MUTT_MAILBOXES|$MUTT_MAILBOXES =$GROUP_NAME|g" $MUTTRC
106
     chown $MYUSERNAME:$MYUSERNAME $MUTTRC
106
     chown $MYUSERNAME:$MYUSERNAME $MUTTRC
107
   fi
107
   fi
108
 fi
108
 fi

+ 0
- 1
src/freedombone-rmemail 查看文件

30
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
30
 # along with this program. If not, see <http://www.gnu.org/licenses/>.
31
 
31
 
32
 MYUSERNAME=$USER
32
 MYUSERNAME=$USER
33
-MAILINGLIST=
34
 
33
 
35
 function show_help {
34
 function show_help {
36
     echo ''
35
     echo ''

+ 4
- 4
website/EN/usage.html 查看文件

4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
4
 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
5
 <head>
5
 <head>
6
 <title></title>
6
 <title></title>
7
-<!-- 2015-04-05 Sun 12:59 -->
7
+<!-- 2015-04-05 Sun 13:07 -->
8
 <meta  http-equiv="Content-Type" content="text/html;charset=utf-8" />
8
 <meta  http-equiv="Content-Type" content="text/html;charset=utf-8" />
9
 <meta  name="generator" content="Org-mode" />
9
 <meta  name="generator" content="Org-mode" />
10
 <meta  name="author" content="Bob Mottram" />
10
 <meta  name="author" content="Bob Mottram" />
720
 <h3 id="unnumbered-18">Adding email addresses to a group/folder</h3>
720
 <h3 id="unnumbered-18">Adding email addresses to a group/folder</h3>
721
 <div class="outline-text-3" id="text-unnumbered-18">
721
 <div class="outline-text-3" id="text-unnumbered-18">
722
 <p>
722
 <p>
723
-Similar to adding mailing list folders you can also add specified email addresses into a folder.
723
+Similar to adding mailing list folders you can also add specified email addresses into a group/folder.
724
 </p>
724
 </p>
725
 
725
 
726
 <div class="org-src-container">
726
 <div class="org-src-container">
727
 
727
 
728
 <pre class="src src-bash">ssh username@domainname -p 2222
728
 <pre class="src src-bash">ssh username@domainname -p 2222
729
-freedombone-addemail -e &lt;email address&gt; -l &lt;mailing list name&gt;
729
+freedombone-addemail -e &lt;email address&gt; -g &lt;group name&gt;
730
 <span class="org-keyword">exit</span>
730
 <span class="org-keyword">exit</span>
731
 </pre>
731
 </pre>
732
 </div>
732
 </div>
733
 
733
 
734
 <p>
734
 <p>
735
-The mailing list name should be something short so that it is readable within the left side column of the mutt email client, and not contain any spaces.
735
+The group name should be something short so that it is readable within the left side column of the mutt email client, and not contain any spaces.
736
 </p>
736
 </p>
737
 </div>
737
 </div>
738
 </div>
738
 </div>