Mailman3: Working cas
parent
ae36169565
commit
ed40b871dc
|
@ -1,12 +1,16 @@
|
||||||
---
|
---
|
||||||
|
# You will need to do after: sudo pip3 install django-allauth-cas
|
||||||
|
# Yes, it is horrible but we need Debian Python3 to see this django app.
|
||||||
- name: Install mailman3
|
- name: Install mailman3
|
||||||
apt:
|
apt:
|
||||||
update_cache: true
|
update_cache: true
|
||||||
name:
|
name:
|
||||||
- mailman3-full
|
- mailman3-full
|
||||||
- nginx
|
- nginx
|
||||||
- dbconfig-no-thanks
|
- dbconfig-no-thanks # Do not autoconfigure database
|
||||||
- postgresql
|
- postgresql
|
||||||
|
- python3-pip # CAS
|
||||||
|
- python3-lxml # CAS
|
||||||
install_recommends: false
|
install_recommends: false
|
||||||
register: apt_result
|
register: apt_result
|
||||||
retries: 3
|
retries: 3
|
||||||
|
@ -15,7 +19,7 @@
|
||||||
# You will need to setup postgres
|
# You will need to setup postgres
|
||||||
# sudo -u postgres createuser -P mailman3
|
# sudo -u postgres createuser -P mailman3
|
||||||
# sudo -u postgres createdb -O mailman3 mailman3
|
# sudo -u postgres createdb -O mailman3 mailman3
|
||||||
# Test with : psql -U mailman3 -W -d mailman3 -h localhost
|
# Test with: psql -U mailman3 -W -d mailman3 -h localhost
|
||||||
- name: Configure mailman3
|
- name: Configure mailman3
|
||||||
template:
|
template:
|
||||||
src: mailman3/mailman.cfg.j2
|
src: mailman3/mailman.cfg.j2
|
||||||
|
@ -28,7 +32,8 @@
|
||||||
# You will need to setup postgres
|
# You will need to setup postgres
|
||||||
# sudo -u postgres createuser -P mailman3web
|
# sudo -u postgres createuser -P mailman3web
|
||||||
# sudo -u postgres createdb -O mailman3web mailman3web
|
# sudo -u postgres createdb -O mailman3web mailman3web
|
||||||
# Test with : psql -U mailman3web -W -d mailman3web -h localhost
|
# Test with: psql -U mailman3web -W -d mailman3web -h localhost
|
||||||
|
# Then migrate data: sudo /usr/share/mailman3-web/manage.py migrate
|
||||||
- name: Configure mailman3-web
|
- name: Configure mailman3-web
|
||||||
template:
|
template:
|
||||||
src: mailman3/mailman-web.py.j2
|
src: mailman3/mailman-web.py.j2
|
||||||
|
|
|
@ -30,7 +30,12 @@ MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1')
|
||||||
|
|
||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
|
# Add allauth_cas_crans path
|
||||||
|
import sys
|
||||||
|
sys.path.insert(0, "/usr/scripts/mailman")
|
||||||
|
|
||||||
INSTALLED_APPS = (
|
INSTALLED_APPS = (
|
||||||
|
'mailman_theme_crans', # override templates
|
||||||
'hyperkitty',
|
'hyperkitty',
|
||||||
'postorius',
|
'postorius',
|
||||||
'django_mailman3',
|
'django_mailman3',
|
||||||
|
@ -53,6 +58,8 @@ INSTALLED_APPS = (
|
||||||
'allauth',
|
'allauth',
|
||||||
'allauth.account',
|
'allauth.account',
|
||||||
'allauth.socialaccount',
|
'allauth.socialaccount',
|
||||||
|
'allauth_cas',
|
||||||
|
'allauth_cas_crans',
|
||||||
#'django_mailman3.lib.auth.fedora',
|
#'django_mailman3.lib.auth.fedora',
|
||||||
#'allauth.socialaccount.providers.openid',
|
#'allauth.socialaccount.providers.openid',
|
||||||
#'allauth.socialaccount.providers.github',
|
#'allauth.socialaccount.providers.github',
|
||||||
|
@ -156,6 +163,7 @@ ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https"
|
||||||
# Social auth
|
# Social auth
|
||||||
#
|
#
|
||||||
SOCIALACCOUNT_PROVIDERS = {
|
SOCIALACCOUNT_PROVIDERS = {
|
||||||
|
'crans': {}
|
||||||
#'openid': {
|
#'openid': {
|
||||||
# 'SERVERS': [
|
# 'SERVERS': [
|
||||||
# dict(id='yahoo',
|
# dict(id='yahoo',
|
||||||
|
@ -191,3 +199,5 @@ COMPRESS_OFFLINE = True
|
||||||
|
|
||||||
POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost/mailman3/'
|
POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost/mailman3/'
|
||||||
|
|
||||||
|
# Use Crans SMTP for Django mails
|
||||||
|
EMAIL_HOST = 'smtp.crans.org'
|
||||||
|
|
Loading…
Reference in New Issue