Actions¶
Actions are specified with the action argument to a Filter definition. The action parameter takes either a single action or a list of actions, for example:
action: delete
action: [report-pyzor, forward-to abuse@godaddy.com, delete]
The follwing actions are built-in. More actions can be added through plugins.
Action: copy-to¶
Copies the message to a folder. The folder is created if it does not exist.
Example:
action: copy-to INBOX/Spam
Action: move-to¶
Moves the message to a folder. The folder is created if it does not exist.
Example:
action: move-to INBOX/Business
Action: set-flag¶
Sets an IMAP flag. The set of flags depends on the server. Probably the most minimal set of flags is: \Deleted
,
\Seen
and \Answered
. Flags supported by other servers are: \Draft
, \Flagged
and even user defined flags.
Remember that the backslash \
needs to be doubled because it is itself used to quote single characters.
Example:
action: set-flag \\Flagged
Action: report-pyzor¶
Reports the message to Pyzor as spam. The pyzor filter will then detect the same message as spam.
Example:
action: report-pyzor
Action: report-badips¶
Reports the sending server’s IP to badips.com as spammer.
Example:
action: report-badips
Action: forward-to¶
Forwards the message to another e-mail address. For this, an SMTP account has to be defined in `global-parameters`_.
Example:
action: forward-to abuse@spamdomain.com
Action: stop¶
Stop processing further filters for this message. This is only useful in combination with nested filter lists.
Example:
action: stop