Difference between revisions of "Simple Email Lists"
(→Sending to a List) |
|||
(10 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | We have several "simple" email lists for notification-type messages of interest to a limited audience. The idea is to keep | + | 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/simple_email_list repository on GitHub. |
− | |||
− | + | ==The Lists== | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | =Subscribing= | + | The roster of current lists can be found on the [[Email Lists#Simple Email Lists|Email Lists]] wiki page. |
+ | |||
+ | ==Subscribing== | ||
If you would like to subscribe to one of these lists there are two methods for doing so. | If you would like to subscribe to one of these lists there are two methods for doing so. | ||
− | ==Method A== | + | ===Method A=== |
Write an email to marki@jlab.org and say that you want to subscribe. | Write an email to marki@jlab.org and say that you want to subscribe. | ||
− | ==Method B== | + | ===Method B=== |
<ol> | <ol> | ||
− | <li> | + | <li> Clone the repository: |
<pre> | <pre> | ||
− | + | 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> | ||
− | |||
− | |||
− | |||
</ol> | </ol> | ||
− | =Unsubscribing= | + | ==Unsubscribing== |
Reverse one of the subscription methods mentioned above. | Reverse one of the subscription methods mentioned above. | ||
− | =Creating a New List= | + | ==Creating a New List== |
<ol> | <ol> | ||
− | <li> | + | <li>Clone the repository. |
− | <pre> | + | <li>Create a directory, for example my_new_list, under simple_email_list/lists: |
− | <li> Populate that directory | + | <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 | + | ==Installing simple_email_lists== |
− | + | To install in /home/user/simple_email_list: | |
− | + | ||
− | To install in /home/user/simple_email_list | + | |
<pre> | <pre> | ||
cd /home/user | cd /home/user | ||
− | + | git clone https://github.com/jeffersonlab/simple_email_list | |
</pre> | </pre> | ||
− | At JLab, the lists are installed in <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 | + | 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/ | + | 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/ | + | cd /home/user/simple_email_list/lists/mylist/ |
</pre> | </pre> | ||
− | <li> send the message to the list by executing the script | + | <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> | ||
− | + | 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. | |
− | + | ||
− | + | ||
− | + |
Latest revision as of 18:02, 14 August 2020
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/simple_email_list repository on GitHub.
Contents
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
- Clone the repository:
git clone https://github.com/jeffersonlab/simple_email_list
- Go to the directory for the list of interest:
cd simple_email_list/lists/<listname>
where <listname> is the name from the list roster.
- Edit the file "list.txt" adding your email address on a new line.
- Add and commit the new "list.txt".
git add list.txt git commit list.txt
- 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
- Clone the repository.
- Create a directory, for example my_new_list, under simple_email_list/lists:
cd simple_email_list/lists/ mkdir <new listname>
- Populate that directory with two files:
- subject.txt: one line containing the subject of all mail messages
- list.txt: email addresses, one per line
- Add, commit, and push your changes to the master branch on GitHub.
Installing simple_email_lists
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.
- Compose a message and call it
message.txt
(it must be called this). - Copy the message into the list directory
cp message.txt /home/user/simple_email_list/lists/mylist/
- cd into the list directory
cd /home/user/simple_email_list/lists/mylist/
- 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.