diff --git a/doc/EN/usage.org b/doc/EN/usage.org index 215bf3f4..8b10abba 100644 --- a/doc/EN/usage.org +++ b/doc/EN/usage.org @@ -239,15 +239,15 @@ exit 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. ** Adding email addresses to a group/folder -Similar to adding mailing list folders you can also add specified email addresses into a folder. +Similar to adding mailing list folders you can also add specified email addresses into a group/folder. #+BEGIN_SRC bash ssh username@domainname -p 2222 -freedombone-addemail -e -l +freedombone-addemail -e -g exit #+END_SRC -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. +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. ** Ignoring incoming emails It is possible to ignore incoming emails if they are from a particular email address or if the subject line contains particular text. diff --git a/man/freedombone-addemail.1.gz b/man/freedombone-addemail.1.gz index 5252fa35..c2cc81cd 100644 Binary files a/man/freedombone-addemail.1.gz and b/man/freedombone-addemail.1.gz differ diff --git a/src/freedombone-addemail b/src/freedombone-addemail index 24a784b3..854aac73 100755 --- a/src/freedombone-addemail +++ b/src/freedombone-addemail @@ -31,11 +31,11 @@ MYUSERNAME=$USER EMAILADDRESS= -MAILINGLIST= +GROUP_NAME= function show_help { echo '' - echo 'freedombone-addemail -u [username] -e [email address] -l [mailing list name]' + echo 'freedombone-addemail -u [username] -e [email address] -g [group name]' echo '' exit 0 } @@ -56,9 +56,9 @@ case $key in shift EMAILADDRESS="$1" ;; - -l|--list) + -g|--group) shift - MAILINGLIST="$1" + GROUP_NAME="$1" ;; *) # unknown option @@ -67,13 +67,13 @@ esac shift done -if ! [[ $MYUSERNAME && $EMAILADDRESS && $MAILINGLIST ]]; then +if ! [[ $MYUSERNAME && $EMAILADDRESS && $GROUP_NAME ]]; then show_help fi MUTTRC=/home/$MYUSERNAME/.muttrc PM=/home/$MYUSERNAME/.procmailrc -LISTDIR=/home/$MYUSERNAME/Maildir/$MAILINGLIST +LISTDIR=/home/$MYUSERNAME/Maildir/$GROUP_NAME if [ ! -d "$LISTDIR" ]; then mkdir -m 700 $LISTDIR @@ -82,8 +82,8 @@ if [ ! -d "$LISTDIR" ]; then mkdir -m 700 $LISTDIR/cur fi chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR -if ! grep -q "Email rule for $EMAILADDRESS -> $MAILINGLIST" $PM; then - echo "# Email rule for $EMAILADDRESS -> $MAILINGLIST" >> $PM +if ! grep -q "Email rule for $EMAILADDRESS -> $GROUP_NAME" $PM; then + echo "# Email rule for $EMAILADDRESS -> $GROUP_NAME" >> $PM echo ":0" >> $PM echo " * ^From:.*$EMAILADDRESS" >> $PM echo "$LISTDIR/new" >> $PM @@ -100,9 +100,9 @@ if [ ! -d $PROCMAILLOG ]; then chown -R $MYUSERNAME:$MYUSERNAME $PROCMAILLOG fi MUTT_MAILBOXES=$(grep "mailboxes =" $MUTTRC) -if [[ $MUTT_MAILBOXES != *$MAILINGLIST* ]]; then - if ! grep -q "=$MAILINGLIST" $MUTTRC; then - sed -i "s|$MUTT_MAILBOXES|$MUTT_MAILBOXES =$MAILINGLIST|g" $MUTTRC +if [[ $MUTT_MAILBOXES != *$GROUP_NAME* ]]; then + if ! grep -q "=$GROUP_NAME" $MUTTRC; then + sed -i "s|$MUTT_MAILBOXES|$MUTT_MAILBOXES =$GROUP_NAME|g" $MUTTRC chown $MYUSERNAME:$MYUSERNAME $MUTTRC fi fi diff --git a/src/freedombone-rmemail b/src/freedombone-rmemail index 81c1ff0b..177fbe25 100755 --- a/src/freedombone-rmemail +++ b/src/freedombone-rmemail @@ -30,7 +30,6 @@ # along with this program. If not, see . MYUSERNAME=$USER -MAILINGLIST= function show_help { echo '' diff --git a/website/EN/usage.html b/website/EN/usage.html index 20d92b74..a9f145b5 100644 --- a/website/EN/usage.html +++ b/website/EN/usage.html @@ -4,7 +4,7 @@ - + @@ -720,19 +720,19 @@ The subject tag should be the word or phrase which appears within the brackets i

Adding email addresses to a group/folder

-Similar to adding mailing list folders you can also add specified email addresses into a folder. +Similar to adding mailing list folders you can also add specified email addresses into a group/folder.

ssh username@domainname -p 2222
-freedombone-addemail -e <email address> -l <mailing list name>
+freedombone-addemail -e <email address> -g <group name>
 exit
 

-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. +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.