[exim-cvs] cvs commit: exim/exim-test-orig/AutoTest/confs 59…

Góra strony
Delete this message
Reply to this message
Autor: Philip Hazel
Data:  
Dla: exim-cvs
Temat: [exim-cvs] cvs commit: exim/exim-test-orig/AutoTest/confs 598 614 exim/exim-test-orig/AutoTest/log 598 exim/exim-test-orig/AutoTest/mail 598.ph10 exim/exim-test-orig/AutoTest/scripts 598 614 exim/e
ph10 2005/05/24 11:34:12 BST

  Modified 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 
  Added files:
    exim-test-orig/AutoTest/confs 614 
    exim-test-orig/AutoTest/scripts 614 
    exim-test-orig/AutoTest/stderr 614 
    exim-test-orig/AutoTest/stdout 614 
  Log:
  Add a test for fakedefer and some simple tests for ratelimit.


  Revision  Changes    Path
  1.4       +3 -0      exim/exim-test-orig/AutoTest/confs/598
  1.1       +41 -0     exim/exim-test-orig/AutoTest/confs/614 (new)
  1.8       +3 -0      exim/exim-test-orig/AutoTest/log/598
  1.8       +33 -0     exim/exim-test-orig/AutoTest/mail/598.ph10
  1.4       +18 -0     exim/exim-test-orig/AutoTest/scripts/598
  1.1       +52 -0     exim/exim-test-orig/AutoTest/scripts/614 (new)
  1.1       +171 -0    exim/exim-test-orig/AutoTest/stderr/614 (new)
  1.3       +11 -0     exim/exim-test-orig/AutoTest/stdout/598
  1.1       +77 -0     exim/exim-test-orig/AutoTest/stdout/614 (new)


Index: 614
====================================================================
# Exim test configuration 614

RRATELIMIT=0/1h
DRATELIMIT=0/1h/per_byte

# 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
qualify_domain = test.ex


# ----- ACL -----

begin acl

  check_rcpt:
      warn  ratelimit = RRATELIMIT
            log_message = RCPT: \
                          sender_rate=$sender_rate \
                          sender_rate_limit=$sender_rate_limit \
                          sender_rate_period=$sender_rate_period
      accept


  check_data:
      warn  ratelimit = DRATELIMIT                        
            log_message = DATA: \
                          sender_rate=$sender_rate \
                          sender_rate_limit=$sender_rate_limit \
                          sender_rate_period=$sender_rate_period
      deny


# End

  Index: 598
  ===================================================================
  RCS file: /home/cvs/exim/exim-test-orig/AutoTest/confs/598,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- 598    4 Apr 2005 10:33:49 -0000    1.3
  +++ 598    24 May 2005 10:34:11 -0000    1.4
  @@ -40,6 +40,9 @@
     warn     condition = ${if !eq{$h_fakereject:}{}}
              control   = fakereject 


  +  warn     condition = ${if !eq{$h_fakedefer:}{}}
  +           control   = fakedefer 
  +              
     accept 


check_mime:

  Index: 598
  ===================================================================
  RCS file: /home/cvs/exim/exim-test-orig/AutoTest/log/598,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- 598    3 May 2005 14:20:01 -0000    1.7
  +++ 598    24 May 2005 10:34:11 -0000    1.8
  @@ -19,3 +19,6 @@
   1999-03-02 09:44:33 10HmbD-0005vi-00 <= ph10@??? U=ph10 P=local S=4362 id=20041217133501.GA3058@???
   1999-03-02 09:44:33 10HmbD-0005vi-00 => ph10 <ph10@???> R=r1 T=t1
   1999-03-02 09:44:33 10HmbD-0005vi-00 Completed
  +1999-03-02 09:44:33 10HmbE-0005vi-00 <= ph10@??? U=ph10 P=local-esmtp S=1312 id=41C2F849.3060203@???
  +1999-03-02 09:44:33 10HmbE-0005vi-00 => ph10 <ph10@???> R=r1 T=t1
  +1999-03-02 09:44:33 10HmbE-0005vi-00 Completed


  Index: 598.ph10
  ===================================================================
  RCS file: /home/cvs/exim/exim-test-orig/AutoTest/mail/598.ph10,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- 598.ph10    3 May 2005 14:20:01 -0000    1.7
  +++ 598.ph10    24 May 2005 10:34:11 -0000    1.8
  @@ -413,3 +413,36 @@


--T4sUOijqQbZv57TR--

  +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 10HmbE-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@???>
  +FakeDefer: test fakedefer
  +Sender: Philip Hazel <ph10@???>
  +X-Spam_score: -1.7
  +X-Spam_score_int: -16
  +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 label
  +    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:   (-1.7 points, 5.0 required)
  +    pts rule name              description
  +    ---- ---------------------- --------------------------------------------------
  +    1.1 DATE_IN_PAST_96_XX     Date: is 96 hours or more before Received: date
  +    -2.8 ALL_TRUSTED            Did not pass through any untrusted hosts
  +X-Regex: Regex matched
  +X-Router-SSint: -16
  +
  +OK, this should look like a genuine message, but
  +it will trip on THIS REGEX.
  +


  Index: 614
  ====================================================================
  0 Simple ACL ratelimit test
  exim -bh 10.9.8.7
  ehlo test.ex
  mail from:<>
  rcpt to:<a@b>
  data
  Here is some data.
  .
  quit
  ****               
  0
  exim -bh 10.9.8.7
  ehlo test.ex
  mail from:<>
  rcpt to:<a@b>
  data
  Here is some data.
  .
  quit
  ****               
  0
  exim -bh 10.9.8.7 -DRRATELIMIT=0/1h/per_conn -DDRATELIMIT=0/1h/per_conn
  ehlo test.ex
  mail from:<>
  rcpt to:<a@b>
  data
  Here is some data.
  .
  quit
  ****               
  0
  exim -bh 10.9.8.7 -DRRATELIMIT=0/1h/per_conn -DDRATELIMIT=0/1h/per_conn
  ehlo test.ex
  mail from:<>
  rcpt to:<a@b>
  data
  Here is some data.
  .
  quit
  ****               
  0
  exim -bh 10.9.8.7 -DRRATELIMIT=0/1h/per_rcpt -DDRATELIMIT=0/1h/per_conn
  ehlo test.ex
  mail from:<>
  rcpt to:<a@b>
  rcpt to:<b@c>
  rcpt to:<e@f>
  data
  Here is some data.
  .
  quit
  ****               


  Index: 598
  ===================================================================
  RCS file: /home/cvs/exim/exim-test-orig/AutoTest/scripts/598,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- 598    4 Apr 2005 10:33:49 -0000    1.3
  +++ 598    24 May 2005 10:34:12 -0000    1.4
  @@ -178,3 +178,21 @@


--T4sUOijqQbZv57TR--
****
+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@???>
+FakeDefer: test fakedefer
+
+OK, this should look like a genuine message, but
+it will trip on THIS REGEX.
+.
+quit
+****

Index: 614
====================================================================
>>> host in hosts_connection_nolog? no (option unset)
>>> host in host_lookup? no (option unset)
>>> host in host_reject_connection? no (option unset)
>>> host in sender_unqualified_hosts? no (option unset)
>>> host in recipient_unqualified_hosts? no (option unset)
>>> host in helo_verify_hosts? no (option unset)
>>> host in helo_try_verify_hosts? no (option unset)
>>> host in helo_accept_junk_hosts? no (option unset)
>>> test.ex in helo_lookup_domains? no (end of list)
>>> host in pipelining_advertise_hosts? yes (matched "*")
>>> host in tls_advertise_hosts? no (option unset)
>>> using ACL "check_rcpt"
>>> processing "warn"
>>> check ratelimit = 0/1h
>>> ratelimit condition limit=0 period=3600 key=0/1h / 10.9.8.7
>>> ratelimit initializing new key's data
>>> ratelimit computed rate 0.0
>>> warn: condition test failed
>>> processing "accept"
>>> accept: condition test succeeded
>>> host in ignore_fromline_hosts? no (option unset)
>>> using ACL "check_data"
>>> processing "warn"
>>> check ratelimit = 0/1h/per_byte
>>> ratelimit condition limit=0 period=3600 key=0/1h/per_byte / 10.9.8.7
>>> ratelimit initializing new key's data
>>> ratelimit computed rate 0.0
>>> warn: condition test failed
>>> processing "deny"
>>> deny: condition test succeeded

LOG: 10HmaX-0005vi-00 H=(test.ex) [10.9.8.7] F=<> rejected after DATA
>>> host in hosts_connection_nolog? no (option unset)
>>> host in host_lookup? no (option unset)
>>> host in host_reject_connection? no (option unset)
>>> host in sender_unqualified_hosts? no (option unset)
>>> host in recipient_unqualified_hosts? no (option unset)
>>> host in helo_verify_hosts? no (option unset)
>>> host in helo_try_verify_hosts? no (option unset)
>>> host in helo_accept_junk_hosts? no (option unset)
>>> test.ex in helo_lookup_domains? no (end of list)
>>> host in pipelining_advertise_hosts? yes (matched "*")
>>> host in tls_advertise_hosts? no (option unset)
>>> using ACL "check_rcpt"
>>> processing "warn"
>>> check ratelimit = 0/1h
>>> ratelimit condition limit=0 period=3600 key=0/1h / 10.9.8.7
>>> ratelimit computed rate 1.0
>>> warn: condition test succeeded

LOG: H=(test.ex) [10.9.8.7] Warning: RCPT: sender_rate=1.0 sender_rate_limit=0 sender_rate_period=1h
>>> processing "accept"
>>> accept: condition test succeeded
>>> host in ignore_fromline_hosts? no (option unset)
>>> using ACL "check_data"
>>> processing "warn"
>>> check ratelimit = 0/1h/per_byte
>>> ratelimit condition limit=0 period=3600 key=0/1h/per_byte / 10.9.8.7
>>> ratelimit computed rate 19.0
>>> warn: condition test succeeded

LOG: 10HmaY-0005vi-00 H=(test.ex) [10.9.8.7] Warning: DATA: sender_rate=19.0 sender_rate_limit=0 sender_rate_period=1h
>>> processing "deny"
>>> deny: condition test succeeded

LOG: 10HmaY-0005vi-00 H=(test.ex) [10.9.8.7] F=<> rejected after DATA
>>> host in hosts_connection_nolog? no (option unset)
>>> host in host_lookup? no (option unset)
>>> host in host_reject_connection? no (option unset)
>>> host in sender_unqualified_hosts? no (option unset)
>>> host in recipient_unqualified_hosts? no (option unset)
>>> host in helo_verify_hosts? no (option unset)
>>> host in helo_try_verify_hosts? no (option unset)
>>> host in helo_accept_junk_hosts? no (option unset)
>>> test.ex in helo_lookup_domains? no (end of list)
>>> host in pipelining_advertise_hosts? yes (matched "*")
>>> host in tls_advertise_hosts? no (option unset)
>>> using ACL "check_rcpt"
>>> processing "warn"
>>> check ratelimit = 0/1h/per_conn
>>> ratelimit condition limit=0 period=3600 key=0/1h/per_conn / 10.9.8.7
>>> ratelimit initializing new key's data
>>> ratelimit computed rate 0.0
>>> warn: condition test failed
>>> processing "accept"
>>> accept: condition test succeeded
>>> host in ignore_fromline_hosts? no (option unset)
>>> using ACL "check_data"
>>> processing "warn"
>>> check ratelimit = 0/1h/per_conn
>>> ratelimit condition limit=0 period=3600 key=0/1h/per_conn / 10.9.8.7
>>> ratelimit found pre-computed rate 0.0
>>> warn: condition test failed
>>> processing "deny"
>>> deny: condition test succeeded

LOG: 10HmaZ-0005vi-00 H=(test.ex) [10.9.8.7] F=<> rejected after DATA
>>> host in hosts_connection_nolog? no (option unset)
>>> host in host_lookup? no (option unset)
>>> host in host_reject_connection? no (option unset)
>>> host in sender_unqualified_hosts? no (option unset)
>>> host in recipient_unqualified_hosts? no (option unset)
>>> host in helo_verify_hosts? no (option unset)
>>> host in helo_try_verify_hosts? no (option unset)
>>> host in helo_accept_junk_hosts? no (option unset)
>>> test.ex in helo_lookup_domains? no (end of list)
>>> host in pipelining_advertise_hosts? yes (matched "*")
>>> host in tls_advertise_hosts? no (option unset)
>>> using ACL "check_rcpt"
>>> processing "warn"
>>> check ratelimit = 0/1h/per_conn
>>> ratelimit condition limit=0 period=3600 key=0/1h/per_conn / 10.9.8.7
>>> ratelimit computed rate 1.0
>>> warn: condition test succeeded

LOG: H=(test.ex) [10.9.8.7] Warning: RCPT: sender_rate=1.0 sender_rate_limit=0 sender_rate_period=1h
>>> processing "accept"
>>> accept: condition test succeeded
>>> host in ignore_fromline_hosts? no (option unset)
>>> using ACL "check_data"
>>> processing "warn"
>>> check ratelimit = 0/1h/per_conn
>>> ratelimit condition limit=0 period=3600 key=0/1h/per_conn / 10.9.8.7
>>> ratelimit found pre-computed rate 1.0
>>> warn: condition test succeeded

LOG: 10HmbA-0005vi-00 H=(test.ex) [10.9.8.7] Warning: DATA: sender_rate=1.0 sender_rate_limit=0 sender_rate_period=1h
>>> processing "deny"
>>> deny: condition test succeeded

LOG: 10HmbA-0005vi-00 H=(test.ex) [10.9.8.7] F=<> rejected after DATA
>>> host in hosts_connection_nolog? no (option unset)
>>> host in host_lookup? no (option unset)
>>> host in host_reject_connection? no (option unset)
>>> host in sender_unqualified_hosts? no (option unset)
>>> host in recipient_unqualified_hosts? no (option unset)
>>> host in helo_verify_hosts? no (option unset)
>>> host in helo_try_verify_hosts? no (option unset)
>>> host in helo_accept_junk_hosts? no (option unset)
>>> test.ex in helo_lookup_domains? no (end of list)
>>> host in pipelining_advertise_hosts? yes (matched "*")
>>> host in tls_advertise_hosts? no (option unset)
>>> using ACL "check_rcpt"
>>> processing "warn"
>>> check ratelimit = 0/1h/per_rcpt
>>> ratelimit condition limit=0 period=3600 key=0/1h/per_rcpt / 10.9.8.7
>>> ratelimit initializing new key's data
>>> ratelimit computed rate 0.0
>>> warn: condition test failed
>>> processing "accept"
>>> accept: condition test succeeded
>>> using ACL "check_rcpt"
>>> processing "warn"
>>> check ratelimit = 0/1h/per_rcpt
>>> ratelimit condition limit=0 period=3600 key=0/1h/per_rcpt / 10.9.8.7
>>> ratelimit computed rate 1.0
>>> warn: condition test succeeded

LOG: H=(test.ex) [10.9.8.7] Warning: RCPT: sender_rate=1.0 sender_rate_limit=0 sender_rate_period=1h
>>> processing "accept"
>>> accept: condition test succeeded
>>> using ACL "check_rcpt"
>>> processing "warn"
>>> check ratelimit = 0/1h/per_rcpt
>>> ratelimit condition limit=0 period=3600 key=0/1h/per_rcpt / 10.9.8.7
>>> ratelimit computed rate 1.0
>>> warn: condition test succeeded
>>> processing "accept"
>>> accept: condition test succeeded
>>> host in ignore_fromline_hosts? no (option unset)
>>> using ACL "check_data"
>>> processing "warn"
>>> check ratelimit = 0/1h/per_conn
>>> ratelimit condition limit=0 period=3600 key=0/1h/per_conn / 10.9.8.7
>>> ratelimit computed rate 1.0
>>> warn: condition test succeeded

LOG: 10HmbB-0005vi-00 H=(test.ex) [10.9.8.7] Warning: DATA: sender_rate=1.0 sender_rate_limit=0 sender_rate_period=1h
>>> processing "deny"
>>> deny: condition test succeeded

LOG: 10HmbB-0005vi-00 H=(test.ex) [10.9.8.7] F=<> rejected after DATA

Index: 614
====================================================================

**** SMTP testing session as if from host 10.9.8.7
**** but without any ident (RFC 1413) callback.
**** This is not for real!

220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
250-myhost.test.ex Hello test.ex [10.9.8.7]
250-SIZE 52428800
250-PIPELINING
250 HELP
250 OK
250 Accepted
354 Enter message, ending with "." on a line by itself
550 Administrative prohibition
221 myhost.test.ex closing connection

**** SMTP testing session as if from host 10.9.8.7
**** but without any ident (RFC 1413) callback.
**** This is not for real!

220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
250-myhost.test.ex Hello test.ex [10.9.8.7]
250-SIZE 52428800
250-PIPELINING
250 HELP
250 OK
250 Accepted
354 Enter message, ending with "." on a line by itself
550 Administrative prohibition
221 myhost.test.ex closing connection

**** SMTP testing session as if from host 10.9.8.7
**** but without any ident (RFC 1413) callback.
**** This is not for real!

220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
250-myhost.test.ex Hello test.ex [10.9.8.7]
250-SIZE 52428800
250-PIPELINING
250 HELP
250 OK
250 Accepted
354 Enter message, ending with "." on a line by itself
550 Administrative prohibition
221 myhost.test.ex closing connection

**** SMTP testing session as if from host 10.9.8.7
**** but without any ident (RFC 1413) callback.
**** This is not for real!

220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
250-myhost.test.ex Hello test.ex [10.9.8.7]
250-SIZE 52428800
250-PIPELINING
250 HELP
250 OK
250 Accepted
354 Enter message, ending with "." on a line by itself
550 Administrative prohibition
221 myhost.test.ex closing connection

**** SMTP testing session as if from host 10.9.8.7
**** but without any ident (RFC 1413) callback.
**** This is not for real!

220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
250-myhost.test.ex Hello test.ex [10.9.8.7]
250-SIZE 52428800
250-PIPELINING
250 HELP
250 OK
250 Accepted
250 Accepted
250 Accepted
354 Enter message, ending with "." on a line by itself
550 Administrative prohibition
221 myhost.test.ex closing connection

  Index: 598
  ===================================================================
  RCS file: /home/cvs/exim/exim-test-orig/AutoTest/stdout/598,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- 598    12 Jan 2005 15:38:41 -0000    1.2
  +++ 598    24 May 2005 10:34:12 -0000    1.3
  @@ -49,3 +49,14 @@
   354 Enter message, ending with "." on a line by itself
   250 OK id=10HmbB-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
  +450-Your message has been rejected but is being kept for evaluation.
  +450 If it was a legitimate message, it may still be delivered to the target recipient(s).
  +221 myhost.test.ex closing connection