--- /dev/null
+# Test Description
+
+Test mime email.body_md5 keyword when suricata.yaml disables it
+Use ``requires`` keyword
+
+## PCAP
+From ../bug-3616-smtp/input.pcap
+
+## Redmine Ticket
+https://redmine.openinfosecfoundation.org/issues/7587
--- /dev/null
+%YAML 1.1
+---
+
+outputs:
+ - eve-log:
+ enabled: yes
+ filetype: regular #regular|syslog|unix_dgram|unix_stream|redis
+ filename: eve.json
+ types:
+ - smtp:
+ extended: yes
+ md5: [body, subject]
+ - alert:
+ smtp: yes
+
+app-layer:
+ protocols:
+ smtp:
+ enabled: yes
+ raw-extraction: no
+ mime:
+ decode-mime: yes
+ decode-base64: yes
+ body-md5: no
--- /dev/null
+alert smtp any any -> any any (msg:"Test mime email body_md5"; requires: keyword email.body_md5; email.body_md5; content:"ed00c81b85fa455d60e19f1230977134"; sid:1;)
--- /dev/null
+requires:
+ min-version: 9
+
+pcap: ../bug-3616-smtp/input.pcap
+
+args:
+ - -k none --set stream.inline=true
+
+checks:
+- filter:
+ count: 0
+ match:
+ event_type: alert
+ alert.signature_id: 1
+- filter:
+ count: 0
+ match:
+ event_type: smtp
+ email.body_md5: "ed00c81b85fa455d60e19f1230977134"
+- filter:
+ count: 2
+ match:
+ event_type: smtp
+# test stdout has Info: detect-requires: Suricata did not meet the rule requirements: Suricata missing a required keyword: keyword email.body_md5 [DetectRequiresSetup:detect-requires.c:38]
\ No newline at end of file
--- /dev/null
+# Test Description
+Test mime email.body_md5 keyword
+
+## PCAP
+From ../bug-3616-smtp/input.pcap
+
+## Redmine Ticket
+https://redmine.openinfosecfoundation.org/issues/7587
\ No newline at end of file
--- /dev/null
+%YAML 1.1
+---
+
+outputs:
+ - eve-log:
+ enabled: yes
+ filetype: regular #regular|syslog|unix_dgram|unix_stream|redis
+ filename: eve.json
+ types:
+ - smtp:
+ extended: yes
+ md5: [body, subject]
+ - alert:
+ smtp: yes
+
+app-layer:
+ protocols:
+ smtp:
+ enabled: yes
+ raw-extraction: no
+ mime:
+ decode-mime: yes
+ decode-base64: yes
+ body-md5: auto
--- /dev/null
+alert smtp any any -> any any (msg:"Test mime email body_md5"; requires: keyword email.body_md5; email.body_md5; content:"ed00c81b85fa455d60e19f1230977134"; sid:1;)
--- /dev/null
+requires:
+ min-version: 9
+
+pcap: ../bug-3616-smtp/input.pcap
+
+args:
+ - -k none --set stream.inline=true
+
+checks:
+- filter:
+ count: 1
+ match:
+ event_type: alert
+ alert.signature_id: 1
+- filter:
+ count: 1
+ match:
+ event_type: smtp
+ email.body_md5: "ed00c81b85fa455d60e19f1230977134"