]> git.ipfire.org Git - suricata-reporter.git/commitdiff
reporter: Add the alert severity to the email headers
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 3 Sep 2025 10:21:46 +0000 (10:21 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 3 Sep 2025 10:21:46 +0000 (10:21 +0000)
That way, we can create filter rules that perform certain actions
depending on the value.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/suricata-reporter.in

index 3d0c1c328437eee42bfd2985b9a246fc2e9399e1..f4aa886b0046a537f6c2f6d81ac55ac4dc137ca8 100644 (file)
@@ -416,6 +416,9 @@ class Worker(threading.Thread):
                # Generate a Message ID
                msg.add_header("Message-ID", email.utils.make_msgid())
 
+               # Add the severity as a header for email filtering
+               msg.add_header("X-Alert-Severity", "%s" % event.alert_severity)
+
                # Compose the content
                content = [
                        _("To whom it may concern,"),