summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/confs/053280
-rw-r--r--test/confs/400026
-rw-r--r--test/log/05328
-rw-r--r--test/mail/0532.rcptok37
-rw-r--r--test/rejectlog/05322
-rw-r--r--test/scripts/0000-Basic/053218
-rw-r--r--test/stdout/05328
7 files changed, 166 insertions, 13 deletions
diff --git a/test/confs/0532 b/test/confs/0532
new file mode 100644
index 000000000..42d613b19
--- /dev/null
+++ b/test/confs/0532
@@ -0,0 +1,80 @@
+# Exim test configuration 0532
+
+CONNECTCOND=
+
+exim_path = EXIM_PATH
+host_lookup_order = bydns
+primary_hostname = myhost.test.ex
+rfc1413_query_timeout = 0s
+spool_directory = DIR/spool
+log_file_path = DIR/spool/log/%slog
+gecos_pattern = ""
+gecos_name = CALLER_NAME
+
+# ----- Main settings -----
+
+acl_smtp_connect = connect
+acl_smtp_mail = mail
+acl_smtp_rcpt = rcpt
+acl_smtp_predata = predata
+acl_smtp_data = data
+acl_not_smtp = notsmtp
+
+qualify_domain = test.ex
+trusted_users = CALLER
+
+
+# ----- ACL -----
+
+begin acl
+
+connect:
+ accept CONNECTCOND
+
+mail:
+ accept add_header = MAIL: one
+ senders = mailok@test.ex
+ add_header = MAIL: two\nMAIL: three
+ accept
+
+rcpt:
+ accept add_header = RCPT: one
+ add_header = DUP: duplicate
+ local_parts = rcptok
+ add_header = RCPT: two\n continued\n
+ deny add_header = RCPT: denied $local_part
+
+
+predata:
+ warn add_header = PREDATA-WARN: added with add_header
+ message = PREDATA-WARN: added with message
+ accept add_header = PREDATA: recipients are $recipients
+
+data:
+ accept add_header = DATA: one
+ add_header = DUP: duplicate
+ condition = ${if eq{$h_cond:}{accept}}
+
+notsmtp:
+ accept add_header = NOTSMTP: $recipients
+
+
+# ----- Routers -----
+
+begin routers
+
+r1:
+ driver = accept
+ transport = t1
+
+
+# ----- Transports -----
+
+begin transports
+
+t1:
+ driver = appendfile
+ file = DIR/test-mail/$local_part
+ user = CALLER
+
+# End
diff --git a/test/confs/4000 b/test/confs/4000
index cc08c71d4..1b33ff795 100644
--- a/test/confs/4000
+++ b/test/confs/4000
@@ -49,19 +49,19 @@ check_data:
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
+ add_header = 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
diff --git a/test/log/0532 b/test/log/0532
new file mode 100644
index 000000000..57a152060
--- /dev/null
+++ b/test/log/0532
@@ -0,0 +1,8 @@
+1999-03-02 09:44:33 U=CALLER F=<mailok@test.ex> rejected RCPT <notok@test.ex>
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= mailok@test.ex U=CALLER P=local-smtp S=sss
+1999-03-02 09:44:33 10HmaX-0005vi-00 => rcptok <rcptok@test.ex> R=r1 T=t1
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss
+1999-03-02 09:44:33 10HmaY-0005vi-00 => rcptok <rcptok@test.ex> R=r1 T=t1
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 U=CALLER temporarily rejected connection in "connect" ACL: cannot test add_header condition in connection ACL
diff --git a/test/mail/0532.rcptok b/test/mail/0532.rcptok
new file mode 100644
index 000000000..e669ef777
--- /dev/null
+++ b/test/mail/0532.rcptok
@@ -0,0 +1,37 @@
+From mailok@test.ex Tue Mar 02 09:44:33 1999
+Received: from CALLER by myhost.test.ex with local-smtp (Exim x.yz)
+ (envelope-from <mailok@test.ex>)
+ id 10HmaX-0005vi-00
+ for rcptok@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+cond: accept
+Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
+From: mailok@test.ex
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+MAIL: one
+MAIL: two
+MAIL: three
+RCPT: one
+DUP: duplicate
+RCPT: two
+ continued
+RCPT: denied notok
+PREDATA-WARN: added with add_header
+PREDATA-WARN: added with message
+PREDATA: recipients are rcptok@test.ex
+DATA: one
+DUP: duplicate
+
+Test message
+
+From CALLER@test.ex Tue Mar 02 09:44:33 1999
+Received: from CALLER by myhost.test.ex with local (Exim x.yz)
+ (envelope-from <CALLER@test.ex>)
+ id 10HmaY-0005vi-00
+ for rcptok@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Message-Id: <E10HmaY-0005vi-00@myhost.test.ex>
+From: CALLER_NAME <CALLER@test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+NOTSMTP: rcptok@test.ex
+
+Test non-SMTP message.
+
diff --git a/test/rejectlog/0532 b/test/rejectlog/0532
new file mode 100644
index 000000000..7a20d074e
--- /dev/null
+++ b/test/rejectlog/0532
@@ -0,0 +1,2 @@
+1999-03-02 09:44:33 U=CALLER F=<mailok@test.ex> rejected RCPT <notok@test.ex>
+1999-03-02 09:44:33 U=CALLER temporarily rejected connection in "connect" ACL: cannot test add_header condition in connection ACL
diff --git a/test/scripts/0000-Basic/0532 b/test/scripts/0000-Basic/0532
new file mode 100644
index 000000000..80124cec1
--- /dev/null
+++ b/test/scripts/0000-Basic/0532
@@ -0,0 +1,18 @@
+# add_header modifier in ACLs
+exim -bs -odi
+mail from:<mailok@test.ex>
+rcpt to:<rcptok@test.ex>
+rcpt to:<notok@test.ex>
+data
+cond: accept
+
+Test message
+.
+quit
+****
+exim -odi rcptok@test.ex
+Test non-SMTP message.
+****
+exim -bs -odi -DCONNECTCOND="add_header=CONNECT: won't do this"
+****
+no_msglog_check
diff --git a/test/stdout/0532 b/test/stdout/0532
new file mode 100644
index 000000000..7d79c1ec7
--- /dev/null
+++ b/test/stdout/0532
@@ -0,0 +1,8 @@
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
+250 OK
+250 Accepted
+550 Administrative prohibition
+354 Enter message, ending with "." on a line by itself
+250 OK id=10HmaX-0005vi-00
+221 myhost.test.ex closing connection
+451 Temporary local problem - please try later