You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document provides a comprehensive overview of all environment variables used in the Messages application. These variables are organized by service and functionality.
Development Environment
Environment Files Structure
The application uses a new environment file structure with .defaults and .local files:
*.defaults - Committed default configurations
*.local - Gitignored local overrides (created by make bootstrap)
Available Environment Files
backend.defaults - Main Django application settings
Maximum age in seconds for a message to be eligible for manual retry of failed deliveries (7 days)
Optional
MAX_INCOMING_EMAIL_SIZE
10485760
Maximum size in bytes for incoming email (including attachments and body) (10MB)
Optional
MAX_OUTGOING_ATTACHMENT_SIZE
20971520
Maximum size in bytes for outgoing email attachments (20MB)
Optional
MAX_OUTGOING_BODY_SIZE
5242880
Maximum size in bytes for outgoing email body (text + HTML) (5MB)
Optional
MAX_TEMPLATE_IMAGE_SIZE
2097152
Maximum size in bytes for images embedded in templates and signatures (2MB)
Optional
MAX_RECIPIENTS_PER_MESSAGE
500
Maximum number of recipients per message (to + cc + bcc)
Optional
Model custom attributes schema
Note: Custom attributes are stored in a JSONField (Take a look at User and MailDomain models).
Variable
Default
Description
Required
SCHEMA_CUSTOM_ATTRIBUTES_USER
{}
JSONSchema definition of the User custom attributes
Optional
SCHEMA_CUSTOM_ATTRIBUTES_MAILDOMAIN
{}
JSONSchema definition of the MailDomain custom attributes
Optional
Internationalization
Variable
Default
Description
Required
LANGUAGE_CODE
en-us
Default backend language code
Optional
AI
Variable
Default
Description
Required
AI_BASE_URL
None
Default URL to access AI API endpoint (Albert API)
Optional
AI_API_KEY
None
API Key used for AI features
Optional
AI_MODEL
None
Default model used for AI features
Optional
FEATURE_AI_SUMMARY
False
Default enabled mode for summary AI features
Required
FEATURE_AI_AUTOLABELS
False
Default enabled mode for label AI features
Required
FEATURE_MAILBOX_ADMIN_CHANNELS
``
Comma-separated list of channel types enabled for mailbox admin (e.g., widget,api_key). Empty list disables all channel types.
Optional
Throttling
Outbound message throttling limits the number of external recipients (recipients whose domain is not managed by this instance) that can be sent from a mailbox or maildomain within a time period, using simple fixed time windows.
Variable
Default
Description
Required
THROTTLE_MAILBOX_OUTBOUND_EXTERNAL_RECIPIENTS
None
Rate limit per mailbox. Format: count/period where period is minute, hour, or day. Example: 1000/day limits each mailbox to 1000 external recipients per day.
Optional
THROTTLE_MAILDOMAIN_OUTBOUND_EXTERNAL_RECIPIENTS
None
Rate limit per maildomain. Format: count/period. Example: 10000/day limits each domain to 10000 external recipients per day.
Optional
THROTTLE_AUTOREPLY_PER_SENDER
1/day
Rate limit for autoreplies per sender per mailbox. Format: count/period. Example: 1/day limits each sender to 1 autoreply per day per mailbox.
Optional
Image Proxy
Note: By default IMAGE_PROXY_MAX_SIZE is set to 5MB. We do not encourage to increase this value as
it can lead to memory exhaustion, increase at your own risk.
Variable
Default
Description
Required
IMAGE_PROXY_ENABLED
False
Whether external images should be proxied
Optional
IMAGE_PROXY_MAX_SIZE
5242880 (5MB)
Maximum size in bytes for external images
Optional
IMAGE_PROXY_CACHE_TTL
2592000 (30 days)
Cache TTL in seconds for external images
Optional
Frontend
Variable
Default
Description
Required
FRONTEND_THEME
white-label
Theme for the frontend
Optional
FRONTEND_SILENT_LOGIN_ENABLED
False
Whether silent login is enabled
Optional
Third-party Services
Drive
Variable
Default
Description
Required
DRIVE_BASE_URL
None
Base URL to access Drive endpoints
Optional
DRIVE_APP_NAME
Drive
Name of the Drive application used in the frontend
Optional
Legend
Required: Must be set for the application to function
Dev: Required for development/testing environments
Optional: Has sensible defaults, can be customized
Environment Files
The application uses environment files located in env.d/development/ for different services:
backend.defaults - Main Django application settings