Commit 24e8b300 authored by Paul Cammish's avatar Paul Cammish
Browse files

Tag spam subject

parent 8a178b25
......@@ -8,3 +8,14 @@ if first_delivery then
headers add $acl_m3
endif
endif
# 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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment