dataset/seed/applicationservice/2022.03.08/mailman/templates/postorius-settings.py
2022-03-08 19:42:28 +01:00

54 lines
2.3 KiB
Python

# -*- 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
}
}
ALLOWED_HOSTS = ['%%revprox_client_external_domainname']
POSTORIUS_TEMPLATE_BASE_URL = 'https://%%revprox_client_external_domainname'
CSRF_TRUSTED_ORIGINS = ['%%revprox_client_external_domainname']
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,
},
}
#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