More new test committing.
[exim.git] / test / aux-var-src / 0037.F
CommitLineData
afda344b
PH
1# Exim filter
2
3if "${if def:h_test-headers:{yes}{no}}" is yes then
4 testprint ------------------------------------------------
5 testprint $message_headers
6 testprint ------------------------------------------------
7 headers remove test-headers:more-test-headers
8 headers add "added-header: this is added\nadded-header2: a second line"
9 testprint $message_headers
10 testprint ------------------------------------------------
11endif
12
13if $recipients matches deliverfromfilter then
14 deliver dff@test.ex
15 finish
16endif
17
18testprint "message_size = $message_size"
19testprint "message_body_size = $message_body_size"
20testprint "body_linecount = $body_linecount"
21testprint "message_body = $message_body"
22testprint "message_body_end = $message_body_end"
23
24logfile DIR/spool/log/mainlog
25
26if first_delivery then
27 logwrite "$tod_log $message_id \"$h_subject:\" first delivery\n"
28else
29 logwrite "$tod_log $message_id \"$h_subject:\" not first delivery\n"
30endif
31
32if error_message then finish endif
33
34headers add "X-added: qualify_domain is $qualify_domain"
35headers remove remove-this
36
37if $recipients does not match filter then
38 unseen deliver userz@$qualify_domain errors_to abcd@$qualify_domain
39endif
40
41if $h_subject contains "fail this" then
42 fail text "subject was\t\"$h_subject:\" (filter fail)"
43endif
44
45if $h_subject contains "defer this" then
46 defer text "subject was\t\"$h_subject:\" (filter defer)"
47endif
48
49if $h_subject contains "freeze this" then
50 freeze "subject was \"$h_subject:\"\nHere are two extra\nlines of text"
51else
52
53if $h_subject matches ^reply then
54 mail to $return_path
55 subject "An auto reply: qualify_domain=$qualify_domain"
56 text "This is a text line"
57endif
58endif