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
|
||||
apt:
|
||||
update_cache: true
|
||||
name:
|
||||
- mailman3-full
|
||||
- nginx
|
||||
- dbconfig-no-thanks
|
||||
- dbconfig-no-thanks # Do not autoconfigure database
|
||||
- postgresql
|
||||
- python3-pip # CAS
|
||||
- python3-lxml # CAS
|
||||
install_recommends: false
|
||||
register: apt_result
|
||||
retries: 3
|
||||
|
@ -15,7 +19,7 @@
|
|||
# You will need to setup postgres
|
||||
# sudo -u postgres createuser -P 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
|
||||
template:
|
||||
src: mailman3/mailman.cfg.j2
|
||||
|
@ -28,7 +32,8 @@
|
|||
# You will need to setup postgres
|
||||
# sudo -u postgres createuser -P 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
|
||||
template:
|
||||
src: mailman3/mailman-web.py.j2
|
||||
|
|
|
@ -30,7 +30,12 @@ MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1')
|
|||
|
||||
# Application definition
|
||||
|
||||
# Add allauth_cas_crans path
|
||||
import sys
|
||||
sys.path.insert(0, "/usr/scripts/mailman")
|
||||
|
||||
INSTALLED_APPS = (
|
||||
'mailman_theme_crans', # override templates
|
||||
'hyperkitty',
|
||||
'postorius',
|
||||
'django_mailman3',
|
||||
|
@ -53,6 +58,8 @@ INSTALLED_APPS = (
|
|||
'allauth',
|
||||
'allauth.account',
|
||||
'allauth.socialaccount',
|
||||
'allauth_cas',
|
||||
'allauth_cas_crans',
|
||||
#'django_mailman3.lib.auth.fedora',
|
||||
#'allauth.socialaccount.providers.openid',
|
||||
#'allauth.socialaccount.providers.github',
|
||||
|
@ -156,6 +163,7 @@ ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https"
|
|||
# Social auth
|
||||
#
|
||||
SOCIALACCOUNT_PROVIDERS = {
|
||||
'crans': {}
|
||||
#'openid': {
|
||||
# 'SERVERS': [
|
||||
# dict(id='yahoo',
|
||||
|
@ -191,3 +199,5 @@ COMPRESS_OFFLINE = True
|
|||
|
||||
POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost/mailman3/'
|
||||
|
||||
# Use Crans SMTP for Django mails
|
||||
EMAIL_HOST = 'smtp.crans.org'
|
||||
|
|
Loading…
Reference in New Issue