12,274
edits
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!
m (→Sieve filter) |
mNo edit summary |
||
(10 intermediate revisions by the same user not shown) | |||
This is all possible with two things:
*An alias - set on the Control Pages
*(optionally) A sieve filter
==Alias==
On the control pages, in the email setup, under aliases create an alias such as:
[[File:Email alias for suffix.png|thumb|none|500|Alias]]
This sends messages addressed to me-ANYTHING@example.com to the me Mailbox
==Sieve filter==
Optionally, you can magically move these messages in folders...
Once messages are being sent to your Inbox with the alias above, you can create a sieve filter to automatically move messages to their folder, if you've made the folder already.
<syntaxhighlight>
require ["fileinto","imap4flags","variables","regex","mailbox"];
##
if exists "X-Delivered-To" {
if header :regex "X-Delivered-To" "
set
fileinto "INBOX.Filtered.${suffix}";
}
</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 (in lowercase).
*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▼
▲*You'll need to add this sieve filter - eg by using the Thunderbird Sieve extension, see [https://support.aa.net.uk/Sieve_Filtering#Sieve_Server_Settings Sieve_Server_Settings] for info
*This won't be able to be added via Roundcube, as you can't paste in raw sieve code there.
==
You can create the folders automatically if you wanted add :create, - but some mail clients won't refresh their folder list until they are restarted. We also title case the new folder name - eg it will be called Amazon (capital A).
set :upperfirst "suffix" "${1}";
fileinto :create "INBOX.Filtered.${suffix}";
== Create the folders ==
The sieve filter puts email in to a folder called Filtered/XXX, and as long as XXX matches the suffix in the email address, the messages will get moved to there.
So in your email program:
#
#
[[File:Email folders.png|thumb|none|100|Folder layout in your email client]]
|
edits