From 55dc330bf277fe511858246f11ccd017f82e6aff Mon Sep 17 00:00:00 2001 From: "Heiko Schlittermann (HS12-RIPE)" Date: Mon, 14 Nov 2016 21:18:01 +0100 Subject: [PATCH] Testsuite: make 4009,4015 independend on user name length --- test/confs/4009 | 3 ++ test/log/4009 | 16 ++++---- test/log/4015 | 4 +- test/scripts/4000-scanning/4009 | 64 ++++++++++++++++---------------- test/scripts/4015-scan-ipv6/4015 | 17 +++++---- test/stdout/4009 | 40 ++++++++++---------- test/stdout/4015 | 12 +++--- 7 files changed, 80 insertions(+), 76 deletions(-) diff --git a/test/confs/4009 b/test/confs/4009 index 98f696f44..dd21a2183 100644 --- a/test/confs/4009 +++ b/test/confs/4009 @@ -8,6 +8,9 @@ OPT= 127.0.0.1 7833 log_selector = +subject primary_hostname = myhost.test.ex +# we need to set the sender +trusted_users = CALLER + spamd_address = OPT # ----- Main settings ----- diff --git a/test/log/4009 b/test/log/4009 index 8f0a5f8bd..32535f5ac 100644 --- a/test/log/4009 +++ b/test/log/4009 @@ -1,17 +1,17 @@ -1999-03-02 09:44:33 10HmaX-0005vi-00 U=CALLER Warning: [127.0.0.1]:1111 no action Spam detection software, running on the system "demo",\n has NOT identified this incoming email as spam. The original\n message has been attached to this so you can view it or label\n similar future email. If you have any questions, see\n @@CONTACT_ADDRESS@@ for details.\n \n Content preview: test [...]\n \n Content analysis details: (4.5 points, 5.0 required)\n \n pts rule name description\n ---- ---------------------- --------------------------------------------------\n -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP\n 1.2 MISSING_HEADERS Missing To: header\n 1.0 MISSING_FROM Missing From: header\n 1.8 MISSING_SUBJECT Missing Subject: header\n 1.4 MISSING_DATE Missing Date: header\n 0.1 MISSING_MID Missing Message-Id: header -1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss +1999-03-02 09:44:33 10HmaX-0005vi-00 U=fromuser Warning: [127.0.0.1]:1111 no action Spam detection software, running on the system "demo",\n has NOT identified this incoming email as spam. The original\n message has been attached to this so you can view it or label\n similar future email. If you have any questions, see\n @@CONTACT_ADDRESS@@ for details.\n \n Content preview: test [...]\n \n Content analysis details: (4.5 points, 5.0 required)\n \n pts rule name description\n ---- ---------------------- --------------------------------------------------\n -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP\n 1.2 MISSING_HEADERS Missing To: header\n 1.0 MISSING_FROM Missing From: header\n 1.8 MISSING_SUBJECT Missing Subject: header\n 1.4 MISSING_DATE Missing Date: header\n 0.1 MISSING_MID Missing Message-Id: header +1999-03-02 09:44:33 10HmaX-0005vi-00 <= fromuser@myhost.test.ex U=fromuser P=local-esmtp S=sss 1999-03-02 09:44:33 10HmaX-0005vi-00 => :blackhole: R=r 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed -1999-03-02 09:44:33 10HmaY-0005vi-00 U=CALLER Warning: [127.0.0.1]:1111 no action Spam detection software, running on the system "demo",\n has NOT identified this incoming email as spam. The original\n message has been attached to this so you can view it or label\n similar future email. If you have any questions, see\n @@CONTACT_ADDRESS@@ for details.\n \n Content preview: test [...]\n \n Content analysis details: (4.5 points, 5.0 required)\n \n pts rule name description\n ---- ---------------------- --------------------------------------------------\n -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP\n 1.2 MISSING_HEADERS Missing To: header\n 1.0 MISSING_FROM Missing From: header\n 1.8 MISSING_SUBJECT Missing Subject: header\n 1.4 MISSING_DATE Missing Date: header\n 0.1 MISSING_MID Missing Message-Id: header -1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss +1999-03-02 09:44:33 10HmaY-0005vi-00 U=fromuser Warning: [127.0.0.1]:1111 no action Spam detection software, running on the system "demo",\n has NOT identified this incoming email as spam. The original\n message has been attached to this so you can view it or label\n similar future email. If you have any questions, see\n @@CONTACT_ADDRESS@@ for details.\n \n Content preview: test [...]\n \n Content analysis details: (4.5 points, 5.0 required)\n \n pts rule name description\n ---- ---------------------- --------------------------------------------------\n -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP\n 1.2 MISSING_HEADERS Missing To: header\n 1.0 MISSING_FROM Missing From: header\n 1.8 MISSING_SUBJECT Missing Subject: header\n 1.4 MISSING_DATE Missing Date: header\n 0.1 MISSING_MID Missing Message-Id: header +1999-03-02 09:44:33 10HmaY-0005vi-00 <= fromuser@myhost.test.ex U=fromuser P=local-esmtp S=sss 1999-03-02 09:44:33 10HmaY-0005vi-00 => :blackhole: R=r 1999-03-02 09:44:33 10HmaY-0005vi-00 Completed -1999-03-02 09:44:33 10HmaZ-0005vi-00 U=CALLER Warning: [127.0.0.1]:1111 no action Spam detection software, running on the system "demo",\n has NOT identified this incoming email as spam. The original\n message has been attached to this so you can view it or label\n similar future email. If you have any questions, see\n @@CONTACT_ADDRESS@@ for details.\n \n Content preview: test [...]\n \n Content analysis details: (4.5 points, 5.0 required)\n \n pts rule name description\n ---- ---------------------- --------------------------------------------------\n -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP\n 1.2 MISSING_HEADERS Missing To: header\n 1.0 MISSING_FROM Missing From: header\n 1.8 MISSING_SUBJECT Missing Subject: header\n 1.4 MISSING_DATE Missing Date: header\n 0.1 MISSING_MID Missing Message-Id: header -1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss +1999-03-02 09:44:33 10HmaZ-0005vi-00 U=fromuser Warning: [127.0.0.1]:1111 no action Spam detection software, running on the system "demo",\n has NOT identified this incoming email as spam. The original\n message has been attached to this so you can view it or label\n similar future email. If you have any questions, see\n @@CONTACT_ADDRESS@@ for details.\n \n Content preview: test [...]\n \n Content analysis details: (4.5 points, 5.0 required)\n \n pts rule name description\n ---- ---------------------- --------------------------------------------------\n -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP\n 1.2 MISSING_HEADERS Missing To: header\n 1.0 MISSING_FROM Missing From: header\n 1.8 MISSING_SUBJECT Missing Subject: header\n 1.4 MISSING_DATE Missing Date: header\n 0.1 MISSING_MID Missing Message-Id: header +1999-03-02 09:44:33 10HmaZ-0005vi-00 <= fromuser@myhost.test.ex U=fromuser P=local-esmtp S=sss 1999-03-02 09:44:33 10HmaZ-0005vi-00 => :blackhole: R=r 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed 1999-03-02 09:44:33 10HmbA-0005vi-00 spam acl condition: spamd: failed to connect to any address for ip4.ip4.ip4.ip4: Connection refused -1999-03-02 09:44:33 10HmbA-0005vi-00 U=CALLER Warning: [127.0.0.1]:1111 no action Spam detection software, running on the system "demo",\n has NOT identified this incoming email as spam. The original\n message has been attached to this so you can view it or label\n similar future email. If you have any questions, see\n @@CONTACT_ADDRESS@@ for details.\n \n Content preview: test [...]\n \n Content analysis details: (4.5 points, 5.0 required)\n \n pts rule name description\n ---- ---------------------- --------------------------------------------------\n -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP\n 1.2 MISSING_HEADERS Missing To: header\n 1.0 MISSING_FROM Missing From: header\n 1.8 MISSING_SUBJECT Missing Subject: header\n 1.4 MISSING_DATE Missing Date: header\n 0.1 MISSING_MID Missing Message-Id: header -1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss +1999-03-02 09:44:33 10HmbA-0005vi-00 U=fromuser Warning: [127.0.0.1]:1111 no action Spam detection software, running on the system "demo",\n has NOT identified this incoming email as spam. The original\n message has been attached to this so you can view it or label\n similar future email. If you have any questions, see\n @@CONTACT_ADDRESS@@ for details.\n \n Content preview: test [...]\n \n Content analysis details: (4.5 points, 5.0 required)\n \n pts rule name description\n ---- ---------------------- --------------------------------------------------\n -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP\n 1.2 MISSING_HEADERS Missing To: header\n 1.0 MISSING_FROM Missing From: header\n 1.8 MISSING_SUBJECT Missing Subject: header\n 1.4 MISSING_DATE Missing Date: header\n 0.1 MISSING_MID Missing Message-Id: header +1999-03-02 09:44:33 10HmbA-0005vi-00 <= fromuser@myhost.test.ex U=fromuser P=local-esmtp S=sss 1999-03-02 09:44:33 10HmbA-0005vi-00 => :blackhole: R=r 1999-03-02 09:44:33 10HmbA-0005vi-00 Completed diff --git a/test/log/4015 b/test/log/4015 index c522ef82f..144eaf7d3 100644 --- a/test/log/4015 +++ b/test/log/4015 @@ -1,5 +1,5 @@ 1999-03-02 09:44:33 10HmaX-0005vi-00 spam acl condition: spamd: failed to connect to any address for ::1: Connection refused -1999-03-02 09:44:33 10HmaX-0005vi-00 U=CALLER Warning: [127.0.0.1]:1111 no action Spam detection software, running on the system "demo",\n has NOT identified this incoming email as spam. The original\n message has been attached to this so you can view it or label\n similar future email. If you have any questions, see\n @@CONTACT_ADDRESS@@ for details.\n \n Content preview: test [...]\n \n Content analysis details: (4.5 points, 5.0 required)\n \n pts rule name description\n ---- ---------------------- --------------------------------------------------\n -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP\n 1.2 MISSING_HEADERS Missing To: header\n 1.0 MISSING_FROM Missing From: header\n 1.8 MISSING_SUBJECT Missing Subject: header\n 1.4 MISSING_DATE Missing Date: header\n 0.1 MISSING_MID Missing Message-Id: header -1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss +1999-03-02 09:44:33 10HmaX-0005vi-00 U=fromuser Warning: [127.0.0.1]:1111 no action Spam detection software, running on the system "demo",\n has NOT identified this incoming email as spam. The original\n message has been attached to this so you can view it or label\n similar future email. If you have any questions, see\n @@CONTACT_ADDRESS@@ for details.\n \n Content preview: test [...]\n \n Content analysis details: (4.5 points, 5.0 required)\n \n pts rule name description\n ---- ---------------------- --------------------------------------------------\n -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP\n 1.2 MISSING_HEADERS Missing To: header\n 1.0 MISSING_FROM Missing From: header\n 1.8 MISSING_SUBJECT Missing Subject: header\n 1.4 MISSING_DATE Missing Date: header\n 0.1 MISSING_MID Missing Message-Id: header +1999-03-02 09:44:33 10HmaX-0005vi-00 <= fromuser@myhost.test.ex U=fromuser P=local-esmtp S=sss 1999-03-02 09:44:33 10HmaX-0005vi-00 => :blackhole: R=r 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed diff --git a/test/scripts/4000-scanning/4009 b/test/scripts/4000-scanning/4009 index df9cc178e..d9849c341 100644 --- a/test/scripts/4000-scanning/4009 +++ b/test/scripts/4000-scanning/4009 @@ -12,14 +12,14 @@ server 7833 similar future email. If you have any questions, see >@@CONTACT_ADDRESS@@ for details. > ->Content preview: test [...] +>Content preview: test [...] > >Content analysis details: (4.5 points, 5.0 required) > @@ -50,9 +50,9 @@ server 7833 > *eof **** -exim -odi -bs +exim -odi -oMt fromuser -bs ehlo test.ex -mail from:<> +mail from: rcpt to: data Content-type: text/plain @@ -72,14 +72,14 @@ server 7833 similar future email. If you have any questions, see >@@CONTACT_ADDRESS@@ for details. > ->Content preview: test [...] +>Content preview: test [...] > >Content analysis details: (4.5 points, 5.0 required) > @@ -110,9 +110,9 @@ server 7833 > *eof **** -exim -odi -bs -DOPT='127.0.0.1 7833 retry=10s' +exim -odi -oMt fromuser -bs -DOPT='127.0.0.1 7833 retry=10s' ehlo test.ex -mail from:<> +mail from: rcpt to: data Content-type: text/plain @@ -130,14 +130,14 @@ server -i 2 7833 similar future email. If you have any questions, see >@@CONTACT_ADDRESS@@ for details. > ->Content preview: test [...] +>Content preview: test [...] > >Content analysis details: (4.5 points, 5.0 required) > @@ -168,9 +168,9 @@ server -i 2 7833 > *eof **** -exim -odi -bs -DOPT='127.0.0.1 7833 retry=4s' +exim -odi -oMt fromuser -bs -DOPT='127.0.0.1 7833 retry=4s' ehlo test.ex -mail from:<> +mail from: rcpt to: data Content-type: text/plain @@ -189,14 +189,14 @@ server 7833 similar future email. If you have any questions, see >@@CONTACT_ADDRESS@@ for details. > ->Content preview: test [...] +>Content preview: test [...] > >Content analysis details: (4.5 points, 5.0 required) > @@ -227,9 +227,9 @@ server 7833 > *eof **** -exim -odi -bs -DOPT='<; 127.0.0.1 7833 ; HOSTIPV4 7834 pri=2 tmo=2s' +exim -odi -oMt fromuser -bs -DOPT='<; 127.0.0.1 7833 ; HOSTIPV4 7834 pri=2 tmo=2s' ehlo test.ex -mail from:<> +mail from: rcpt to: data Content-type: text/plain diff --git a/test/scripts/4015-scan-ipv6/4015 b/test/scripts/4015-scan-ipv6/4015 index 66db933e6..9e4a857be 100644 --- a/test/scripts/4015-scan-ipv6/4015 +++ b/test/scripts/4015-scan-ipv6/4015 @@ -7,14 +7,14 @@ server 7833 similar future email. If you have any questions, see >@@CONTACT_ADDRESS@@ for details. > ->Content preview: test [...] +>Content preview: test [...] > >Content analysis details: (4.5 points, 5.0 required) > @@ -45,9 +45,10 @@ server 7833 > *eof **** -exim -odi -bs -DOPT='<; 127.0.0.1 7833 ; ::1 7834 pri=2 tmo=2s' +# need to trust CALLER to -oMt +exim -odi -oMt fromuser -bs -DOPT='<; 127.0.0.1 7833 ; ::1 7834 pri=2 tmo=2s' ehlo test.ex -mail from:<> +mail from: rcpt to: data Content-type: text/plain diff --git a/test/stdout/4009 b/test/stdout/4009 index 93fec0c60..5c16c636a 100644 --- a/test/stdout/4009 +++ b/test/stdout/4009 @@ -1,5 +1,5 @@ 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 -250-myhost.test.ex Hello CALLER at test.ex +250-myhost.test.ex Hello fromuser at test.ex 250-SIZE 52428800 250-8BITMIME 250-PIPELINING @@ -10,7 +10,7 @@ 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 CALLER at test.ex +250-myhost.test.ex Hello fromuser at test.ex 250-SIZE 52428800 250-8BITMIME 250-PIPELINING @@ -21,7 +21,7 @@ 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 CALLER at test.ex +250-myhost.test.ex Hello fromuser at test.ex 250-SIZE 52428800 250-8BITMIME 250-PIPELINING @@ -32,7 +32,7 @@ 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 CALLER at test.ex +250-myhost.test.ex Hello fromuser at test.ex 250-SIZE 52428800 250-8BITMIME 250-PIPELINING @@ -51,16 +51,16 @@ Connection request from [127.0.0.1] + ) +< (envelope-from ) < id 10HmaX-0005vi-00 < for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 - + + ) +< (envelope-from ) < id 10HmaY-0005vi-00 < for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 - + + ) +< (envelope-from ) < id 10HmaZ-0005vi-00 < for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 - + + ) +< (envelope-from ) < id 10HmbA-0005vi-00 < for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 - + + ) +< (envelope-from ) < id 10HmaX-0005vi-00 < for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 - +