... | ... | @@ -19,7 +19,7 @@ Install some extra dependencies for softwate compiling: |
|
|
Ref:
|
|
|
https://docs.mailman3.org/en/latest/install/virtualenv.html#installing-dependencies
|
|
|
|
|
|
*Also GNU mailman wiki suggests to install the following for memory cache, throttle too many failed server connections and an internalization library to support multilingual environments:*
|
|
|
*Also GNU mailman wiki suggests to install the following for memory cache, throttle too many failed server connections and an internalization library to support multilingual environments (https://docs.mailman3.org/en/latest/translation.html):*
|
|
|
```
|
|
|
# apt install memcached
|
|
|
# apt install fail2ban
|
... | ... | @@ -57,21 +57,22 @@ Ref: https://docs.mailman3.org/en/latest/install/virtualenv.html#virtualenv-setu |
|
|
|
|
|
`(venv)$ pip install wheel mailman psycopg2-binary mailman-web mailman-hyperkitty`
|
|
|
|
|
|
mailman-web provides hyperkitty and postorius for the web interface, as well as shortcuts to django admin commands. Install the following for mailman-web application to be able to talk with apache2 server gateway:
|
|
|
mailman-web provides hyperkitty and postorius for the web interface, as well as shortcuts to django admin commands. We install gunicorn for mailman-web application to be able to talk with apache2 server gateway, and a python client to make use of memory caching:
|
|
|
|
|
|
`pip install pylibmc gunicorn`
|
|
|
|
|
|
https://docs.mailman3.org/en/latest/install/virtualenv.html#installing-mailman-core
|
|
|
## Mailman and hyperkitty configurations
|
|
|
|
|
|
**F. Mailman and hyperkitty configurations:**
|
|
|
Exit mailman user and as root we create
|
|
|
/etc/mailman3/ dir, we make owner of this dir the user mailman and create the files `mailman.cfg` and `settings.py`. Then as mailman user again, we also create an extra dir under `/opt/mailman` to place the `mailman-hyperkitty.cfg` settings.
|
|
|
|
|
|
Exit mailman user and as a root we create
|
|
|
/etc/mailman3/ dir, make owner of this dir the user mailman and create the files mailman.cfg and settings.py in the /etc dir and mailman-hyperkitty.cfg in mailman’s user dir (have a look at these files)
|
|
|
*mailman.cfg and setting.py samples:*
|
|
|
|
|
|
https://docs.mailman3.org/en/latest/install/virtualenv.html#installing-mailman-core
|
|
|
|
|
|
https://docs.mailman3.org/en/latest/install/virtualenv.html#initial-configuration
|
|
|
|
|
|
**G. Postfix configuration**
|
|
|
## Postfix configuration
|
|
|
|
|
|
Check open ports in the system. Look for the smtpd port 25 if it’s open. Postfix is the MTP which relays incoming and outgoing mails to mailman.
|
|
|
|
... | ... | @@ -123,7 +124,7 @@ https://wiki.list.org/DOC/Mailman%203%20installation%20experience?action=AttachF |
|
|
0 8 * * * /opt/mailman/mm/bin/mailman notify
|
|
|
```
|
|
|
|
|
|
**M. Apache2 configurations**
|
|
|
## Apache2 configurations
|
|
|
|
|
|
Go to sites-available and create new configuration for the domain name of your lists
|
|
|
and check if proxy_http is enabled and use it for the localhost mailman-web application.
|
... | ... | @@ -137,18 +138,45 @@ See more details: |
|
|
https://djangodeployment.readthedocs.io/en/latest/04-web-server.html?highlight=apache2#configuring-apache-for-django
|
|
|
|
|
|
|
|
|
**N. Copy existing list from one server to another**
|
|
|
## Copy existing list from one server to another
|
|
|
|
|
|
Create ssh keys for server where old lists reside and copy public key to current mailman3 server.
|
|
|
A howto [here](https://www.simplified.guide/ssh/copy-public-key).
|
|
|
We can use rsync from the old mailman server to copy files in a tmp directory. E.g
|
|
|
rsync -avz ssh /var/lib/mailman/lists mailman@<new-server>:~/tmp/
|
|
|
rsync -avz ssh /var/lib/mailman/archives mailman@<new-server>:~/tmp
|
|
|
|
|
|
Ref:
|
|
|
https://docs.rc.fas.harvard.edu/kb/rsync/
|
|
|
|
|
|
## Migrate lists
|
|
|
From the new mailman server, enter mailman user.
|
|
|
If we want to continue a migrated list with the new mailman3, we need to create a new list with the same name at the new domain:
|
|
|
|
|
|
`(venv) $ mailman create foo-list@<new-lists-domain>`
|
|
|
|
|
|
Then we import the old list, the archives, and we do an index update:
|
|
|
```
|
|
|
(venv) $ mailman import21 foo-list@<new-lists-domain> ~/tmp/lists/foo-list/config.pck
|
|
|
(venv) $ python manage.py hyperkitty_import -l foo-list@<new-lists-domain> ~/tmp/archives/private/<list>.mbox/<list>.mbox
|
|
|
<venv) $ mailman-web update_index_one_list foo-list@<new-lists-domain>
|
|
|
```
|
|
|
Ref: https://docs.mailman3.org/en/latest/migration.html#upgrade-strategy
|
|
|
|
|
|
Create ssh keys for server where old lists reside.
|
|
|
Copy public key to current mailman server
|
|
|
use rsync to copy files
|
|
|
## Interact with the lists from the web UI
|
|
|
We visit the domain name we configured before we apache2. If the lists have a public view permission, then they are listed on the landing page. The same goes with the archives.
|
|
|
Old members of the migrated list, would need to create new accounts via this web UI, in order for them to access the archives and their email and list settings. They need to use the same email with which they had subscribed in the old list.
|
|
|
|
|
|
Ref: https://docs.mailman3.org/en/latest/userguide.html#making-a-mailman-account
|
|
|
|
|
|
**O. Migrate lists**
|
|
|
The admin of mailman3 has to create a superuser as a mailman user:
|
|
|
|
|
|
`$ mailman import21 foo-list@example.com /path/to/mailman2/foo-list/config.pck`
|
|
|
`(venv) $ mailman-web createsuperuser`
|
|
|
|
|
|
`$ python manage.py hyperkitty_import -l foo-list@example.com $var_prefix/archives/private/foo-list.mbox/foo-list.mbox`
|
|
|
With the credentials given above, we can login at the admin area `<lists-domain>/admin`, where we can see and create/edit lists, users, and change their permissions.
|
|
|
|
|
|
https://docs.mailman3.org/en/latest/migration.html#upgrade-strategy```
|
|
|
User guide docs at
|
|
|
https://docs.mailman3.org/en/latest/userguide.html
|
|
|
|
|
|
Extra configurations for mailman web UI:
|
|
|
https://docs.mailman3.org/en/latest/config-web.html |