· 7 years ago · Mar 22, 2018, 09:40 AM
1# This file is imported by the Mailman Suite. It is used to override
2# the default settings from /usr/share/mailman3-suite/settings.py.
3
4# SECURITY WARNING: keep the secret key used in production secret!
5SECRET_KEY = 'MnnFJdu+EOCljn4hTf30Q6dA3MlGGJb+tMO40b/39fUT0ptO'
6
7ADMINS = (
8 ('Mailman Suite Admin', 'root@localhost'),
9)
10
11# Hosts/domain names that are valid for this site; required if DEBUG is False
12# See https://docs.djangoproject.com/en/1.8/ref/settings/#allowed-hosts
13# Set to '*' per default in the Deian package to allow all hostnames. Mailman3
14# is meant to run behind a webserver reverse proxy anyway.
15ALLOWED_HOSTS = [
16 #"localhost", # Archiving API from Mailman, keep it.
17 # "lists.your-domain.org",
18 # Add here all production URLs you may have.
19 '*'
20]
21
22# Mailman API credentials
23MAILMAN_REST_API_URL = 'http://localhost:8001'
24MAILMAN_REST_API_USER = 'restadmin'
25MAILMAN_REST_API_PASS = 'GCBztTr6M233SK2aDF6urnPIAs48Y3BPoR+6YMa7hlCQstBk'
26MAILMAN_ARCHIVER_KEY = 'Psku5FgReVywrWmyI5YIbmwVKTJKfJcF'
27MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1')
28
29# Application definition
30
31INSTALLED_APPS = (
32 'hyperkitty',
33 'postorius',
34 'django_mailman3',
35 # Uncomment the next line to enable the admin:
36 'django.contrib.admin',
37 # Uncomment the next line to enable admin documentation:
38 # 'django.contrib.admindocs',
39 'django.contrib.auth',
40 'django.contrib.contenttypes',
41 'django.contrib.sessions',
42 'django.contrib.sites',
43 'django.contrib.messages',
44 'django.contrib.staticfiles',
45 'rest_framework',
46 'django_gravatar',
47 'paintstore',
48 'compressor',
49 'haystack',
50 'django_extensions',
51 'django_q',
52 'allauth',
53 'allauth.account',
54 'allauth.socialaccount',
55 'django_mailman3.lib.auth.fedora',
56 #'allauth.socialaccount.providers.openid',
57 #'allauth.socialaccount.providers.github',
58 #'allauth.socialaccount.providers.gitlab',
59 #'allauth.socialaccount.providers.google',
60 #'allauth.socialaccount.providers.facebook',
61 #'allauth.socialaccount.providers.twitter',
62 #'allauth.socialaccount.providers.stackexchange',
63)
64
65
66# Database
67# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
68
69DATABASES = {
70 'default': {
71 # Use 'sqlite3', 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
72 #'ENGINE': 'django.db.backends.sqlite3',
73 #'ENGINE': 'django.db.backends.postgresql_psycopg2',
74 #'ENGINE': 'django.db.backends.mysql',
75 # DB name or path to database file if using sqlite3.
76 'NAME': 'mailman3suite',
77 # The following settings are not used with sqlite3:
78 'USER': 'mailman3suite',
79 'PASSWORD': '',
80 # HOST: empty for localhost through domain sockets or '127.0.0.1' for
81 # localhost through TCP.
82 'HOST': 'localhost',
83 # PORT: set to empty string for default.
84 'PORT': '',
85 # OPTIONS: Extra parameters to use when connecting to the database.
86 'OPTIONS': {
87 # Set sql_mode to 'STRICT_TRANS_TABLES' for MySQL. See
88 # https://docs.djangoproject.com/en/1.11/ref/
89 # databases/#setting-sql-mode
90 #'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
91 },
92 }
93}
94
95
96# If you're behind a proxy, use the X-Forwarded-Host header
97# See https://docs.djangoproject.com/en/1.8/ref/settings/#use-x-forwarded-host
98USE_X_FORWARDED_HOST = True
99
100# And if your proxy does your SSL encoding for you, set SECURE_PROXY_SSL_HEADER
101# https://docs.djangoproject.com/en/1.8/ref/settings/#secure-proxy-ssl-header
102# SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
103# SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_SCHEME', 'https')
104
105# Other security settings
106# SECURE_SSL_REDIRECT = True
107# If you set SECURE_SSL_REDIRECT to True, make sure the SECURE_REDIRECT_EXEMPT
108# contains at least this line:
109# SECURE_REDIRECT_EXEMPT = [
110# "archives/api/mailman/.*", # Request from Mailman.
111# ]
112# SESSION_COOKIE_SECURE = True
113# SECURE_CONTENT_TYPE_NOSNIFF = True
114# SECURE_BROWSER_XSS_FILTER = True
115# CSRF_COOKIE_SECURE = True
116# CSRF_COOKIE_HTTPONLY = True
117# X_FRAME_OPTIONS = 'DENY'
118
119
120# Internationalization
121# https://docs.djangoproject.com/en/1.8/topics/i18n/
122
123LANGUAGE_CODE = 'en-us'
124
125TIME_ZONE = 'UTC'
126
127USE_I18N = True
128USE_L10N = True
129USE_TZ = True
130
131
132# Set default domain for email addresses.
133EMAILNAME = 'mail.ffnw.de'
134
135# If you enable internal authentication, this is the address that the emails
136# will appear to be coming from. Make sure you set a valid domain name,
137# otherwise the emails may get rejected.
138# https://docs.djangoproject.com/en/1.8/ref/settings/#default-from-email
139# DEFAULT_FROM_EMAIL = "mailing-lists@you-domain.org"
140DEFAULT_FROM_EMAIL = 'postorius@{}'.format(EMAILNAME)
141
142# If you enable email reporting for error messages, this is where those emails
143# will appear to be coming from. Make sure you set a valid domain name,
144# otherwise the emails may get rejected.
145# https://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-SERVER_EMAIL
146# SERVER_EMAIL = 'root@your-domain.org'
147SERVER_EMAIL = 'root@{}'.format(EMAILNAME)
148
149
150# Django Allauth
151ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https"
152
153
154#
155# Social auth
156#
157SOCIALACCOUNT_PROVIDERS = {
158 #'openid': {
159 # 'SERVERS': [
160 # dict(id='yahoo',
161 # name='Yahoo',
162 # openid_url='http://me.yahoo.com'),
163 # ],
164 #},
165 #'google': {
166 # 'SCOPE': ['profile', 'email'],
167 # 'AUTH_PARAMS': {'access_type': 'online'},
168 #},
169 #'facebook': {
170 # 'METHOD': 'oauth2',
171 # 'SCOPE': ['email'],
172 # 'FIELDS': [
173 # 'email',
174 # 'name',
175 # 'first_name',
176 # 'last_name',
177 # 'locale',
178 # 'timezone',
179 # ],
180 # 'VERSION': 'v2.4',
181 #},
182}