Settings

Mailman Web supports following settings.

ADMINS = (('Mailman Suite Admin', 'root@localhost'),)

Default list of admins who receive the emails from error logging.

Default Value:

(('Mailman Suite Admin', 'root@localhost'),)
ALLOWED_HOSTS = ['localhost', '*']

Hosts/domain names that are valid for this site; required if DEBUG is False. See https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts

Default Value:

['localhost', '*']
AUTH_PASSWORD_VALIDATORS = [{'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator'}, {'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator'}, {'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator'}, {'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator'}]

Default password validators.

Default Value:

[{'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator'},
{'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator'},
{'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator'},
{'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator'}]
BASE_DIR = '/home/docs/checkouts/readthedocs.org/user_builds/mailman-web/checkouts/latest/docs'

The base directory for logs and database.

Default Value:

'/home/docs/checkouts/readthedocs.org/user_builds/mailman-web/checkouts/latest/docs'
DATABASES = {'default': {'ENGINE': 'django.db.backends.sqlite3', 'HOST': '', 'NAME': '/home/docs/checkouts/readthedocs.org/user_builds/mailman-web/checkouts/latest/docs/mailman-web.db', 'PORT': ''}}

Default Database to be used.

Default Value:

{'default': {'ENGINE': 'django.db.backends.sqlite3',
            'HOST': '',
            'NAME': '/home/docs/checkouts/readthedocs.org/user_builds/mailman-web/checkouts/latest/docs/mailman-web.db',
            'PORT': ''}}
DEBUG = False

Enable Development Mode.

Default Value:

False
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

The default implementation to send out emails. This can be customized to something else for testing purposes. https://docs.djangoproject.com/en/dev/topics/email/#email-backends

Default Value:

'django.core.mail.backends.smtp.EmailBackend'
INSTALLED_APPS = ['hyperkitty', 'postorius', 'django_mailman3', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'django_gravatar', 'compressor', 'haystack', 'django_extensions', 'django_q', 'allauth', 'allauth.account', 'allauth.socialaccount']

Default list of django applications.

Default Value:

['hyperkitty',
'postorius',
'django_mailman3',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'django_gravatar',
'compressor',
'haystack',
'django_extensions',
'django_q',
'allauth',
'allauth.account',
'allauth.socialaccount']
LANGUAGE_CODE = 'en-us'

Default Language code.

Default Value:

'en-us'
LOGGING = {'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'formatters': {'simple': {'format': '%(levelname)s %(message)s'}, 'verbose': {'format': '%(levelname)s %(asctime)s %(process)d %(name)s %(message)s'}}, 'handlers': {'console': {'class': 'logging.StreamHandler', 'formatter': 'simple'}, 'file': {'class': 'logging.handlers.WatchedFileHandler', 'filename': '/home/docs/checkouts/readthedocs.org/user_builds/mailman-web/checkouts/latest/docs/logs/mailmansuite.log', 'formatter': 'verbose', 'level': 'INFO'}, 'mail_admins': {'class': 'django.utils.log.AdminEmailHandler', 'filters': ['require_debug_false'], 'level': 'ERROR'}}, 'loggers': {'django': {'handlers': ['file'], 'level': 'ERROR', 'propagate': True}, 'django.request': {'handlers': ['mail_admins', 'file'], 'level': 'ERROR', 'propagate': True}, 'hyperkitty': {'handlers': ['file'], 'level': 'DEBUG', 'propagate': True}, 'postorius': {'handlers': ['console', 'file'], 'level': 'INFO'}}, 'version': 1}

Default Logging configuration.

Default Value:

{'disable_existing_loggers': False,
'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}},
'formatters': {'simple': {'format': '%(levelname)s %(message)s'},
               'verbose': {'format': '%(levelname)s %(asctime)s %(process)d '
                                     '%(name)s %(message)s'}},
'handlers': {'console': {'class': 'logging.StreamHandler',
                         'formatter': 'simple'},
             'file': {'class': 'logging.handlers.WatchedFileHandler',
                      'filename': '/home/docs/checkouts/readthedocs.org/user_builds/mailman-web/checkouts/latest/docs/logs/mailmansuite.log',
                      'formatter': 'verbose',
                      'level': 'INFO'},
             'mail_admins': {'class': 'django.utils.log.AdminEmailHandler',
                             'filters': ['require_debug_false'],
                             'level': 'ERROR'}},
'loggers': {'django': {'handlers': ['file'],
                       'level': 'ERROR',
                       'propagate': True},
            'django.request': {'handlers': ['mail_admins', 'file'],
                               'level': 'ERROR',
                               'propagate': True},
            'hyperkitty': {'handlers': ['file'],
                           'level': 'DEBUG',
                           'propagate': True},
            'postorius': {'handlers': ['console', 'file'], 'level': 'INFO'}},
'version': 1}
LOGIN_REDIRECT_URL = 'list_index'

Default Django URL to redirect to after a successful login.

Default Value:

'list_index'
LOGIN_URL = 'account_login'

Default Django URL to redirect to for Login.

Default Value:

'account_login'
LOGOUT_URL = 'account_logout'

Default Django URL to Logout the user.

Default Value:

'account_logout'
MIDDLEWARE = ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', 'django_mailman3.middleware.TimezoneMiddleware', 'postorius.middleware.PostoriusMiddleware')

Default Django Middlewares.

Default Value:

('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
'django_mailman3.middleware.TimezoneMiddleware',
'postorius.middleware.PostoriusMiddleware')
ROOT_URLCONF = 'mailman_web.urls'

URL Configuration for Django

Default Value:

'mailman_web.urls'
SECRET_FILE = '/home/docs/checkouts/readthedocs.org/user_builds/mailman-web/checkouts/latest/docs/secret.txt'

SECRET_FILE contains the secret key to be used for Django’s session and token encryptions.

Default Value:

'/home/docs/checkouts/readthedocs.org/user_builds/mailman-web/checkouts/latest/docs/secret.txt'
SERVER_EMAIL = 'root@localhost.local'

If you enable email reporting for error messages, this is where those emails will appear to be coming from. Make sure you set a valid domain name, otherwise the emails may get rejected. https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-SERVER_EMAIL

Default Value:

'root@localhost.local'
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'

Django 1.6+ defaults to a JSON serializer, but it won’t work with django-openid, see https://bugs.launchpad.net/django-openid-auth/+bug/1252826

Default Value:

'django.contrib.sessions.serializers.PickleSerializer'
SITE_ID = 1

Current Django Site being served. This is used to customize the web host being used to serve the current website. For more details about Django site, see: https://docs.djangoproject.com/en/dev/ref/contrib/sites/

Default Value:

1
STATICFILES_DIRS = ()

Additional locations of static files

Default Value:

()
STATICFILES_FINDERS = ('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 'compressor.finders.CompressorFinder')

List of finder classes that know how to find static files in various locations.

Default Value:

('django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'compressor.finders.CompressorFinder')
STATIC_ROOT = '/home/docs/checkouts/readthedocs.org/user_builds/mailman-web/checkouts/latest/docs/static'

Default path where static files will be placed.

Default Value:

'/home/docs/checkouts/readthedocs.org/user_builds/mailman-web/checkouts/latest/docs/static'
STATIC_URL = '/static/'

URL prefix for static files. Example: “http://example.com/static/”, “http://static.example.com/

Default Value:

'/static/'
TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.i18n', 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.template.context_processors.tz', 'django.template.context_processors.csrf', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'django_mailman3.context_processors.common', 'hyperkitty.context_processors.common', 'postorius.context_processors.postorius']}}]

Default Template finders.

Default Value:

[{'APP_DIRS': True,
 'BACKEND': 'django.template.backends.django.DjangoTemplates',
 'DIRS': [],
 'OPTIONS': {'context_processors': ['django.template.context_processors.debug',
                                    'django.template.context_processors.i18n',
                                    'django.template.context_processors.media',
                                    'django.template.context_processors.static',
                                    'django.template.context_processors.tz',
                                    'django.template.context_processors.csrf',
                                    'django.template.context_processors.request',
                                    'django.contrib.auth.context_processors.auth',
                                    'django.contrib.messages.context_processors.messages',
                                    'django_mailman3.context_processors.common',
                                    'hyperkitty.context_processors.common',
                                    'postorius.context_processors.postorius']}}]
TIME_ZONE = 'UTC'

Default timezone.

Default Value:

'UTC'
USE_I18N = True

Enable internationalization.

Default Value:

True
USE_L10N = True

Enable localization.

Default Value:

True
USE_TZ = True

Use the timezone information.

Default Value:

True
WSGI_APPLICATION = 'mailman_web.wsgi.application'

Wsgi application import path. This will be used by the WSGI server which will be used to deploy this application.

Default Value:

'mailman_web.wsgi.application'
ACCOUNT_DEFAULT_HTTP_PROTOCOL = 'http'

Protocol for URLs generated for authentication, like email confirmation.

Default Value:

'http'
AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend', 'allauth.account.auth_backends.AuthenticationBackend')

Authentication backends for Django to be used.

Default Value:

('django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend')
COMPRESS_OFFLINE = True

On a production setup, setting COMPRESS_OFFLINE to True will bring a significant performance improvement, as CSS files will not need to be recompiled on each requests. It means running an additional “compress” management command after each code upgrade. http://django-compressor.readthedocs.io/en/latest/usage/#offline-compression

Default Value:

True
DEFAULT_FROM_EMAIL = 'postorius@localhost'

Sender in Emails sent out by Postorius.

Default Value:

'postorius@localhost'
DJANGO_SOCIAL_AUTH_PROVERS = []

Enabled Social Authentication Providers that can be used to authenticate with. A full list of providers can be found at https://django-allauth.readthedocs.io/en/latest/providers.html Please also note that extra configuration is required after a provider is enabled. Django-allauth’s documentation mentioned above provides more details about how to configure one. Example:

DJANGO_SOCIAL_AUTH_PROVIDERS = [
    'allauth.socialaccount.providers.openid',
    'django_mailman3.lib.auth.fedora',
    'allauth.socialaccount.providers.github',
    'allauth.socialaccount.providers.gitlab',
    'allauth.socialaccount.providers.google',
    'allauth.socialaccount.providers.facebook',
    'allauth.socialaccount.providers.twitter',
    'allauth.socialaccount.providers.stackexchange',
]

DJANGO_SOCIAL_AUTH``_PROVIDERS are added to ``INSTALLED_APPS, so you don’t need to add them. If you want to disable social login, set this to an empty list [].

Default Value:

[]
FILTER_VHOST = False

Filter visible Mailing Lists based on the current host being used to serve.

Default Value:

False
HAYSTACK_CONNECTIONS = {'default': {'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', 'PATH': 'fulltext_index'}}

Django-Haystack connection parameters.

Default Value:

{'default': {'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
            'PATH': 'fulltext_index'}}
MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1')

Host for Mailman Core, from where Hyperkitty will accept connections for archiving.

Default Value:

('127.0.0.1', '::1')
MAILMAN_ARCHIVER_KEY = 'SecretArchiverAPIKey'

Mailman Core Shared archiving key. This value is set in the : mailman-hyperkitty’s configuration file.

Default Value:

'SecretArchiverAPIKey'
MAILMAN_REST_API_PASS = 'restpass'

Mailman Core API user’s password.

Default Value:

'restpass'
MAILMAN_REST_API_URL = 'http://localhost:8001'

Mailman Core default API Path

Default Value:

'http://localhost:8001'
MAILMAN_REST_API_USER = 'restadmin'

Mailman Core API user

Default Value:

'restadmin'
Q_CLUSTER = {'orm': 'default', 'save_limit': 100, 'timeout': 300}

Django Q connection parameters.

Default Value:

{'orm': 'default', 'save_limit': 100, 'timeout': 300}