Original version from BALUG: https://wiki.sluug.org/mailman_2_-_mailman_3 Thanks!! --- ## Mailman 3 ### Debian * **Debian 10 “Buster”** * LTS EOL: 2024‑06‑30 * First stable to support Mailman 3; last to support Mailman 2 * **balug-sf-lug-v2.balug.org (balug.org)** * `mailman3` startup script (as `list` user, `LANG=en_US.UTF-8`, `umask 022`) ```sh #!/bin/sh umask 022 && unset LC_ALL && LANG=en_US.UTF-8 export LANG && case "$(id -n -u)" in list) umask 022 && exec mailman "$@" ;; *) umask 022 && exec sudo -u list \ mailman "$@" ;; esac ``` * Typical commands: ```sh /usr/share/mailman3-web/manage.py # help manage.py createsuperuser manage.py changepassword ``` * **Databases** (SQLite examples): * `/var/lib/mailman3/data/mailman.db` * `/var/lib/dbconfig-common/sqlite3/mailman3-web/mailman3web.db` Backup command: ```sh sqlite3 /path/to/mailman3web.db \ ".backup '/path/to/mailman3web.BACKUP.db'" ``` * Example list: `balug-test3@lists.balug.org` * Web UI: * Public: `https://lists.balug.org/mailman3/` * Admin: `https://lists.balug.org/mailman3/admin/` ### Archiving & Import Behavior * Headers like `X-Archive`, `X-No-Archive` respected; conflicts result in no archive. * Imported archives: * append to existing data * headers and bodies may be altered (To, CC headers stripped or changed, content-type altered) * Archives stored in database tables like `hyperkitty_email` ([wiki.balug.org][1]) * Downloadable via `.mbox.gz`, e.g.: `https://lists.balug.org/mailman3/hyperkitty/list/…/export/…​.mbox.gz` ([wiki.balug.org][1]) * Email obfuscation: * GUI and downloaded archives may alter “@” to “(a)” inconsistently; actual DB data may be unaltered ([wiki.balug.org][1]) ### Managing Messages & Lists * Delete individual messages via admin UI or directly in DB (`hyperkitty_email`) ([wiki.balug.org][1]) * Rename lists and adjust archive and posting settings through Postorius UI ([wiki.balug.org][1]) * Prevent archiving while allowing posting via disabling “Active archivers” in settings ### Migration Checklist | Task | test | admin | talk | announce | | ------------------------------------- | :--: | :---: | :--: | :------: | | lock old | y | y | y | y | | handle pending | y | y | y | y | | create/rename target | y | y | y | y | | migrate config | y | y | y | y | | migrate archive | y | y | y | y | | index archive | y | y | y | y | | archive \*.pck files | y | y | y | y | | archive info pages | y | y | y | y | | remove Mailman 2 list (keep archives) | y | y | y | y | | update lists.balug.org site | y | y | y | y | | update links on balug.org | y | y | y | y | | set Mailman 2→3 redirects | ir | ir | ir | ir | | update Mailman 2 archive links | n | n | n | n | | customize templates | i | i | i | i | | update monthly stats | - | y | - | - | Legend: * **y** = done * **n** = not done * **ir** = redirects are in place * **i** = in progress ### Migration Procedure & Notes 1. Ensure Debian supports it (e.g., Buster → Bookworm). 2. Lock/suspend Mailman 2: * Remove or comment out aliases in `/etc/aliases` and run `newaliases` ([wiki.balug.org][1]) 3. Create corresponding Mailman 3 lists via Postorius or CLI. 4. Import config: ```sh mailman import21 /var/lib/mailman/lists/*/config.pck ``` * Workaround: run as `list` user and reset `bounce_info` if import fails ([wiki.balug.org][1]) 5. Import and index archives: ```sh manage.py hyperkitty_import -l --since 1968 /var/lib/mailman/archives/private/*.mbox manage.py update_index_one_list manage.py update_index -s 1970-01-01T00:00:00 ``` * Must be run as `www-data` on Debian ([wiki.balug.org][1]) 6. Remove old Mailman 2 list: ```sh /usr/lib/mailman/bin/rmlist ``` * Old archives remain unless you use `-a` option ([wiki.balug.org][1]) 7. Update site redirects, links, and stats reporting (e.g. cron scripts for monthly summaries). 8. Optional: mass-export/import user preferences, but user logins differ (per-list vs. per-account) ([wiki.balug.org][1]) ### Feature & Configuration Mapping * Delivery status, digest preferences, moderation options, and user settings generally map 1:1 from Mailman 2 to Mailman 3 (with some exceptions due to default settings or absence of certain flags) ([wiki.balug.org][1]) * Some template formatting quirks (e.g. line-wrapping at 70 chars). Use leading whitespace to avoid unwanted wrapping ([wiki.balug.org][1]) * Gravatar leakage issue fixed in HyperKitty ≥ 1.3.4; disable via `HYPERKITTY_ENABLE_GRAVATAR` in later versions ([wiki.balug.org][1]) --- Let me know if you'd like this as a downloadable Markdown file, cleaned up further, or reformatted to match another wiki syntax! [1]: https://www.wiki.balug.org/wiki/doku.php?id=system%3Amailman3&utm_source=chatgpt.com "system:mailman3 [BALUG Wiki]"