Welcome to Mailman Web’s documentation!
Mailman 3 web is an umbrella Django project that combines all the web
components of Mailman 3 into a single project that can be installed with a
single command mailman-web
instead of different Django commands.
Install
To install mailman-web
using pip
run the following command:
$ pip install mailman-web
Settings
Mailman Web can be customized using a configuration file at
/etc/mailman3/settings.py
. You can change the path to configuration path by
changing MAILMAN_WEB_CONFIG
environment variable.
You can start with a simple configuration file:
# Mailman Web configuration file.
# /etc/mailman3/settings.py
from mailman_web.settings.base import * # noqa: F403
from mailman_web.settings.mailman import * # noqa: F403
#: Default list of admins who receive the emails from error logging.
ADMINS = (
('Mailman Suite Admin', 'root@localhost'),
)
# Postgresql database setup.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'mailmanweb',
'USER': '<db_username>',
'PASSWORD': '<password>',
'HOST': 'localhost',
'PORT': '5432',
}
}
# 'collectstatic' command will copy all the static files here.
# Alias this location from your webserver to `/static`
STATIC_ROOT = '/opt/mailman/web/static'
# Make sure that this directory is created or Django will fail on start.
LOGGING['handlers']['file']['filename'] = '/opt/mailman/web/logs/mailmanweb.log' # noqa: F405,E501
#: See https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = [
"localhost", # Archiving API from Mailman, keep it.
# "lists.your-domain.org",
# Add here all production domains you have.
]
#: 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/
SITE_ID = 1
SECRET_KEY = 'MyVerrySecretKey'
You can see a list of all the default configurations supported:
- Settings
ADMINS
ALLOWED_HOSTS
AUTH_PASSWORD_VALIDATORS
BASE_DIR
DATABASES
DEBUG
EMAIL_BACKEND
INSTALLED_APPS
LANGUAGE_CODE
LOGGING
LOGIN_REDIRECT_URL
LOGIN_URL
LOGOUT_URL
MIDDLEWARE
ROOT_URLCONF
SERVER_EMAIL
SITE_ID
STATICFILES_DIRS
STATICFILES_FINDERS
STATIC_ROOT
STATIC_URL
TEMPLATES
TIME_ZONE
USE_I18N
USE_L10N
USE_TZ
WSGI_APPLICATION
ACCOUNT_AUTHENTICATION_METHOD
ACCOUNT_DEFAULT_HTTP_PROTOCOL
AUTHENTICATION_BACKENDS
COMPRESS_OFFLINE
COMPRESS_PRECOMPILERS
DEFAULT_FROM_EMAIL
FILTER_VHOST
HAYSTACK_CONNECTIONS
HYPERKITTY_ENABLE_GRAVATAR
MAILMAN_ARCHIVER_FROM
MAILMAN_ARCHIVER_KEY
MAILMAN_REST_API_PASS
MAILMAN_REST_API_URL
MAILMAN_REST_API_USER
POSTORIUS_TEMPLATE_BASE_URL
Q_CLUSTER
SOCIALACCOUNT_PROVIDERS
Usage
To run Django’s development server, you can try:
$ mailman-web migrate
$ mailman-web runserver
Important Links
Issue Tracker: https://gitlab.com/mailman/mailman-web/issues
Documentation: https://mailman-web.readthedocs.io/
Mailman Suite: https://docs.mailman3.org/
Mailman Project: https://list.org