Email: Implement TLS/SSL
This commit is contained in:
Frank Gadot 2020-05-13 00:39:54 -04:00
parent 41361ce2a2
commit 4a8176f60c
3 changed files with 6 additions and 0 deletions

View File

@ -116,6 +116,8 @@ In order to send email, NetBox needs an email server configured. The following i
* PASSSWORD - Password with which to authenticate * PASSSWORD - Password with which to authenticate
* TIMEOUT - Amount of time to wait for a connection (seconds) * TIMEOUT - Amount of time to wait for a connection (seconds)
* FROM_EMAIL - Sender address for emails sent by NetBox * FROM_EMAIL - Sender address for emails sent by NetBox
* EMAIL_USE_SSL - Server requires SSL connection (default: False)
* EMAIL_USE_TLS - Server requires TLS connection (default: False)
Email is sent from NetBox only for critical events. If you would like to test the email server configuration please use the django function [send_mail()](https://docs.djangoproject.com/en/stable/topics/email/#send-mail): Email is sent from NetBox only for critical events. If you would like to test the email server configuration please use the django function [send_mail()](https://docs.djangoproject.com/en/stable/topics/email/#send-mail):

View File

@ -110,6 +110,8 @@ EMAIL = {
'PASSWORD': '', 'PASSWORD': '',
'TIMEOUT': 10, # seconds 'TIMEOUT': 10, # seconds
'FROM_EMAIL': '', 'FROM_EMAIL': '',
'EMAIL_USE_SSL': False,
'EMAIL_USE_TLS': False,
} }
# Enforcement of unique IP space can be toggled on a per-VRF basis. To enforce unique IP space within the global table # Enforcement of unique IP space can be toggled on a per-VRF basis. To enforce unique IP space within the global table

View File

@ -252,6 +252,8 @@ EMAIL_HOST_PASSWORD = EMAIL.get('PASSWORD')
EMAIL_TIMEOUT = EMAIL.get('TIMEOUT', 10) EMAIL_TIMEOUT = EMAIL.get('TIMEOUT', 10)
SERVER_EMAIL = EMAIL.get('FROM_EMAIL') SERVER_EMAIL = EMAIL.get('FROM_EMAIL')
EMAIL_SUBJECT_PREFIX = '[NetBox] ' EMAIL_SUBJECT_PREFIX = '[NetBox] '
EMAIL_USE_SSL = EMAIL.get('SSL')
EMAIL_USE_TLS = EMAIL.get('TLS')
# #