Add TRUSTED_CONFIG_PREFIX_FILE option
[exim.git] / test / aux-var-src / 0037.F
1 # Exim filter
2
3 if "${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 ------------------------------------------------
11 endif
12
13 if $recipients matches deliverfromfilter then
14   deliver dff@test.ex
15   finish
16 endif    
17
18 testprint "message_size      = $message_size"
19 testprint "message_body_size = $message_body_size"
20 testprint "body_linecount    = $body_linecount"
21 testprint "message_body      = $message_body"
22 testprint "message_body_end  = $message_body_end"
23
24 logfile DIR/spool/log/mainlog
25
26 if first_delivery then
27   logwrite "$tod_log $message_id \"$h_subject:\" first delivery\n"
28 else   
29   logwrite "$tod_log $message_id \"$h_subject:\" not first delivery\n"
30 endif
31
32 if error_message then finish endif
33
34 headers add "X-added: qualify_domain is $qualify_domain"
35 headers remove remove-this
36
37 if $recipients does not match filter then
38   unseen deliver userz@$qualify_domain errors_to abcd@$qualify_domain
39 endif   
40
41 if $h_subject contains "fail this" then 
42   fail text "subject was\t\"$h_subject:\" (filter fail)"
43 endif   
44
45 if $h_subject contains "defer this" then 
46   defer text "subject was\t\"$h_subject:\" (filter defer)"
47 endif   
48
49 if $h_subject contains "freeze this" then 
50   freeze "subject was \"$h_subject:\"\nHere are two extra\nlines of text"
51 else   
52
53 if $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"
57 endif
58 endif