Skip to content
Snippets Groups Projects
Verified Commit a500e683 authored by anarcat's avatar anarcat
Browse files

add missing bits from puppet

parent 79834171
No related branches found
No related tags found
No related merge requests found
Pipeline #221042 passed with warnings
...@@ -695,7 +695,44 @@ details. To migrate a list, the following was used: ...@@ -695,7 +695,44 @@ details. To migrate a list, the following was used:
fab mailman.migrate-mm2-mm3 tor-relays fab mailman.migrate-mm2-mm3 tor-relays
The above assumes a `tpa.mm2_mm3_migration_cleanup` module in the The above assumes a `tpa.mm2_mm3_migration_cleanup` module in the
Python path, currently deployed in Puppet. Python path, currently deployed in Puppet. Here's a backup copy:
```python
from __future__ import print_function
def check_bounce_info(mlist):
print(mlist.bounce_info)
def check_pending_reqs(mlist):
if mlist.NumRequestsPending() > 0:
print("list", mlist.internal_name(), "has", mlist.NumRequestsPending(), "pending requests")
if mlist.GetSubscriptionIds():
print("subscriptions:", len(mlist.GetSubscriptionIds()))
if mlist.GetUnsubscriptionIds():
print("unsubscriptions:", len(mlist.GetUnsubscriptionIds()))
if mlist.GetHeldMessageIds():
print("held:", len(mlist.GetHeldMessageIds()))
def list_pending_reqs_owners(mlist):
if mlist.NumRequestsPending() > 0:
print(mlist.internal_name() + "-owner@lists.torproject.org")
def flush_digest_mbox(mlist):
mlist.send_digest_now()
```
It also assumes a `mm3_tweaks` on the Mailman 3 server, also in
Python, here's a copy:
```python
from mailman.interfaces.mailinglist import DMARCMitigateAction, ReplyToMunging
def mitigate_dmarc(mlist):
mlist.dmarc_mitigate_action = DMARCMitigateAction.munge_from
mlist.dmarc_mitigate_unconditionally = True
mlist.reply_goes_to_list = ReplyToMunging.no_munging
```
The list owners to contact about issues with pending requests was The list owners to contact about issues with pending requests was
generated with: generated with:
...@@ -724,23 +761,10 @@ The following procedure was used for the first test list, to figure ...@@ -724,23 +761,10 @@ The following procedure was used for the first test list, to figure
out how to do this and help establish the Fabric job. It's kept only out how to do this and help establish the Fabric job. It's kept only
for historical purposes. for historical purposes.
To check for anomalies in the mailing lists migrations, the following To check for anomalies in the mailing lists migrations, with the above
script was used: `mm2_mm3_migration_cleanup` script, called with, for example:
```
def check_bounce_info(mlist):
print(mlist.bounce_info)
def check_pending_reqs(mlist):
print(mlist.NumRequestsPending())
def flush_digest_mbox(mlist):
mlist.send_digest_now()
```
and called with for example:
sudo -u list /var/lib/mailman/bin/withlist -l -a -r check_list_mm3.check_pending_reqs sudo -u list /var/lib/mailman/bin/withlist -l -a -r mm2_mm3_migration_cleanup.check_pending_reqs
The `bounce_info` check was done because of a comment found in [this The `bounce_info` check was done because of a comment found in [this
post](https://docs.debops.org/en/stable-2.1/ansible/roles/mailman/mailman2-migration.html) saying the conversion script had problem with those, that post](https://docs.debops.org/en/stable-2.1/ansible/roles/mailman/mailman2-migration.html) saying the conversion script had problem with those, that
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment