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.
** 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 <email address> -l <mailing list name>
freedombone-addemail -e <email address> -g <group name>
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.

Binary file not shown.

View File

@ -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

View File

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

View File

@ -4,7 +4,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<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 name="generator" content="Org-mode" />
<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>
<div class="outline-text-3" id="text-unnumbered-18">
<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>
<div class="org-src-container">
<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>
</pre>
</div>
<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>
</div>
</div>