summaryrefslogtreecommitdiff
path: root/test/confs/0567
diff options
context:
space:
mode:
authorTodd Lyons <tlyons@exim.org>2012-07-26 13:31:20 -0700
committerTodd Lyons <tlyons@exim.org>2012-07-27 12:52:46 -0700
commite7568d513f9b5a853e5cdb5db8b2cc0d53f79981 (patch)
tree50e7e2dc1de67492c07d2a764b81911ae24f14e7 /test/confs/0567
parent9471b034a78d53e4bfb951649e9f556cf4e6018c (diff)
Bug #198: Add remove_header ACL modifier.
Used patch from Magnus Holmgren dated 2007-02-20. Added documentation. Added tests to detect proper operation.
Diffstat (limited to 'test/confs/0567')
-rw-r--r--test/confs/056791
1 files changed, 91 insertions, 0 deletions
diff --git a/test/confs/0567 b/test/confs/0567
new file mode 100644
index 000000000..7348b1fe5
--- /dev/null
+++ b/test/confs/0567
@@ -0,0 +1,91 @@
+# 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
+
+hostlist internal_headers = x-mail-2 : x-mail-3
+
+
+# ----- ACL -----
+
+begin acl
+
+connect:
+ accept CONNECTCOND
+
+mail:
+ accept remove_header = x-mail-1
+ senders = mailok@test.ex
+ # Won't work because doesn't expand
+ remove_header = +internal_headers
+ accept
+
+rcpt:
+ accept local_parts = rcptok
+ remove_header = x-rcpt-4 : x-rcpt-2
+ set acl_m_hdr = x-predata-1
+ deny add_header = RCPT: denied $local_part
+
+
+predata:
+ warn remove_header = x-predata-3 : $acl_m_hdr
+ # Won't work because doesn't use wildcards
+ accept remove_header = x-not-*
+
+data:
+ warn log_message = Verified previously removed header X-Rcpt-2
+ condition = ${if eq{$h_x-rcpt-2:}{}}
+ warn remove_header = x-data-1 : x-data-4
+ condition = ${if eq{$h_cond:}{accept}}
+ remove_header = x-data-3
+ # Won't delete this header because condition fails before the modifier
+ warn condition = ${if eq{$h_cond:}{reject}}
+ remove_header = x-data-2
+ warn log_message = Verified removed header X-Data-3 in this ACL still visible
+ condition = ${if !eq{$h_x-data-3:}{}}
+ accept
+
+notsmtp:
+ # Will remove a required header (Date) if told to
+ accept remove_header = x-notsmtp-1 : date
+
+
+# ----- Routers -----
+
+begin routers
+
+r1:
+ driver = accept
+ transport = t1
+
+
+# ----- Transports -----
+
+begin transports
+
+t1:
+ driver = appendfile
+ file = DIR/test-mail/$local_part
+ user = CALLER
+
+# End