system_filter 681 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
# Exim filter

# Add/remove headers
if first_delivery then
  # Remove headers
  headers remove X-Spam-Score:X-Spam-Report:X-Spam-Checker-Version:X-Spam-Status:X-Spam-Level:X-Spam-Bar:X-Anti-Virus
  if $acl_m3 is not "" then
    headers add $acl_m3
  endif
endif
Paul Cammish's avatar
Paul Cammish committed
11
12
13
14
15
16
17
18
19
20
21

# Prefix the subject of mail identified as spam if it's not already prefixed
if $h_X-Spam-Status: contains "spam" then
  if $header_subject: does not contain "[spam]" then 
    # replace existing subject header as 'Original-Subject'
    headers add "Original-Subject: $h_subject"
    headers remove "Subject"
    # add new subject header with prefix
    headers add "Subject: [spam] $h_original-subject"
  endif
endif