From c3a5fb7032c4cc4efc2d7835166329a59bbabbc3 Mon Sep 17 00:00:00 2001 From: Mkiukaji <28403172+Mkiukaji@users.noreply.github.com> Date: Fri, 9 Feb 2018 13:35:55 -0800 Subject: [PATCH] Update __init__.py During initial setup and baseline, emails for every alert are overwhelming. Perhaps starting with the "New Sweet Security Alert" email.emailUser line commented out would allow for baselining, then remove comment once normalized/tuned. Would be fine as-is for an on-prem smtp server, but not so much for gmail, etc. --- apache/flask/webapp/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apache/flask/webapp/__init__.py b/apache/flask/webapp/__init__.py index 1586e28..9f69a26 100644 --- a/apache/flask/webapp/__init__.py +++ b/apache/flask/webapp/__init__.py @@ -1131,7 +1131,8 @@ def alertAdd(): internalDeviceInfo={} alertInfo['mac'] = 'system' es.write(esService, alertInfo, 'sweet_security_alerts', 'alerts') - email.emailUser(mail,"New Sweet Security Alert",recipient,alertMessage) + # Uncomment line below after include ALL alerts in email config + #email.emailUser(mail,"New Sweet Security Alert",recipient,alertMessage) return jsonify(status='200',alertType=alertType,alertMessage=alertMessage,logInfo=logInfo,internalDeviceInfo=internalDeviceInfo) @app.route('/alerts')