A simple mailman3 archiver to notify a webhook of mails
Find a file
2023-05-19 20:49:56 +02:00
.vscode 🙈 ignore .ruff_cache 2023-05-19 20:29:45 +02:00
mailman3_webhook_archiver add archiver 2023-05-19 20:26:26 +02:00
.editorconfig 🔧 .editorconfig 2023-05-19 20:24:45 +02:00
.envrc 💪 nixify project 2023-05-19 20:26:08 +02:00
.gitattributes 🙈 .gitattributes 2023-05-19 20:25:43 +02:00
.gitignore 🙈 ignore .ruff_cache 2023-05-19 20:29:45 +02:00
flake.lock 💪 nixify project 2023-05-19 20:26:08 +02:00
flake.nix 💪 nixify project 2023-05-19 20:26:08 +02:00
poetry.lock add explicit requests dependency 2023-05-19 20:49:56 +02:00
poetry.toml poetry python project 2023-05-19 20:25:17 +02:00
pyproject.toml add explicit requests dependency 2023-05-19 20:49:56 +02:00
README.md 📝 update syntax highlighting in README.md 2023-05-19 18:43:33 +00:00

Installation

A mailman archiver is a simple python package, to install it you can either use pip or install it manually.

If your use-case doesn't fit the this archiver feel free to fork this project, create an issue or a pull request.

Activate the python environment used by mailman.

Install the package using pip:

pip install git+https://github.com/Laurent2916/mailman3_webhook_archiver.git

Clone the repository:

git clone https://github.com/Laurent2916/mailman3_webhook_archiver.git
cd mailman3_webhook_archiver

Copy the mailman3_webhook_archiver folder into your environment libraries. The process may look something like one of the following lines:

cp -r mailman3_webhook_archiver /usr/lib/python3/dist-packages/
cp -r mailman3_webhook_archiver /path/to/.venv/lib/python3.11/site-packages/

Configuration

The archiver loads its configuration using an external configuration file. Create and fill /etc/mailman3/mailman-webhook-archiver.cfg with the relevant informations.

[global]
url = https://webhook.example.com/foo/bar
key = SUPER_SECRET_TOKEN_KEY

filter_spam = false
monitored_lists = my_mailing_list, another_list, foo, bar, test

Modify the mailman configuration to enable the newly added archiver. Append the following to /etc/mailman3/mailman.cfg.

[archiver.mailman3_webhook_archiver]
class: mailman3_webhook_archiver.WebhookArchiver
configuration: /etc/mailman3/mailman3_webhook_archiver.cfg
enable: yes

Special thanks