Jump to content

This is the support site for Andrews & Arnold Ltd, a UK Internet provider. Information on these pages is generally for our customers but may be useful to others, enjoy!

Sieve-Example:Move email to a suffix folder: Difference between revisions

m
 
==Sieve filter==
Once messages are being sent to your Inbox, we create a sieve filter to automatically move messages to their folder, if it has been made. If the folder hasn't been made, then they will be put in to your Inbox as normal.
 
<syntaxhighlight>
require ["fileinto","imap4flags","variables","regex","mailbox"];
 
## filterMove messages sent to an address with a suffix eg, me-amazon@example.com in to a folder called Filtered/amazon, if it exists.
if exists "X-Delivered-To" {
 
stop;}
</syntaxhighlight>
 
This filter uses the 'X-Delivered-To' header which is added by the A&A mail servers - even if you are BCC'd then the filtering will work. The X-Delivered-To is the 'envelope-to' header, which is the address the email was actually sent to by the sender.
 
*You'll need to add this sieve filter - eg by using the (latest) Thunderbird Sieve extension, see [https://support.aa.net.uk/Sieve_Filtering#Sieve_Server_Settings Sieve_Server_Settings] for info in the 'Creating Sieve Filters' section
autoreview, Bureaucrats, editor, Interface administrators, reviewer, Administrators
12,270

edits