Explaining the content of is part of .gitignore and hence not synced with GitHub. It is used for local development and testing purposes only. The PROD environment uses secrets fetched by the generic settings in software\configurations\ is located in the project folder and is used as the core configuration of a given Automail instance for your local development and testing environment.

General Settings should always extend configurations.base, which includes the generic configurations that apply to all Automail instances.
from configurations.base import *
SERIAL_NUMBER = "20230401-LINEVERGE-AUTOMAIL-LV-TEST" # serial number of the Automail instance used as a reference on the given software licensing agreement
COMPANY_NAME = "ABC Inc." # client company name
VERSION = "v0.1" - instance-specific version number
APPLICATION_NAME = f"Automail DEV {VERSION}" # instance-specific name displayed on the sign-in page
APPLICATION_NAME_SHORT = APPLICATION_NAME # instance-specific short name displayed next to the Lineverge logo on the top left of the site when the left menu is unfolded (maximum 12 characters for optimal display)
DOMAIN = "" # client company website
DESCRIPTION_TEXT = f"This is a testing site of Automail in version {VERSION}..." # notification text displayed on the sign-in page
LOG_FOLDER = r"C:\Lineverge\Staging\staging\Logs" # absolute folder path to store log files (None for local development)
PICKLE_DIR = r"C:\Lineverge\Staging\staging\Pickles" # absolute folder path to store pickles (a pickle is a dataframe stored in a file)
EXPORT_DIR = r"C:\Lineverge\Staging\staging\Exports" # absolute folder path to store files generated through custom backend processes (e.g. export of Costing data into costing.xlsx)
UPLOADS_DIR = r"C:\Lineverge\Staging\staging\Uploads" # absolute folder path for Automail to store files that were uploaded by a users via drag&drop using the Table upload feature
TEMP_DIR = r"C:\Lineverge\Staging\staging\Temp" # absolute folder path for Automail to store temporary files, which are deleted after being served to the user
SECRET_KEY = "52o_21132@!p+84(-hqhy!gi44uoc1*ar70k5ai2(21+!" #
ALLOWED_HOSTS = ["", ""] # domains allowed to run the Automail instance (always put the PROD domain first and then alternative domains, "" is running the application using the development server)
DEBUG = True # debug flag used for development only (in PROD always set to False for security reasons!)
if DEBUG is False: # HTTP to HTTPS redirect
'default': {
'ENGINE': 'django.db.backends.mysql', # database driver
'NAME': 'Automail_LV_Test', # database name
'USER': 'automail', # database user (always set up a dedicated user for Automail called "automail" for consistency)
'PASSWORD': '', # database user password
'HOST': '', # database host ("localhost" for local development)
DBBACKUP_STORAGE_OPTIONS = {"location": r"C:\Lineverge\Staging\Backups"} # Backup folder
# Outbound SendGrid
SENDGRID_APIKEY = "SG..." # API key to send emails using the Sendgrid API
SENDGRID_APIKEY_DELETE_BOUNCE = "SG..." # API key to delete bounced emails in Sendgrid (to avoid Sendgrid blocking the submissions)
SUPPORT_EMAIL_ADDRESS = "[email protected]" # support email address of the client to help supply chain partners
EMAIL_USERNAME = "[email protected]" # email address to send the Automail emails (if using a client email address then the required domain records need to be set to avoid emails falling into SPAM)
SEND_TO_BCC = [] # email addresses to included in BCC for all Automail emails (usually of Lineverge team members)
EMAIL_SUBJECT_BASE = "Automail Notification" # default Automail email subject
EMAIL_GREETINGS = "Dear Supplier," # default Automail email greetings line
<br />
<br />
Best Regards,<br />
ABC Inc.<br />
Supply Chain Team
This is an AI-generated email.
""" # default Automail email signature
# Autoform
AWS_BUCKET = "autoform-test-uploads" # Autoform test bucket
AWS_REGION = "ap-southeast-1" # Autoform test region
AWS_ACCESS_KEY_ID = "AKIA2E5INGHHB26KWJCC" # Autoform test IAM ID for S3 uploads
AWS_SECRET_ACCESS_KEY = "" # Autoform test IAM secret key for S3 uploads
AUTOFORM_TOKEN = "" # Autoform test token
AUTOFORM_DOMAIN = "" # Autoform test domain
CREATECONFIG_ENDPOINT = "" # Autoform create test endpoint
UPDATECONFIG_ENDPOINT = "" # Autoform update test endpoint
LOADCONFIG_ENDPOINT = "" # Autoform load test endpoint

Single Sign-On

Automail has a Single Sign-On (SSO) feature, to allow seamless access to multiple applications and services using a single set of credentials. We use OpenID as our SSO method because it's an open standard that ensures secure user authentication, enabling users to log in using a single digital identity across various websites and applications, reducing the need for multiple passwords and streamlining the user experience.
An IdP, or Identity Provider, is a system that authenticates users and supplies their credentials to other services through a secure connection.
The IdP setup requires to configure [CUSTOM_DOMAIN]/app_authentication/oidc/callback/ (e.g. as callback URI.
To enable SSO, add the following constants to
SSO_AUTHENTICATION = True # To enable SSO within the application
AUTOMAIL_USERNAME_LOGIC = "email" # "email", "email_without_domain"
OIDC_RP_CLIENT_ID = "" # Provided by team managing the IdP
OIDC_RP_CLIENT_SECRET = "" # Provided by team managing the IdP
OIDC_OP_AUTHORIZATION_ENDPOINT = None # (endpoints can be found on IdP - OpenID configuration URL, e.g. "")
OIDC_OP_TOKEN_ENDPOINT = None # (endpoints can be found on IdP - OpenID configuration URL, e.g. "")
OIDC_OP_USER_ENDPOINT = None # (endpoints can be found on IdP - OpenID configuration URL, e.g. "")
OIDC_OP_JWKS_ENDPOINT = None # (endpoints can be found on IdP - OpenID configuration URL, e.g. "")
OIDC_RP_SIGN_ALGO = "HS256" # "HS256", "HS512", "RS256", "HS384"
AUTHENTICATION_BACKENDS = ["axes.backends.AxesBackend", "django.contrib.auth.backends.ModelBackend", "polygon.apps.app_authentication.backends.CustomOIDCAuthenticationBackend"]
MIDDLEWARE = [ "", "django.contrib.sessions.middleware.SessionMiddleware", "django.middleware.common.CommonMiddleware", "django.middleware.csrf.CsrfViewMiddleware", "django.contrib.auth.middleware.AuthenticationMiddleware", "django.contrib.messages.middleware.MessageMiddleware", "django.middleware.clickjacking.XFrameOptionsMiddleware", "password_policies.middleware.PasswordChangeMiddleware", "axes.middleware.AxesMiddleware", "session_security.middleware.SessionSecurityMiddleware", 'polygon.apps.app_authentication.middlewares.DisableAdminLoginMiddleware', "mozilla_django_oidc.middleware.SessionRefresh"]
This will replace the default sign-in page with the SSO button that will redirect users to the IdP authentication page. After successful authentication, the IdP will redirect the users to their authenticated Automail accounts.