Verified Commit 5fb9ff20 authored by Kristian Klausen's avatar Kristian Klausen 🎉
Browse files

Merge branch 'mailman3' into 'master'

Setup mailman3 server

See merge request !437
parents 95e51df5 d1c23d5d
Pipeline #18784 passed with stage
in 35 seconds
# mailman-web config
from mailman_web.settings.base import *
from mailman_web.settings.mailman import *
#: Default list of admins who receive the emails from error logging.
ADMINS = (
('Mailman Suite Admin', 'root@{{ lists_domain }}'),
)
# Postgresql datbase setup.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'mailman-web',
'USER': '{{ vault_mailman_web_db_user }}',
'PASSWORD': '{{ vault_mailman_web_db_password }}',
}
}
#: See https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = [
"localhost", # Archiving API from Mailman, keep it.
"{{ lists_domain }}",
]
#: Current Django Site being served. This is used to customize the web host
#: being used to serve the current website. For more details about Django
#: site, see: https://docs.djangoproject.com/en/dev/ref/contrib/sites/
SITE_ID = 1
SECRET_KEY = '{{ vault_mailman_web_secret_key }}'
MAILMAN_REST_API_USER = '{{ vault_mailman_admin_user }}'
MAILMAN_REST_API_PASS = '{{ vault_mailman_admin_pass }}'
MAILMAN_ARCHIVER_KEY = '{{ vault_mailman_archiver_key }}'
#: https://docs.djangoproject.com/en/3.2/topics/email/#smtp-backend
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = '{{ hostvars['lists.archlinux.org']['wireguard_address'] }}'
EMAIL_PORT = 25
#: Sender in Emails sent out by Postorius.
DEFAULT_FROM_EMAIL = 'postorius@{{ lists_domain }}'
SERVER_EMAIL = 'root@{{ lists_domain }}'
POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost'
HYPERKITTY_ALLOW_WEB_POSTING = False
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
'PATH': '/var/lib/mailman-web/fulltext_index'
}
}
# -*- coding: utf-8 -*-
# Copyright (C) 1998-2016 by the Free Software Foundation, Inc.
#
# This file is part of Postorius.
#
# Postorius is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# Postorius is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# Postorius. If not, see <http://www.gnu.org/licenses/>.
from django.urls import include, path
from django.contrib import admin
from django.urls import reverse_lazy
from django.views.generic import RedirectView
urlpatterns = [
path('', RedirectView.as_view(
url=reverse_lazy('list_index'),
permanent=True)),
path('mailman3/', include('postorius.urls')),
path('archives/', include('hyperkitty.urls')),
path('', include('django_mailman3.urls')),
path('accounts/', include('allauth.urls')),
# Django admin
path('admin3/', admin.site.urls),
]
---
letsencrypt_validation_dir: "/var/lib/letsencrypt"
nginx_firewall_zone:
......@@ -27,6 +27,7 @@
- name: install cert renewal hook
template: src=letsencrypt.hook.d.j2 dest=/etc/letsencrypt/hook.d/nginx owner=root group=root mode=0755
when: "'certbot' in ansible_play_role_names"
- name: create nginx.d directory
file: state=directory path=/etc/nginx/nginx.d owner=root group=root mode=0755
......@@ -59,7 +60,7 @@
service: name=nginx enabled=yes
- name: open firewall holes
ansible.posix.firewalld: service={{ item }} permanent=true state=enabled immediate=yes
ansible.posix.firewalld: service={{ item }} zone={{ nginx_firewall_zone }} permanent=true state=enabled immediate=yes
with_items:
- http
- https
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment