diff --git a/tasks/main.yml b/tasks/main.yml index d403a7c..c8fcd2a 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,6 +3,7 @@ name: - mailman3 - mailman3-web + - python3-mailman-hyperkitty - lynx # needed to convert html mail - python3-wheel - python3-pip @@ -39,3 +40,12 @@ mode: 0640 owner: root group: www-data + +- name: copy mailman-hyperkitty config + notify: restart mailman + template: + src: mailman-hyperkitty.py.j2 + dest: /etc/mailman3/mailman-hyperkitty.py + mode: 0640 + owner: root + group: list diff --git a/templates/mailman-hyperkitty.py.j2 b/templates/mailman-hyperkitty.py.j2 new file mode 100644 index 0000000..ca3aa5f --- /dev/null +++ b/templates/mailman-hyperkitty.py.j2 @@ -0,0 +1,20 @@ +# This is the mailman extension configuration file to enable HyperKitty as an +# archiver. Remember to add the following lines in the mailman.cfg file: +# +# [archiver.hyperkitty] +# class: mailman_hyperkitty.Archiver +# enable: yes +# configuration: /etc/mailman3/mailman-hyperkitty.cfg +# + +[general] + +# This is your HyperKitty installation, preferably on the localhost. This +# address will be used by Mailman to forward incoming emails to HyperKitty +# for archiving. It does not need to be publicly available, in fact it's +# better if it is not. +base_url: http://localhost/mailman3/hyperkitty/ + +# Shared API key, must be the identical to the value in HyperKitty's +# settings. +api_key: {{ mailman.archiver.key }} diff --git a/templates/mailman.cfg.j2 b/templates/mailman.cfg.j2 index fbf2961..01e44c4 100644 --- a/templates/mailman.cfg.j2 +++ b/templates/mailman.cfg.j2 @@ -276,7 +276,7 @@ configuration: python:mailman.config.postfix # # If you don't want to use HyperKitty, please comment them out. -#[archiver.hyperkitty] +[archiver.hyperkitty] class: mailman_hyperkitty.Archiver enable: yes configuration: /etc/mailman3/mailman-hyperkitty.cfg