ph10 2004/12/20 11:13:56 GMT
Added files:
exim-test-orig/AutoTest/confs 598
exim-test-orig/AutoTest/log 598
exim-test-orig/AutoTest/mail 598.ph10
exim-test-orig/AutoTest/scripts 598
exim-test-orig/AutoTest/stdout 598
Log:
Test 598 does some very basic testing of the Exiscan features.
Revision Changes Path
1.1 +82 -0 exim/exim-test-orig/AutoTest/confs/598 (new)
1.1 +15 -0 exim/exim-test-orig/AutoTest/log/598 (new)
1.1 +250 -0 exim/exim-test-orig/AutoTest/mail/598.ph10 (new)
1.1 +119 -0 exim/exim-test-orig/AutoTest/scripts/598 (new)
1.1 +51 -0 exim/exim-test-orig/AutoTest/stdout/598 (new)
Index: 598
====================================================================
# Exim test configuration 598
# Macros are set externally in order to get the path
# of the Exim that is being tested, and the directory
# in which the test data lives.
exim_path = EXIM_PATH
primary_hostname = myhost.test.ex
spool_directory = DIR/spool
# ----- Main settings -----
acl_smtp_rcpt = check_rcpt
acl_smtp_data = check_data
acl_smtp_mime = check_mime
# ----- ACL -----
begin acl
check_rcpt:
accept
check_data:
warn spam = nobody
message = X-is-spam: classified as spam
warn message = X-Spam_score: $spam_score\n\
X-Spam_score_int: $spam_score_int\n\
X-Spam_bar: $spam_bar\n\
X-Spam_report: $spam_report
warn message = X-Regex: Regex matched
regex = THIS REGEX
warn condition = ${if !eq{$h_fakereject:}{}}
control = fakereject
accept
check_mime:
warn decode = default
message = X-$mime_part_count-content-type: $mime_content_type\n\
X-$mime_part_count-filename: $mime_filename\n\
X-$mime_part_count-charset: $mime_charset\n\
X-$mime_part_count-boundary: $mime_boundary\n\
X-$mime_part_count-content-disposition: $mime_content_disposition\n\
X-$mime_part_count-content-transfer-encoding: $mime_content_transfer_encoding\n\
X-$mime_part_count-content-id: $mime_content_id\n\
X-$mime_part_count-content-description: $mime_content_description\n\
X-$mime_part_count-is-multipart: $mime_is_multipart\n\
X-$mime_part_count-is-coverletter: $mime_is_coverletter\n\
X-$mime_part_count-is-rfc822: $mime_is_rfc822\n\
X-$mime_part_count-decode-filename: $mime_decoded_filename\n\
X-$mime_part_count-content-size: $mime_content_size
accept
# ----- Routers -----
begin routers
r1:
driver = accept
transport = t1
headers_add = X-Router-SSint: $spam_score_int
# ----- Transports -----
begin transports
t1:
driver = appendfile
file = DIR/test-mail/$local_part
user = CALLER
# End
Index: 598
====================================================================
1999-03-02 09:44:33 10HmaX-0005vi-00 <= ph10@??? U=ph10 P=local-esmtp S=986
1999-03-02 09:44:33 10HmaX-0005vi-00 => ph10 <ph10@???> R=r1 T=t1
1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
1999-03-02 09:44:33 10HmaY-0005vi-00 <= ph10@??? U=ph10 P=local-esmtp S=1048 id=41C2F849.3060203@???
1999-03-02 09:44:33 10HmaY-0005vi-00 => ph10 <ph10@???> R=r1 T=t1
1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
1999-03-02 09:44:33 10HmaZ-0005vi-00 <= ph10@??? U=ph10 P=local-esmtp S=1466 id=abcde
1999-03-02 09:44:33 10HmaZ-0005vi-00 => ph10 <ph10@???> R=r1 T=t1
1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
1999-03-02 09:44:33 10HmbA-0005vi-00 <= ph10@??? U=ph10 P=local-esmtp S=1164 id=41C2F849.3060203@???
1999-03-02 09:44:33 10HmbA-0005vi-00 => ph10 <ph10@???> R=r1 T=t1
1999-03-02 09:44:33 10HmbA-0005vi-00 Completed
1999-03-02 09:44:33 10HmbB-0005vi-00 <= ph10@??? U=ph10 P=local-esmtp S=4312 id=20041217133501.GA3058@???
1999-03-02 09:44:33 10HmbB-0005vi-00 => ph10 <ph10@???> R=r1 T=t1
1999-03-02 09:44:33 10HmbB-0005vi-00 Completed
Index: 598.ph10
====================================================================
From ph10@??? Tue Mar 02 09:44:33 1999
Received: from ph10 (helo=test.ex)
by myhost.test.ex with local-esmtp (Exim x.yz)
id 10HmaX-0005vi-00
for ph10@???; Tue, 2 Mar 1999 09:44:33 +0000
Message-Id: <E10HmaX-0005vi-00@???>
From: Philip Hazel <ph10@???>
Date: Tue, 2 Mar 1999 09:44:33 +0000
X-Spam_score: 0.9
X-Spam_score_int: 9
X-Spam_bar: /
X-Spam_report: Spam detection software, running on the system "xoanon.csi.cam.ac.uk", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or block
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: A message without any headers. [...]
Content analysis details: (0.9 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
0.9 FROM_ENDS_IN_NUMS From: ends in numbers
X-Router-SSint: 9
A message without any headers.
From ph10@??? Tue Mar 02 09:44:33 1999
Received: from ph10 (helo=test.ex)
by myhost.test.ex with local-esmtp (Exim x.yz)
id 10HmaY-0005vi-00
for ph10@???; Tue, 2 Mar 1999 09:44:33 +0000
From: Test person <tp@???>
To: Me <ph10@???>
Subject: A real test message
Date: Tue, 2 Mar 1999 09:44:33 +0000
Message-ID: <41C2F849.3060203@???>
Sender: Philip Hazel <ph10@???>
X-Spam_score: 0.0
X-Spam_score_int: 0
X-Spam_bar: /
X-Spam_report: Spam detection software, running on the system "xoanon.csi.cam.ac.uk", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or block
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: OK, this should look like a genuine message. [...]
Content analysis details: (0.0 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
X-Router-SSint: 0
OK, this should look like a genuine message.
From ph10@??? Tue Mar 02 09:44:33 1999
Received: from ph10 (helo=test.ex)
by myhost.test.ex with local-esmtp (Exim x.yz)
id 10HmaZ-0005vi-00
for ph10@???; Tue, 2 Mar 1999 09:44:33 +0000
From: 99Junk99@???
To:
Subject: MAKE MONEY FAST!!!!
Message-id: abcde
Sender: Philip Hazel <ph10@???>
Date: Tue, 2 Mar 1999 09:44:33 +0000
X-is-spam: classified as spam
X-Spam_score: 6.7
X-Spam_score_int: 67
X-Spam_bar: ++++++
X-Spam_report: Spam detection software, running on the system "xoanon.csi.cam.ac.uk", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or block
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: This should be enough to trip the threshold. [...]
Content analysis details: (6.7 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
0.3 FROM_HAS_MIXED_NUMS From: contains numbers mixed in with letters
0.3 NO_REAL_NAME From: does not include a real name
0.9 FROM_ENDS_IN_NUMS From: ends in numbers
1.6 FROM_STARTS_WITH_NUMS From: starts with nums
0.6 SUBJ_ALL_CAPS Subject is all capitals
1.8 INVALID_MSGID Message-Id is not valid, according to RFC 2822
1.3 PLING_PLING Subject has lots of exclamation marks
X-Router-SSint: 67
This should be enough to trip the threshold.
From ph10@??? Tue Mar 02 09:44:33 1999
Received: from ph10 (helo=test.ex)
by myhost.test.ex with local-esmtp (Exim x.yz)
id 10HmbA-0005vi-00
for ph10@???; Tue, 2 Mar 1999 09:44:33 +0000
From: Test person <tp@???>
To: Me <ph10@???>
Subject: A real test message
Date: Tue, 2 Mar 1999 09:44:33 +0000
Message-ID: <41C2F849.3060203@???>
FakeReject: test fakereject
Sender: Philip Hazel <ph10@???>
X-Spam_score: 0.0
X-Spam_score_int: 0
X-Spam_bar: /
X-Spam_report: Spam detection software, running on the system "xoanon.csi.cam.ac.uk", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or block
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: OK, this should look like a genuine message, but it
will trip on THIS REGEX. [...]
Content analysis details: (0.0 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
X-Regex: Regex matched
X-Router-SSint: 0
OK, this should look like a genuine message, but
it will trip on THIS REGEX.
From ph10@??? Tue Mar 02 09:44:33 1999
Received: from ph10 (helo=test.ex)
by myhost.test.ex with local-esmtp (Exim x.yz)
id 10HmbB-0005vi-00
for ph10@???; Tue, 2 Mar 1999 09:44:33 +0000
Date: Tue, 2 Mar 1999 09:44:33 +0000
From: J Caesar <eximusers@???>
To: exim-users@???
Message-ID: <20041217133501.GA3058@???>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="T4sUOijqQbZv57TR"
Content-Disposition: inline
Subject: [exim] Re: Bug#286074: eximstats: uses message count as data for
the "volume" charts
X-BeenThere: exim-users@???
X-Mailman-Version: 2.1.5
Precedence: list
Sender: Philip Hazel <ph10@???>
X-0-content-type: multipart/mixed
X-0-filename:
X-0-charset:
X-0-boundary: T4sUOijqQbZv57TR
X-0-content-disposition: inline
X-0-content-transfer-encoding:
X-0-content-id:
X-0-content-description:
X-0-is-multipart: 1
X-0-is-coverletter: 1
X-0-is-rfc822: 0
X-0-decode-filename: /source/exim4/AutoTest/spool/scan/10HmbB-0005vi-00/10HmbB-0005vi-00-00000
X-0-content-size: 2
X-1-content-type: text/plain
X-1-filename:
X-1-charset: us-ascii
X-1-boundary:
X-1-content-disposition: inline
X-1-content-transfer-encoding:
X-1-content-id:
X-1-content-description:
X-1-is-multipart: 0
X-1-is-coverletter: 1
X-1-is-rfc822: 0
X-1-decode-filename: /source/exim4/AutoTest/spool/scan/10HmbB-0005vi-00/10HmbB-0005vi-00-00001
X-1-content-size: 1
X-2-content-type: text/plain
X-2-filename: working-patch
X-2-charset: us-ascii
X-2-boundary:
X-2-content-disposition: attachment
X-2-content-transfer-encoding:
X-2-content-id:
X-2-content-description:
X-2-is-multipart: 0
X-2-is-coverletter: 0
X-2-is-rfc822: 0
X-2-decode-filename: /source/exim4/AutoTest/spool/scan/10HmbB-0005vi-00/10HmbB-0005vi-00-00002
X-2-content-size: 1
X-3-content-type: text/plain
X-3-filename:
X-3-charset: us-ascii
X-3-boundary:
X-3-content-disposition: inline
X-3-content-transfer-encoding: 7bit
X-3-content-id:
X-3-content-description:
X-3-is-multipart: 0
X-3-is-coverletter: 0
X-3-is-rfc822: 0
X-3-decode-filename: /source/exim4/AutoTest/spool/scan/10HmbB-0005vi-00/10HmbB-0005vi-00-00003
X-3-content-size: 1
X-Spam_score: 1.1
X-Spam_score_int: 11
X-Spam_bar: +
X-Spam_report: Spam detection software, running on the system "xoanon.csi.cam.ac.uk", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or block
similar future email. If you have any questions, see
the administrator of that system for details.
Content preview: There was a part of the patch missing, complete one is
attached. sorry for wasting your time --- /usr/sbin/eximstats
2004-12-17 13:36:44.381983753 +0100 +++ eximstats 2004-12-17
13:47:37.763185260 +0100 @@ -1107,11 +1107,11 @@ if (scalar
@chartdatanames < $ntopchart) { push(@chartdatanames, $key); -
push(@chartdatavals, $$m_count{$key}); + push(@chartdatavals,
$$m_data{$key}); } else { - $chartotherval += $$m_count{$key}; +
$chartotherval += $$m_data{$key}; } } push(@chartdatanames, "Other");
[...]
Content analysis details: (1.1 points, 5.0 required)
pts rule name description
---- ---------------------- --------------------------------------------------
1.1 NO_DNS_FOR_FROM Domain in From header has no MX or A DNS records
X-Router-SSint: 11
--T4sUOijqQbZv57TR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
There was a part of the patch missing, complete one is attached.
sorry for wasting your time
--T4sUOijqQbZv57TR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=working-patch
--- /usr/sbin/eximstats 2004-12-17 13:36:44.381983753 +0100
+++ eximstats 2004-12-17 13:47:37.763185260 +0100
@@ -1107,11 +1107,11 @@
if (scalar @chartdatanames < $ntopchart)
{
push(@chartdatanames, $key);
- push(@chartdatavals, $$m_count{$key});
+ push(@chartdatavals, $$m_data{$key});
}
else
{
- $chartotherval += $$m_count{$key};
+ $chartotherval += $$m_data{$key};
}
}
push(@chartdatanames, "Other");
--T4sUOijqQbZv57TR
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--
## List details at
http://www.exim.org/mailman/listinfo/exim-users Exim details at
http://www.exim.org/ ##
--T4sUOijqQbZv57TR--
Index: 598
====================================================================
0 Basic exiscan feature tests
exim -odi -bs
ehlo test.ex
mail from:<>
rcpt to:<ph10@???>
data
A message without any headers.
.
quit
****
0
exim -odi -bs
ehlo test.ex
mail from:<>
rcpt to:<ph10@???>
data
From: Test person <tp@???>
To: Me <ph10@???>
Subject: A real test message
Date: Fri, 17 Dec 2004 16:13:04 +0100
Message-ID: <41C2F849.3060203@???>
OK, this should look like a genuine message.
.
quit
****
0
exim -odi -bs
ehlo test.ex
mail from:<>
rcpt to:<ph10@???>
data
From: 99Junk99@???
To:
Subject: MAKE MONEY FAST!!!!
Message-id: abcde
This should be enough to trip the threshold.
.
quit
****
0
exim -odi -bs
ehlo test.ex
mail from:<>
rcpt to:<ph10@???>
data
From: Test person <tp@???>
To: Me <ph10@???>
Subject: A real test message
Date: Fri, 17 Dec 2004 16:13:04 +0100
Message-ID: <41C2F849.3060203@???>
FakeReject: test fakereject
OK, this should look like a genuine message, but
it will trip on THIS REGEX.
.
quit
****
0
exim -odi -bs
ehlo test.ex
mail from:<>
rcpt to:<ph10@???>
data
Date: Fri, 17 Dec 2004 14:35:01 +0100
From: J Caesar <eximusers@???>
To: exim-users@???
Message-ID: <20041217133501.GA3058@???>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="T4sUOijqQbZv57TR"
Content-Disposition: inline
Subject: [exim] Re: Bug#286074: eximstats: uses message count as data for
the "volume" charts
X-BeenThere: exim-users@???
X-Mailman-Version: 2.1.5
Precedence: list
--T4sUOijqQbZv57TR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
There was a part of the patch missing, complete one is attached.
sorry for wasting your time
--T4sUOijqQbZv57TR
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=working-patch
--- /usr/sbin/eximstats 2004-12-17 13:36:44.381983753 +0100
+++ eximstats 2004-12-17 13:47:37.763185260 +0100
@@ -1107,11 +1107,11 @@
if (scalar @chartdatanames < $ntopchart)
{
push(@chartdatanames, $key);
- push(@chartdatavals, $$m_count{$key});
+ push(@chartdatavals, $$m_data{$key});
}
else
{
- $chartotherval += $$m_count{$key};
+ $chartotherval += $$m_data{$key};
}
}
push(@chartdatanames, "Other");
--T4sUOijqQbZv57TR
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--
## List details at
http://www.exim.org/mailman/listinfo/exim-users Exim details at
http://www.exim.org/ ##
--T4sUOijqQbZv57TR--
.
quit
****
Index: 598
====================================================================
220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
250-myhost.test.ex Hello ph10 at test.ex
250-SIZE 52428800
250-PIPELINING
250 HELP
250 OK
250 Accepted
354 Enter message, ending with "." on a line by itself
250 OK id=10HmaX-0005vi-00
221 myhost.test.ex closing connection
220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
250-myhost.test.ex Hello ph10 at test.ex
250-SIZE 52428800
250-PIPELINING
250 HELP
250 OK
250 Accepted
354 Enter message, ending with "." on a line by itself
250 OK id=10HmaY-0005vi-00
221 myhost.test.ex closing connection
220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
250-myhost.test.ex Hello ph10 at test.ex
250-SIZE 52428800
250-PIPELINING
250 HELP
250 OK
250 Accepted
354 Enter message, ending with "." on a line by itself
250 OK id=10HmaZ-0005vi-00
221 myhost.test.ex closing connection
220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
250-myhost.test.ex Hello ph10 at test.ex
250-SIZE 52428800
250-PIPELINING
250 HELP
250 OK
250 Accepted
354 Enter message, ending with "." on a line by itself
550-Your message has been rejected but is being kept for evaluation.
550 If it was a legit message, it may still be delivered to the target recipient(s).
221 myhost.test.ex closing connection
220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
250-myhost.test.ex Hello ph10 at test.ex
250-SIZE 52428800
250-PIPELINING
250 HELP
250 OK
250 Accepted
354 Enter message, ending with "." on a line by itself
250 OK id=10HmbB-0005vi-00
221 myhost.test.ex closing connection