]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
smtp: basic smtp test showing filter and stats check
authorJason Ish <ish@unx.ca>
Wed, 20 Dec 2017 23:03:53 +0000 (17:03 -0600)
committerJason Ish <ish@unx.ca>
Wed, 20 Dec 2017 23:03:53 +0000 (17:03 -0600)
tests/smtp/input.pcap [new file with mode: 0644]
tests/smtp/test.yaml [new file with mode: 0644]

diff --git a/tests/smtp/input.pcap b/tests/smtp/input.pcap
new file mode 100644 (file)
index 0000000..931b43b
Binary files /dev/null and b/tests/smtp/input.pcap differ
diff --git a/tests/smtp/test.yaml b/tests/smtp/test.yaml
new file mode 100644 (file)
index 0000000..58589f2
--- /dev/null
@@ -0,0 +1,16 @@
+checks:
+
+  # Check that there is only one SMTP event with specific parameters.
+  - filter:
+      count: 1
+      match:
+        event_type: smtp
+        smtp.mail_from: <gurpartap@patriots.in>
+        smtp.rcpt_to[0]: <raj_deol2002in@yahoo.co.in>
+        
+  # Check the stats. A stats check is a specialization of a filter
+  # that only checks the last stats entry.
+  - stats:
+      decoder.pkts: 60
+      decoder.bytes: 26866
+      decoder.invalid: 0