Difference between revisions of "Simple Email Lists"

From GlueXWiki
Jump to: navigation, search
(modify to describe the git-ified version)
Line 1: Line 1:
We have several "simple" email lists for notification-type messages of interest to a limited audience. It is intended to be used by automated tasks. The idea is to keep automatically generated notifications off the collboration-wide official mailing lists. Interested parties can subscribe and unsubscribe themselves and others, you need only have privilege to check out and check in to the Hall D Subversion repository.
+
We have several "simple" email lists for notification-type messages of interest to a limited audience, usually the results of automated tasks. The idea is to keep these notifications off the collboration-wide official mailing lists. Interested parties can subscribe and unsubscribe themselves and others, you need only have privilege to push to the JeffersonLab/simle_email_list repository on GitHub.
 +
 
  
 
==The Lists==
 
==The Lists==
Line 16: Line 17:
  
 
<ol>
 
<ol>
<li> Check out the directory "listname" using the command:
+
<li> Clone the repository:
 
<pre>
 
<pre>
svn checkout https://halldsvn.jlab.org/repos/trunk/scripts/simple_email_list/lists/listname
+
git clone https://github.com/jeffersonlab/simple_email_list
 +
</pre>
 +
<li> Go to the directory for the list of interest:
 +
<pre>
 +
cd simple_email_list/lists/<listname>
 +
</pre>
 +
where <listname> is the name from the [[Email Lists#Simple Email Lists|list roster]].
 +
<li> edit the file "list.txt" adding your email address on a new line.
 +
<li> Add and commit the new "list.txt".
 +
<pre>
 +
git add list.txt
 +
git commit list.txt
 +
</pre>
 +
<li> Push your changes back to GitHub on the master branch.
 +
<pre>
 +
git push
 
</pre>
 
</pre>
where "listname" is the name from the [[Email Lists#Simple Email Lists|list roster]].
 
<li> In the resulting directory, edit the file "list.txt" adding your email address on a new line.
 
<li> Check "list.txt" back in.
 
 
</ol>
 
</ol>
  
Line 32: Line 45:
  
 
<ol>
 
<ol>
<li>Under subversion, create a directory, for example my_new_list, under trunk/scripts/simple_email_list/lists:
+
<li>Clone the repository.
<pre>svn mkdir https://halldsvn.jlab.org/repos/trunk/scripts/simple_email_list/lists/my_new_list</pre>
+
<li>Create a directory, for example my_new_list, under simple_email_list/lists:
<li> Populate that directory (under subversion) with two files:
+
<pre>
 +
cd simple_email_list/lists/
 +
mkdir <new listname>
 +
</pre>
 +
<li> Populate that directory with two files:
 
<ul>
 
<ul>
 
<li><b>subject.txt</b>: one line containing the subject of all mail messages
 
<li><b>subject.txt</b>: one line containing the subject of all mail messages
 
<li><b>list.txt</b>: email addresses, one per line
 
<li><b>list.txt</b>: email addresses, one per line
 
</ul>
 
</ul>
 +
<li> Add, commit, and push your changes to the master branch on GitHub.
 
</ol>
 
</ol>
  
 
==Installing a List==
 
==Installing a List==
  
The following is not necessary<ref>The not necessary part is that you will get all of the lists, not just the one you are interested in.</ref>, but sufficient:
+
To install in /home/user/simple_email_list:
 
+
To install in /home/user/simple_email_list
+
 
<pre>
 
<pre>
 
cd /home/user
 
cd /home/user
svn checkout $HDSVN/trunk/scripts/simple_email_list
+
git clone https://github.com/jeffersonlab/simple_email_list
 
</pre>
 
</pre>
  
At JLab, the lists are installed in <code>/group/halld/Software/scripts/simple_email_list</code> .
+
At JLab, for the gluex account, the lists are installed in <code>/home/gluex/simple_email_list</code> .
  
 
==Sending to a List==
 
==Sending to a List==
  
Assume in the following that simple_email_list was installed in /home/user/simple_email_list and the email list to which you want to send is my_new_list
+
Assume in the following that simple_email_list was installed in /home/user/simple_email_list and the email list to which you want to send is mylist
 
<ol>
 
<ol>
 
<li> Compose a message and call it <code>message.txt</code> (it must be called this).
 
<li> Compose a message and call it <code>message.txt</code> (it must be called this).
 
<li> Copy the message into the list directory
 
<li> Copy the message into the list directory
 
<pre>
 
<pre>
cp message.txt /home/user/simple_email_list/lists/my_new_list/
+
cp message.txt /home/user/simple_email_list/lists/mylist/
 
</pre>
 
</pre>
 
<li> cd into the list directory
 
<li> cd into the list directory
 
<pre>
 
<pre>
cd /home/user/simple_email_list/lists/my_new_list/
+
cd /home/user/simple_email_list/lists/mylist/
 
</pre>
 
</pre>
<li> send the message to the list by executing the script specified below from the list directory
+
<li> send the message to the list by executing the script:
 
<pre>
 
<pre>
 
/home/user/simple_email_list/scripts/simple_email_list.pl
 
/home/user/simple_email_list/scripts/simple_email_list.pl
 
</pre>
 
</pre>
 +
Note that this '''must''' be done from inside the mylist directory.
 
</ol>
 
</ol>
  
Note that the script will destroy the copy of message.txt that it finds in the local directory. Since the script checks and will not send an empty message, this ensures that repeated invocations of the script will not send the same message over and over unless a new message.txt is explicitly copied into the directory.
+
The script will destroy the copy of message.txt that it finds in the local directory. Since the script checks and will not send an empty message, this ensures that repeated invocations of the script will not send the same message over and over unless a new message.txt is explicitly copied into the directory.
 
+
----
+
<references/>
+

Revision as of 16:13, 1 March 2019

We have several "simple" email lists for notification-type messages of interest to a limited audience, usually the results of automated tasks. The idea is to keep these notifications off the collboration-wide official mailing lists. Interested parties can subscribe and unsubscribe themselves and others, you need only have privilege to push to the JeffersonLab/simle_email_list repository on GitHub.


The Lists

The roster of current lists can be found on the Email Lists wiki page.

Subscribing

If you would like to subscribe to one of these lists there are two methods for doing so.

Method A

Write an email to marki@jlab.org and say that you want to subscribe.

Method B

  1. Clone the repository:
    git clone https://github.com/jeffersonlab/simple_email_list
    
  2. Go to the directory for the list of interest:
    cd simple_email_list/lists/<listname>
    

    where <listname> is the name from the list roster.

  3. edit the file "list.txt" adding your email address on a new line.
  4. Add and commit the new "list.txt".
    git add list.txt
    git commit list.txt
    
  5. Push your changes back to GitHub on the master branch.
    git push
    

Unsubscribing

Reverse one of the subscription methods mentioned above.

Creating a New List

  1. Clone the repository.
  2. Create a directory, for example my_new_list, under simple_email_list/lists:
    cd simple_email_list/lists/
    mkdir <new listname>
    
  3. Populate that directory with two files:
    • subject.txt: one line containing the subject of all mail messages
    • list.txt: email addresses, one per line
  4. Add, commit, and push your changes to the master branch on GitHub.

Installing a List

To install in /home/user/simple_email_list:

cd /home/user
git clone https://github.com/jeffersonlab/simple_email_list

At JLab, for the gluex account, the lists are installed in /home/gluex/simple_email_list .

Sending to a List

Assume in the following that simple_email_list was installed in /home/user/simple_email_list and the email list to which you want to send is mylist

  1. Compose a message and call it message.txt (it must be called this).
  2. Copy the message into the list directory
    cp message.txt /home/user/simple_email_list/lists/mylist/
    
  3. cd into the list directory
    cd /home/user/simple_email_list/lists/mylist/
    
  4. send the message to the list by executing the script:
    /home/user/simple_email_list/scripts/simple_email_list.pl
    

    Note that this must be done from inside the mylist directory.

The script will destroy the copy of message.txt that it finds in the local directory. Since the script checks and will not send an empty message, this ensures that repeated invocations of the script will not send the same message over and over unless a new message.txt is explicitly copied into the directory.