Change terminology from mailing list to group

This commit is contained in:
Bob Mottram 2015-04-05 13:09:09 +01:00
parent 6543c14bd0
commit 8f5be8cdfe
5 changed files with 18 additions and 19 deletions

View File

@ -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. 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 ** 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 #+BEGIN_SRC bash
ssh username@domainname -p 2222 ssh username@domainname -p 2222
freedombone-addemail -e <email address> -l <mailing list name> freedombone-addemail -e <email address> -g <group name>
exit exit
#+END_SRC #+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 ** 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. It is possible to ignore incoming emails if they are from a particular email address or if the subject line contains particular text.

Binary file not shown.

View File

@ -31,11 +31,11 @@
MYUSERNAME=$USER MYUSERNAME=$USER
EMAILADDRESS= EMAILADDRESS=
MAILINGLIST= GROUP_NAME=
function show_help { function show_help {
echo '' 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 '' echo ''
exit 0 exit 0
} }
@ -56,9 +56,9 @@ case $key in
shift shift
EMAILADDRESS="$1" EMAILADDRESS="$1"
;; ;;
-l|--list) -g|--group)
shift shift
MAILINGLIST="$1" GROUP_NAME="$1"
;; ;;
*) *)
# unknown option # unknown option
@ -67,13 +67,13 @@ esac
shift shift
done done
if ! [[ $MYUSERNAME && $EMAILADDRESS && $MAILINGLIST ]]; then if ! [[ $MYUSERNAME && $EMAILADDRESS && $GROUP_NAME ]]; then
show_help show_help
fi fi
MUTTRC=/home/$MYUSERNAME/.muttrc MUTTRC=/home/$MYUSERNAME/.muttrc
PM=/home/$MYUSERNAME/.procmailrc PM=/home/$MYUSERNAME/.procmailrc
LISTDIR=/home/$MYUSERNAME/Maildir/$MAILINGLIST LISTDIR=/home/$MYUSERNAME/Maildir/$GROUP_NAME
if [ ! -d "$LISTDIR" ]; then if [ ! -d "$LISTDIR" ]; then
mkdir -m 700 $LISTDIR mkdir -m 700 $LISTDIR
@ -82,8 +82,8 @@ if [ ! -d "$LISTDIR" ]; then
mkdir -m 700 $LISTDIR/cur mkdir -m 700 $LISTDIR/cur
fi fi
chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR
if ! grep -q "Email rule for $EMAILADDRESS -> $MAILINGLIST" $PM; then if ! grep -q "Email rule for $EMAILADDRESS -> $GROUP_NAME" $PM; then
echo "# Email rule for $EMAILADDRESS -> $MAILINGLIST" >> $PM echo "# Email rule for $EMAILADDRESS -> $GROUP_NAME" >> $PM
echo ":0" >> $PM echo ":0" >> $PM
echo " * ^From:.*$EMAILADDRESS" >> $PM echo " * ^From:.*$EMAILADDRESS" >> $PM
echo "$LISTDIR/new" >> $PM echo "$LISTDIR/new" >> $PM
@ -100,9 +100,9 @@ if [ ! -d $PROCMAILLOG ]; then
chown -R $MYUSERNAME:$MYUSERNAME $PROCMAILLOG chown -R $MYUSERNAME:$MYUSERNAME $PROCMAILLOG
fi fi
MUTT_MAILBOXES=$(grep "mailboxes =" $MUTTRC) MUTT_MAILBOXES=$(grep "mailboxes =" $MUTTRC)
if [[ $MUTT_MAILBOXES != *$MAILINGLIST* ]]; then if [[ $MUTT_MAILBOXES != *$GROUP_NAME* ]]; then
if ! grep -q "=$MAILINGLIST" $MUTTRC; then if ! grep -q "=$GROUP_NAME" $MUTTRC; then
sed -i "s|$MUTT_MAILBOXES|$MUTT_MAILBOXES =$MAILINGLIST|g" $MUTTRC sed -i "s|$MUTT_MAILBOXES|$MUTT_MAILBOXES =$GROUP_NAME|g" $MUTTRC
chown $MYUSERNAME:$MYUSERNAME $MUTTRC chown $MYUSERNAME:$MYUSERNAME $MUTTRC
fi fi
fi fi

View File

@ -30,7 +30,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
MYUSERNAME=$USER MYUSERNAME=$USER
MAILINGLIST=
function show_help { function show_help {
echo '' echo ''

View File

@ -4,7 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head> <head>
<title></title> <title></title>
<!-- 2015-04-05 Sun 12:59 --> <!-- 2015-04-05 Sun 13:07 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="generator" content="Org-mode" /> <meta name="generator" content="Org-mode" />
<meta name="author" content="Bob Mottram" /> <meta name="author" content="Bob Mottram" />
@ -720,19 +720,19 @@ The subject tag should be the word or phrase which appears within the brackets i
<h3 id="unnumbered-18">Adding email addresses to a group/folder</h3> <h3 id="unnumbered-18">Adding email addresses to a group/folder</h3>
<div class="outline-text-3" id="text-unnumbered-18"> <div class="outline-text-3" id="text-unnumbered-18">
<p> <p>
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.
</p> </p>
<div class="org-src-container"> <div class="org-src-container">
<pre class="src src-bash">ssh username@domainname -p 2222 <pre class="src src-bash">ssh username@domainname -p 2222
freedombone-addemail -e &lt;email address&gt; -l &lt;mailing list name&gt; freedombone-addemail -e &lt;email address&gt; -g &lt;group name&gt;
<span class="org-keyword">exit</span> <span class="org-keyword">exit</span>
</pre> </pre>
</div> </div>
<p> <p>
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.
</p> </p>
</div> </div>
</div> </div>