Service/lists: Difference between revisions

No edit summary
Chimosky (talk | contribs)
Undo mistake.
 
(10 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Hostnames ==
== Hostnames ==


* http://lists.sugarlabs.org/
* https://lists.sugarlabs.org/
* http://lists.ole.org/


== Hosted on ==
== Hosted on ==


[[Machine/sunjammer]]
[[Machine/bender]]
 


== Administrative contact ==
== Administrative contact ==
Line 19: Line 17:


* [[User:bernie|Bernie Innocenti]]
* [[User:bernie|Bernie Innocenti]]
* [[User:SMParrish|Steven Parrish]]
* [[User:Chimosky|Chihurumnaya Ibiam]]


== Requesting a new mailing list ==
== Requesting a new mailing list ==
Line 27: Line 25:


When you have a critical mass of people regularly talking about the same topic, request a mailing list by
When you have a critical mass of people regularly talking about the same topic, request a mailing list by
emailing the following information to sysadmin at laptop dot org:
emailing the following information to the administrative contact:


1. The name you want for your mailing list, with alternative names if the first one is taken
# The name you want for your mailing list, with alternative names if the first one is taken
2. A description of the list, its purpose, and why it's needed (being able to say "we've been talking on this other list for a while, and the discussion has grown too big - see these archive links" is helpful)
# A description of the list, its purpose, and why it's needed (being able to say "we've been talking on this other list for a while, and the discussion has grown too big - see these archive links" is helpful)
3. The name/email of the list admin, and of at least one other moderator (minimum one admin and one moderator)
# The name/email of the list admin, and of at least one other moderator (minimum one admin and one moderator)
4. At least 10 names/emails of people who want to be the initial subscribers
# At least 10 names/emails of people who want to be the initial subscribers


It may take up to 48h to hear a response back, so please be patient!
It may take up to 48h to hear a response back, so please be patient!
== Notes ==
{| class="wikitable"
|-
!scope="row" | User
|{{Code|mailman}}
|-
|-
!scope="row" | Home
|{{Code|/opt/mailman}}
|-
!scope="row" | Daemon
|
{{Code|/etc/systemd/system/mailman3.service}}<br>
{{Code|/etc/systemd/system/mailmanweb.service}}<br>
{{Code|/etc/systemd/system/uwsgi.service}}<br>
|-
!scope="row" | Logs
|
{{Code|/var/log/nginx}}<br>
{{Code|/opt/mailman/web/logs/*}}<br>
{{Code|/opt/mailman/mm/var/logs/*}}<br>
|-
!scope="row" | Config
|
{{Code|/etc/nginx/sites-available/mailman.sugarlabs.org}}<br>
{{Code|/etc/mailman3/*}}<br>
|-
!scope="row" | Ports
|
{{Code|443}} HTTP server<br>
{{Code|ss -tnlp}} View service ports<br>
|-
!scope="row" | Admin scripts
|
{{Code|/opt/mailman/mm/bin/}}<br>
|-


|}


== Sysadmin Recipes ==
== Sysadmin Recipes ==


=== Adding a new a mailing list ===
=== Adding a new a mailing list ===
* Login to mailman user.


* Create the list:
* Create the list:


  sudo /var/lib/mailman/bin/newlist --urlhost=lists.sugarlabs.org --emailhost=lists.sugarlabs.org LISTNAME
  python3 create-list.py --list LISTNAME
 
Mailman3 has separate parts and the core communicates with a [https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/rest.html REST API],
the script is aimed to make it easier to create a list, and can be viewed
to see how to authenticate to the API.


* Send additional instructions to list administrator
* Send additional instructions to list administrator
Line 58: Line 101:
  related settings.
  related settings.


After making changes to any config, restart all three services as django has quite the
persistent cache.


=== Change virtual host of a list ===
You can make any changes you need to make to any list using the mailmanclient, see [https://docs.mailman3.org/projects/mailmanclient/en/latest/src/mailmanclient/docs/using.html mailmanclient] for more info.
 
bin/withlist -l -r fix_url bolivia -u lists2.ole.org
 
=== Change a parameter on all lists ===
 
echo "nondigestable = True" >bar
for l  in `bin/list_lists  -b`; do  bin/config_list -i bar  -v $l ; done
rm bar
 
=== Disabling digests for all users ===
 
Create a nodigests.py with this content:
 
from Mailman import mm_cfg
def nodigests(m):
    for addr in m.getMembers():
        if m.getMemberOption(addr, mm_cfg.Digests) == True:
            print "turning off digests for " + addr
            m.setMemberOption(addr, mm_cfg.Digests, 0)
    m.Save()
    m.Unlock()
 
Then, execute:
 
bin/withlist -l -r nodigests -a
 
=== Migrating lists from one host to another ===
 
To migrate lists from solarsail to sunjammer, I did the following:
 
* Lower TTL for lists.sugarlabs.org to 30 minutes
 
* Copy over config before cut-off:
 
  ssh solarsail
  cd /var/lib/mailman/lists/
  rsync -aP aslo bugs colombia community-news dextrose fourthgrademath gsoc iaep italia marketing slobs soas somosazucar sugar-desarrollo sugar-devel sugar-reports  systems systems-logs root@sunjammer:/var/lib/mailman/lists/
  cd /var/lib/mailman/archives/private
  rsync -aP aslo* bugs* colombia* community-news* dextrose* fourthgrademath* gsoc* iaep* italia* marketing* slobs* soas* somosazucar* sugar-desarrollo* sugar-devel* sugar-reports* systems* systems-logs* root@sunjammer:/var/lib/mailman/archives/private/
 
* Copy over the lists.sugarlabs.org bits from the Postfix configuration (<code>/etc/postfix/main.cf</code> and <code>/etc/postfix/transport</code>)
 
* Test admin pages and archives on the new site (hint: set the new IP for lists.sugarlabs.org in /etc/hosts)
 
* [[Sysadmin/Announcing_downtime|Announce downtime]] on all affected lists
 
* Stop mailman on solarsail
 
* Switch over DNS records (with default TTL values)
 
* Remove mailman transport map from solarail, leaving the relay, so that anything@lists.sugarlabs.org gets sent to sunjammer
 
* Restart mailman on solarsail


== See Also ==
== See Also ==