dataset/seed/mailman/templates/postorius-settings.py

57 lines
2.6 KiB
Python
Raw Normal View History

2022-03-08 19:42:28 +01:00
# -*- coding: utf-8 -*-
SECRET_KEY = '%%postorius_secret_key'
#FIXME same database has mailman?
DATABASES = {
'default' : {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': '%%pg_client_database', # Database name
'USER': '%%pg_client_username', # PostgreSQL username
'PASSWORD': '%%pg_client_password', # PostgreSQL password
'HOST': '%%pg_client_server_domainname', # Database server
'PORT': '', # Database port (leave blank for default)
'CONN_MAX_AGE': 300, # Max database connection age
2022-04-28 21:48:16 +02:00
'OPTIONS': {'sslmode': 'verify-full', 'sslcert': '/etc/pki/tls/certs/postgresql.crt', 'sslkey': '/etc/pki/tls/private/postgresql_postorius.key', 'sslrootcert': '/etc/pki/ca-trust/source/anchors/ca_PostgreSQL.crt'},
2022-03-08 19:42:28 +01:00
}
}
2022-08-18 10:19:43 +02:00
ALLOWED_HOSTS = ['%%{revprox_client_external_domainnames[0]}']
POSTORIUS_TEMPLATE_BASE_URL = 'https://%%{revprox_client_external_domainnames[0]}'
CSRF_TRUSTED_ORIGINS = ['%%{revprox_client_external_domainnames[0]}']
2022-03-08 19:42:28 +01:00
USE_X_FORWARDED_HOST = True
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
LANGUAGE_CODE = 'fr'
STATIC_URL = '/mailman/postorius_static/'
FORCE_SCRIPT_NAME = '/mailman'
EMAIL_HOST = "%%smtp_relay_address"
EMAIL_PORT = 25
EMAIL_HOST_USER = "%%smtp_relay_user@%%ip_eth0"
EMAIL_HOST_PASSWORD = "%%smtp_relay_password"
EMAIL_USE_TLS = True
DEFAULT_FROM_EMAIL = '%%mailman_mail_owner'
EMAIL_SUBJECT_PREFIX = '[Django] '
SERVER_EMAIL = '%%mailman_mail_owner'
SOCIALACCOUNT_EMAIL_VERIFICATION = 'none'
SOCIALACCOUNT_PROVIDERS = {
'risotto': {
'LEMONLDAP_NAME': 'Authentification centralisée',
'LEMONLDAP_URL': 'https://%%oauth2_server_domainname',
'LEMONLDAP_LOCAL_URL': 'https://%%oauth2_client_server_domainname',
'ACCOUNT_EMAIL_REQUIRED': True,
'ACCOUNT_UNIQUE_EMAIL': True,
'ACCOUNT_USERNAME_REQUIRED': False,
'ACCOUNT_AUTHENTICATION_METHOD': 'email',
'SOCIALACCOUNT_AUTO_SIGNUP': True,
2022-03-20 21:14:13 +01:00
'VERIFIED_EMAIL': True,
2022-03-08 19:42:28 +01:00
},
}
#FIXME
## This goes in /etc/cron.d/mailman
#
#@hourly mailman /opt/mailman/venv/bin/mailman-web runjobs hourly
#@daily mailman /opt/mailman/venv/bin/mailman-web runjobs daily
#@weekly mailman /opt/mailman/venv/bin/mailman-web runjobs weekly
#@monthly mailman /opt/mailman/venv/bin/mailman-web runjobs monthly
#@yearly mailman /opt/mailman/venv/bin/mailman-web runjobs yearly
#* * * * * mailman /opt/mailman/venv/bin/mailman-web runjobs minutely
#2,17,32,47 * * * * mailman /opt/mailman/venv/bin/mailman-web runjobs quarter_hourly