The Setting File

The settings file is required to set basic option for your Inboxen instance. It contains some secret information such as the secret_key, you should ensure the permissions are set correctly and also that this file is kept safe as without it sessions, cookie storage and along with other things rely on this will not work 0.

The Inboxen settings file can be located in several places on a system, it will use the first one it finds. Inboxen looks for the files in this order:

  1. The path specified in the environment variable: INBOXEN_CONFIG

  2. ~/.config/inboxen/settings.ini

  3. settings.ini (inside the base directory of the Inboxen project)

If you’re familiar with Django and would like to use your own settings module, you can set DJANGO_SETTINGS_MODULE in the usual way 1.

Minimum Development Configuration

To hit the ground running, the minimum you need to setup a development instance is:

[general]
secret_key = something-secret
debug = true

Options

general

secret_key

This is used as the global salt for cryptographic signing throughout Inboxen. This is security sensitive and should be generated using a random number generator. It’s strongly suggested you use at least 50 characters of numbers, both case characters and symbols from a high entropy source.

admin_names & admin_email

These are a list of names and emails of the admins. Both lists must be the same length and must be in the same order. If I were to have two admins for example, both lists would have to be two items long:

[general]
admin_names = Bill, Ted
admin_emails = bill@example.org, ted@example.org

This is used whenever Inboxen needs to notify administrators. E.g. when there’s an error.

allowed_hosts

This is a list of domains and/or IPs that Django will serve Inboxen on. There is support for wildcards, the syntax of which can be found in the Django documentation.

debug

Default value: False

Enabling this puts Inboxen into debug mode, this should never be used in a production environment as it exposes the state of some calls in Inboxen including the settings file. This should be used when developing on Inboxen as it allows for tracebacks to be displayed instead of emailed and disables allowed_hosts checking.

enable_registration

Default value: False

A boolean flag which controls if the Inboxen instance permits registration, if disabled the site will not allow new users to be created through the public facing site and disables the links to the registration page.

login_attempt_cooloff

Default value: 10

This is the time in minutes that the user is prevented from trying to login after a number of failed login attempts. The value should be an integer measured in minutes.

login_attempt_limit

Default value: 5

This is the number of times people can attempt to login before receiving a cool down (the amount of time for the cool down is dictated by login_attempt_cooloff).

register_limit_window

Default value: 1440

Window of time in minutes that the register rate-limit will use to calculate if have been too many registrations from one IP address. For example, if register_limit_window is 60 and register_limit_count is 5, then there will be limited to 5 registrations every hour.

register_limit_count

Default value: 100

Maximum number of registrations from a single IP address over register_limit_window minutes.

language_code

Default value: en-gb

This specifies the language code that is used as a fallback when one can’t be detected by Django’s locale middleware (or if the middleware is disabled). This should be set to a standard language ID format 2.

static_root

Default value: static_content

This specifies where the directory is for serving static files. Django will use this directory to place static files when using:

python manage.py collectstatic

meida_root

Default value: media_content

This specifies where the directory is for uploading media via the CMS. It should be writable by the Django app.

server_email

Default value: django@localhost

The email the server uses when sending emails.

site_name

Default value: LazyAdmin.com’s Inboxen

The name of the site as displayed in page titles.

time_zone

Default value: UTC

The timezone used for the site, this is used for example when storing dates in the database.

per_user_email_quota

Default value: 0

If not 0, this is the maximum number of emails a user can have before they need to delete some. This deletion can be done automatically if the user prefers.

Inbox

inbox_length

Default value: 5

The number of characters of the local portion of the email, For example, in the email “pineapple@inboxen.org” the local portion is “pineapple” and the length would be 9 characters.

inbox_limit_window

Default value: 1440

Window of time in minutes that the inbox rate-limit will use to calculate if a user is creating too many inboxes. For example, if inbox_limit_window is 60 and inbox_limit_count is 5, then a user will be limited to creating 5 inboxes every hour.

inbox_limit_count

Default value: 100

Maximum number of inboxes can be created by a single user over inbox_limit_window minutes.

Tasks

broker_url

Default value: amqp://guest:guest@localhost:5672//

The URL that celery will look at to find tasks and to store results.

concurrency

Default value: 3

The number of celery processes to start

liberation

path

Specifies the path where to store the liberation data. This needs to be kept secure as it will contain user data.

sendfile_method

Default value: simple

Which method should be used to accelerate liberation data downloads.

database

name

Default value: inboxen

The name of the database.

user

User used when connecting to PostgreSQL.

password

The password used when connecting to PostgreSQL.

host

The host name or IP address to connect to for PostgreSQL.

port

The port to connect to for PostgreSQL.

Cache

backend

Default value: file

This is the caching backend for Inboxen, this could be one of a number of supported backends:

Backend

Description

database

Uses your configured database

file

Uses the file system

memcached

Uses Memcache

N.B: You will need to install “pylibmc” if you want to use the memcached

backend.

timeout

Default value: 300

The number of seconds before a cache entry is considered stale.