This module is part of fhe FIR. It allows FIR to send emails.
This module is always enabled (even if not included in enabled_apps.txt
). It however need to be configured before being able to send emails.
Follow the Django docs: Django email backend.
You at least need to configure the following settings:
# SMTP server (required, string)
EMAIL_HOST = "smtp.server.com"
# SMTP server (required, int)
EMAIL_PORT = 25
# Sender (required, string)
EMAIL_FROM = '"NAME" <name@domain>'
You can force FIR to add CC and BCC recipients by configuring these settings:
EMAIL_CC = ['cc@example.com',]
EMAIL_BCC = ['bcc@example.com',]
To send signed/encrypted emails with S/MIME to users, install and configure django-djembe and add it in your installed_apps.txt.
The following configuration example from the Djembe Readme can help you:
(fir-env)$ pip install -r fir_email/requirements_smime.txt
(fir-env)$ python manage.py migrate djembe
In $FIR_HOME/fir/config/installed_app.txt, add:
djembe
Change your email backend in your settings:
EMAIL_BACKEND = 'djembe.backends.EncryptingSMTPBackend'
To use a cipher other than the default AES-256, specify it in your settings DJEMBE_CIPHER
:
DJEMBE_CIPHER = 'des_ede3_cbc' # triple DES
The intersection of M2Crypto's ciphers and RFC 3851 are:
des_ede3_cbc
(required by the RFC)aes_128_cbc
(recommended, not required, by the RFC)aes_192_cbc
(recommended, not required, by the RFC)aes_256_cbc
(recommended, not required, by the RFC)rc2_40_cbc
(RFC requires support, but it's weak -- don't use it)
RFC 5751 requires AES-128, and indicates that higher key lengths are of course the future. It marks tripleDES with "SHOULD-", meaning it's on its way out.
To create signed email, in the admin site (Djembe > Identities), supply both a certificate and a private key which must not have a passphrase, with an Address
that is the same as your setting EMAIL_FROM
. Any mail sent from this Identity's address will be signed with the private key.
User certificates will be added from the user profile in FIR (Set S/MIME certificate).