Add Spam Filter

summary: Configure Zoe to avoid messages(spam) based on content in their headers.

Ignore messages based on specific email headers

  1. Create a plain text file in %ZOE%/Library/SZ/Configurations/Default/ named SpamHeader.properties
  2. add rules in the following format: header=begins_with
A message will be ignored if the lowercase header value starts with the lowercase property value.

example

To ignore any message whose subject begins with *SPAM* (case doesn't matter):
subject=*SPAM*
A message with a subject of '*SPAM* URGENT RESPONSES NEEDED' will be ignored with the above property.

Multiple Values

Because the properties format only allow one value per key (eg. 'subject'), you need to trick it by providing an extension to the
key names.

example

key=value
key.1=value1
key.2=value2
When reading the properties, the mail filter will aggregate all the key names by dropping anything after the last
dot. The keys are sorted lexicographically. [1]

Debug Output

When running the app in debug mode (see Troubleshooting Zoe), it will log the content of any spam header in use. Look for logs coming from SZMail.<init>. Also, when a message is deemed to be spam, it will get logged under SZMail.isSpam: with the corresponding Message-ID, header name and value.