From cacbab512d4102e6db19c6487c4d291006dd0fda Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Fri, 21 Nov 2014 11:02:46 -0500 Subject: Initial commit. --- t/fixtures/bar | 14 ++++++++++++++ t/fixtures/foo | 14 ++++++++++++++ t/fixtures/foo.expected | 14 ++++++++++++++ t/fixtures/foo2 | 14 ++++++++++++++ t/fixtures/foo2.expected | 14 ++++++++++++++ t/fixtures/multiple | 15 +++++++++++++++ t/fixtures/multiple.expected | 15 +++++++++++++++ t/fixtures/nosubj | 13 +++++++++++++ t/fixtures/nosubj.expected | 14 ++++++++++++++ t/fixtures/sample.conf | 6 ++++++ t/fixtures/wrongdomain | 14 ++++++++++++++ t/fixtures/wrongdomain.expected | 14 ++++++++++++++ 12 files changed, 161 insertions(+) create mode 100644 t/fixtures/bar create mode 100644 t/fixtures/foo create mode 100644 t/fixtures/foo.expected create mode 100644 t/fixtures/foo2 create mode 100644 t/fixtures/foo2.expected create mode 100644 t/fixtures/multiple create mode 100644 t/fixtures/multiple.expected create mode 100644 t/fixtures/nosubj create mode 100644 t/fixtures/nosubj.expected create mode 100644 t/fixtures/sample.conf create mode 100644 t/fixtures/wrongdomain create mode 100644 t/fixtures/wrongdomain.expected (limited to 't/fixtures') diff --git a/t/fixtures/bar b/t/fixtures/bar new file mode 100644 index 0000000..fd600a6 --- /dev/null +++ b/t/fixtures/bar @@ -0,0 +1,14 @@ +Return-Path: +Delivered-To: spamcat@example.com +Received: from mta.example.com + by mta.example.com (Dovecot) with LMTP id 9DDcI25oblTvgAEAQc1eRg + for ; Thu, 20 Nov 2014 17:17:18 -0500 +Received: by mta.example.com (Postfix, from userid 1001) + id 844956F1EE; Thu, 20 Nov 2014 17:17:18 -0500 (EST) +To: bar@spamcat.example.com +Subject: test +Message-Id: +Date: Thu, 20 Nov 2014 17:17:18 -0500 (EST) +From: sender@example.com (Spamcat Sender) + +Sample email. diff --git a/t/fixtures/foo b/t/fixtures/foo new file mode 100644 index 0000000..6365fab --- /dev/null +++ b/t/fixtures/foo @@ -0,0 +1,14 @@ +Return-Path: +Delivered-To: spamcat@example.com +Received: from mta.example.com + by mta.example.com (Dovecot) with LMTP id 9DDcI25oblTvgAEAQc1eRg + for ; Thu, 20 Nov 2014 17:17:18 -0500 +Received: by mta.example.com (Postfix, from userid 1001) + id 844956F1EE; Thu, 20 Nov 2014 17:17:18 -0500 (EST) +To: foo@spamcat.example.com +Subject: test +Message-Id: +Date: Thu, 20 Nov 2014 17:17:18 -0500 (EST) +From: sender@example.com (Spamcat Sender) + +Sample email. diff --git a/t/fixtures/foo.expected b/t/fixtures/foo.expected new file mode 100644 index 0000000..9da87a9 --- /dev/null +++ b/t/fixtures/foo.expected @@ -0,0 +1,14 @@ +Return-Path: +Delivered-To: spamcat@example.com +Received: from mta.example.com + by mta.example.com (Dovecot) with LMTP id 9DDcI25oblTvgAEAQc1eRg + for ; Thu, 20 Nov 2014 17:17:18 -0500 +Received: by mta.example.com (Postfix, from userid 1001) + id 844956F1EE; Thu, 20 Nov 2014 17:17:18 -0500 (EST) +To: foo@spamcat.example.com +Subject: test - [18/20] +Message-Id: +Date: Thu, 20 Nov 2014 17:17:18 -0500 (EST) +From: sender@example.com (Spamcat Sender) + +Sample email. diff --git a/t/fixtures/foo2 b/t/fixtures/foo2 new file mode 100644 index 0000000..1696186 --- /dev/null +++ b/t/fixtures/foo2 @@ -0,0 +1,14 @@ +Return-Path: +Delivered-To: spamcat@example.com +Received: from mta.example.com + by mta.example.com (Dovecot) with LMTP id 9DDcI25oblTvgAEAQc1eRg + for ; Thu, 20 Nov 2014 17:17:18 -0500 +Received: by mta.example.com (Postfix, from userid 1001) + id 844956F1EE; Thu, 20 Nov 2014 17:17:18 -0500 (EST) +To: foo@spamcat2.example.com +Subject: test +Message-Id: +Date: Thu, 20 Nov 2014 17:17:18 -0500 (EST) +From: sender@example.com (Spamcat Sender) + +Sample email. diff --git a/t/fixtures/foo2.expected b/t/fixtures/foo2.expected new file mode 100644 index 0000000..e4d9335 --- /dev/null +++ b/t/fixtures/foo2.expected @@ -0,0 +1,14 @@ +Return-Path: +Delivered-To: spamcat@example.com +Received: from mta.example.com + by mta.example.com (Dovecot) with LMTP id 9DDcI25oblTvgAEAQc1eRg + for ; Thu, 20 Nov 2014 17:17:18 -0500 +Received: by mta.example.com (Postfix, from userid 1001) + id 844956F1EE; Thu, 20 Nov 2014 17:17:18 -0500 (EST) +To: foo@spamcat2.example.com +Subject: test - [17/20] +Message-Id: +Date: Thu, 20 Nov 2014 17:17:18 -0500 (EST) +From: sender@example.com (Spamcat Sender) + +Sample email. diff --git a/t/fixtures/multiple b/t/fixtures/multiple new file mode 100644 index 0000000..2da9b27 --- /dev/null +++ b/t/fixtures/multiple @@ -0,0 +1,15 @@ +Return-Path: +Delivered-To: spamcat@example.com +Received: from mta.example.com + by mta.example.com (Dovecot) with LMTP id 9DDcI25oblTvgAEAQc1eRg + for ; Thu, 20 Nov 2014 17:17:18 -0500 +Received: by mta.example.com (Postfix, from userid 1001) + id 844956F1EE; Thu, 20 Nov 2014 17:17:18 -0500 (EST) +To: name1@spamcat.example.com, "Someone else" , + foo@wrongdomain.example.com +Subject: test +Message-Id: +Date: Thu, 20 Nov 2014 17:17:18 -0500 (EST) +From: sender@example.com (Spamcat Sender) + +Sample email. diff --git a/t/fixtures/multiple.expected b/t/fixtures/multiple.expected new file mode 100644 index 0000000..d5c17a5 --- /dev/null +++ b/t/fixtures/multiple.expected @@ -0,0 +1,15 @@ +Return-Path: +Delivered-To: spamcat@example.com +Received: from mta.example.com + by mta.example.com (Dovecot) with LMTP id 9DDcI25oblTvgAEAQc1eRg + for ; Thu, 20 Nov 2014 17:17:18 -0500 +Received: by mta.example.com (Postfix, from userid 1001) + id 844956F1EE; Thu, 20 Nov 2014 17:17:18 -0500 (EST) +To: name1@spamcat.example.com, "Someone else" , + foo@wrongdomain.example.com +Subject: test - [20/20] +Message-Id: +Date: Thu, 20 Nov 2014 17:17:18 -0500 (EST) +From: sender@example.com (Spamcat Sender) + +Sample email. diff --git a/t/fixtures/nosubj b/t/fixtures/nosubj new file mode 100644 index 0000000..3a58556 --- /dev/null +++ b/t/fixtures/nosubj @@ -0,0 +1,13 @@ +Return-Path: +Delivered-To: spamcat@example.com +Received: from mta.example.com + by mta.example.com (Dovecot) with LMTP id 9DDcI25oblTvgAEAQc1eRg + for ; Thu, 20 Nov 2014 17:17:18 -0500 +Received: by mta.example.com (Postfix, from userid 1001) + id 844956F1EE; Thu, 20 Nov 2014 17:17:18 -0500 (EST) +To: nosubj@spamcat.example.com +Message-Id: +Date: Thu, 20 Nov 2014 17:17:18 -0500 (EST) +From: sender@example.com (Spamcat Sender) + +Sample email. diff --git a/t/fixtures/nosubj.expected b/t/fixtures/nosubj.expected new file mode 100644 index 0000000..94db30e --- /dev/null +++ b/t/fixtures/nosubj.expected @@ -0,0 +1,14 @@ +Return-Path: +Delivered-To: spamcat@example.com +Received: from mta.example.com + by mta.example.com (Dovecot) with LMTP id 9DDcI25oblTvgAEAQc1eRg + for ; Thu, 20 Nov 2014 17:17:18 -0500 +Received: by mta.example.com (Postfix, from userid 1001) + id 844956F1EE; Thu, 20 Nov 2014 17:17:18 -0500 (EST) +To: nosubj@spamcat.example.com +Message-Id: +Date: Thu, 20 Nov 2014 17:17:18 -0500 (EST) +From: sender@example.com (Spamcat Sender) +Subject: [20/20] + +Sample email. diff --git a/t/fixtures/sample.conf b/t/fixtures/sample.conf new file mode 100644 index 0000000..e0d644b --- /dev/null +++ b/t/fixtures/sample.conf @@ -0,0 +1,6 @@ +# Comments and newlines are ignored. + +DBPATH=/tmp/spamcat.sqlite3 # So should most whitespace and inline comments. +DEFAULT_COUNT =10 # Make sure key=val doesn't work in comments +DELIVER= t/delivert # by saying DEFAULT_COUNT=8 +DOMAINS = spamcat.example.com, spamcat2.example.com spamcat3 diff --git a/t/fixtures/wrongdomain b/t/fixtures/wrongdomain new file mode 100644 index 0000000..a65cb0f --- /dev/null +++ b/t/fixtures/wrongdomain @@ -0,0 +1,14 @@ +Return-Path: +Delivered-To: spamcat@example.com +Received: from mta.example.com + by mta.example.com (Dovecot) with LMTP id 9DDcI25oblTvgAEAQc1eRg + for ; Thu, 20 Nov 2014 17:17:18 -0500 +Received: by mta.example.com (Postfix, from userid 1001) + id 844956F1EE; Thu, 20 Nov 2014 17:17:18 -0500 (EST) +To: bar@wrongdomain.example.com +Subject: test +Message-Id: +Date: Thu, 20 Nov 2014 17:17:18 -0500 (EST) +From: sender@example.com (Spamcat Sender) + +Sample email. diff --git a/t/fixtures/wrongdomain.expected b/t/fixtures/wrongdomain.expected new file mode 100644 index 0000000..a65cb0f --- /dev/null +++ b/t/fixtures/wrongdomain.expected @@ -0,0 +1,14 @@ +Return-Path: +Delivered-To: spamcat@example.com +Received: from mta.example.com + by mta.example.com (Dovecot) with LMTP id 9DDcI25oblTvgAEAQc1eRg + for ; Thu, 20 Nov 2014 17:17:18 -0500 +Received: by mta.example.com (Postfix, from userid 1001) + id 844956F1EE; Thu, 20 Nov 2014 17:17:18 -0500 (EST) +To: bar@wrongdomain.example.com +Subject: test +Message-Id: +Date: Thu, 20 Nov 2014 17:17:18 -0500 (EST) +From: sender@example.com (Spamcat Sender) + +Sample email. -- cgit v1.2.3