2021-04-06 02:32:35 -04:00
|
|
|
# Extra Mailman Archivers
|
|
|
|
|
|
|
|
This contains some extra archivers to be used with Mailman 3.
|
2021-04-08 01:51:17 -04:00
|
|
|
Currently there are two archivers, `MonthlyArchiver`, and `Pipermail`.
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
Make sure to have the following packages installed first:
|
|
|
|
```sh
|
|
|
|
apt install python3-pip python3-setuptools python3-wheel
|
|
|
|
```
|
|
|
|
|
|
|
|
Then:
|
|
|
|
```sh
|
|
|
|
pip3 install .
|
|
|
|
```
|
|
|
|
|
|
|
|
## MonthlyArchiver
|
2021-04-10 01:57:39 -04:00
|
|
|
This archiver stores each message in a maildir folder for the message's year
|
|
|
|
and month.
|
2021-04-06 02:32:35 -04:00
|
|
|
|
2021-04-08 01:51:17 -04:00
|
|
|
The motivation behind `MonthlyArchiver` was to avoid storing thousands of
|
|
|
|
messages in a single directory, which the `Prototype` archiver currently
|
2021-04-10 01:57:39 -04:00
|
|
|
does.
|
2021-04-08 01:51:17 -04:00
|
|
|
|
2021-04-06 02:32:35 -04:00
|
|
|
Example directory structure:
|
|
|
|
```
|
2021-04-10 01:57:39 -04:00
|
|
|
/var/lib/mailman3/archives/
|
|
|
|
|-- monthly_archiver/
|
|
|
|
|-- mylist@mydomain.com/
|
|
|
|
|-- 2021/
|
|
|
|
|-- April/
|
|
|
|
| |-- cur/
|
|
|
|
| |-- new/
|
|
|
|
| | |-- 1618032020.M509265P87123Q1.mail
|
|
|
|
| | |-- 1618032509.M464173P87208Q1.mail
|
|
|
|
| |-- tmp/
|
|
|
|
|-- May/
|
|
|
|
|-- cur/
|
|
|
|
|-- new/
|
|
|
|
|-- tmp/
|
2021-04-06 02:32:35 -04:00
|
|
|
```
|
|
|
|
|
2021-04-08 01:51:17 -04:00
|
|
|
To enable this archiver, add the following to your mailman.cfg:
|
|
|
|
```
|
|
|
|
[archiver.monthly_archiver]
|
|
|
|
class: extra_mailman_archivers.monthly_archiver.MonthlyArchiver
|
|
|
|
enable: yes
|
|
|
|
```
|
2021-04-06 02:32:35 -04:00
|
|
|
|
2021-04-08 01:51:17 -04:00
|
|
|
## Pipermail
|
|
|
|
This archiver attempts to add messages to Pipermail, the archiver for
|
|
|
|
Mailman 2. An existing Mailman 2 installation is required.
|
|
|
|
|
|
|
|
If the mailing list does not exist in the Mailman 2 directory, you
|
|
|
|
must create it first. Use the `newlist-pipermail` script in the `pipermail`
|
|
|
|
directory after copying it to the `bin` directory where Mailman 2
|
|
|
|
is installed. It works the same way as the traditional `newlist` script
|
|
|
|
except that it does not communicate with the MTA. **Note**: by default,
|
|
|
|
this will create a public archive; to make it private, unlink the appropriate
|
|
|
|
folder in the `archives/public` directory where Mailman 2 is installed.
|
|
|
|
|
|
|
|
To enable this archiver, add the following to your mailman.cfg:
|
2021-04-06 02:32:35 -04:00
|
|
|
```
|
2021-04-08 01:51:17 -04:00
|
|
|
[archiver.pipermail]
|
|
|
|
class: extra_mailman_archivers.pipermail.Pipermail
|
|
|
|
enable: yes
|
|
|
|
```
|
|
|
|
|
2021-04-08 09:14:24 -04:00
|
|
|
The default list URL for this archiver is `http://$domain/pipermail/$short_listname`
|
|
|
|
(Mailman adds a `List-Archive` header to each message with this value).
|
2021-04-08 01:51:17 -04:00
|
|
|
The default Mailman 2 directory is `/var/lib/mailman`.
|
|
|
|
To change either of these values, add the following to the pipermail
|
|
|
|
section in mailman.cfg:
|
|
|
|
```
|
|
|
|
configuration: /etc/mailman3/mailman-pipermail.cfg
|
|
|
|
```
|
|
|
|
|
|
|
|
Then, in `/etc/mailman3/mailman-pipermail.cfg`, set `base_url` and/or `mailman2_dir`
|
|
|
|
appropriately, e.g.
|
|
|
|
```
|
|
|
|
[general]
|
|
|
|
base_url: http://$domain/old/pipermail/$short_listname
|
2021-04-06 02:32:35 -04:00
|
|
|
```
|
2021-04-08 09:14:24 -04:00
|
|
|
|
|
|
|
To hide the list URL from each message, simply set `base_url` to an empty string:
|
|
|
|
```
|
|
|
|
base_url:
|
|
|
|
```
|