Contact groups in Sieve
When setting up the conditions of a rule, one of the options is "The sender is a member of group..."
But after setting up such a rule, I can find no reference to the group in the Sieve code. Where I'd expect to find the name of the group there is instead a 36-character-long string of gobbledygook. Can anyone explain this, please? Also, when I try to set up a rule to forward mail to a group, it converts the group name to the current list of addresses of members of the group. I can find no reference to groups in FM's Sieve help pages. Is it possible genuinely to reference contact groups in rules and/or in Sieve? |
I have not looked in detail at how things work, but can perhaps provide some insight. Nothing you report is surprising.
The first thing to realise is that the sieve language has no concept of contact groups Also, for the most part, FastMail does not directly change the sieve processor itself. Building group support into FastMail involves translating contact groups into something the sieve processor understands. For forwarding, it is natural to use the list of addresses comprising the group. For other purposes (involving checking for a header identifying a group) FastMail very likely wants to use a unique identifier across all users, rather than just the group name where the same name will often be used by many users. |
Thank you for your thoughts, Tim.
Quote:
One would have to modify the script every time a member joined or left the group, which rather defeats the object of having a group in the first place. Quote:
|
After some testing, I can confirm that that long tag string you see in the sieve script points to the group. As long as you don't delete the group it will be a unique pointer to that group. For example, the tag string remains unchanged under these conditions:
|
Wow, thank you Bill !
That is massively helpful, and encouraging. |
Quote:
|
As I stated, my tests indicate that the tag string in the sieve code does not change if you add or remove members from a group, or even if you rename a group. So you can either use the rules screen or use your own sieve script (with the same tag string for the group) and just change who is a member of that group. The sieve isn't automatically changed (because it doesn't need to be) when you edit the contacts in a group.
Address book groups are one of the best features of Fastmail. You can:
|
Quote:
l would have experimented to test Tim's theory that the seive is re-compiled every time the membership of a group changes, had Bill not reminded us that there's a much simpler way to forward mail to a group... Quote:
|
Indeed, Bill's solution is the correct one for forwarding to a group. For one thing, I had forgotten that a sieve redirect only allows you to specify a single address (something I had forgotten) so to achieve the trick with sieve would require a series of redirect :copy statements.
|
Forwarding to contact group
There are two situations where we might like to use a contact group for automatic email processing:
|
All times are GMT +9. The time now is 10:30 PM. |
Copyright EmailDiscussions.com 1998-2022. All Rights Reserved. Privacy Policy