Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arch Linux
infrastructure
Commits
5fb9ff20
Verified
Commit
5fb9ff20
authored
May 14, 2022
by
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
Changes
24
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
roles/mailman3/templates/settings.py.j2
0 → 100644
View file @
5fb9ff20
# 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'
}
}
roles/mailman3/templates/urls.py.j2
0 → 100644
View file @
5fb9ff20
# -*- 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),
]
roles/nginx/defaults/main.yml
View file @
5fb9ff20
---
letsencrypt_validation_dir
:
"
/var/lib/letsencrypt"
nginx_firewall_zone
:
roles/nginx/tasks/main.yml
View file @
5fb9ff20
...
...
@@ -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
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment