Update...

Using tags to drive actions does work properly - exactly as the RFCs suggest - 
I had not found a bug.  I'd made the following errors:

* I'd assumed that 'environment :matches "*"' would mean '${1}' would contain a 
representation of all the flags... but that doesn't seem to be the case.  
Anecdotally, it looks as if an arbitrarily chosen flag is returned for the 
variable '${1}'.  This sort-of makes sense - but it did misled me somewhat.
* I'd mistakenly assumed that 'hasflag :contains' would act on a collection of 
strings/tokens and tell me if the specified token is present in the collection. 
In practise, it tells me if any of the flags for 'hasflag' have the specified 
string as a substring.  This was maximally misleading where the two tokens that 
were being manipulated were 'Spam' and "NonSpam" - as the latter contains the 
former. Altering my script to use ':is' gave the results I had originally 
expected.

While the above solves most mysteries for my 'Option 2' - it raises a new 
(perhaps mostly academic) question:  If I wanted to list all the flags for a 
message, as debug output from a sieve script, how would I do this?  Is it 
possible using only sieve syntax?

Of course, I remain interested to know if dovecot supports initiating a sieve 
script whenever a message moves (is copied) from any folder to another - where 
the sieve script can determine the source and destination folders before 
choosing the correct action.   If Dovecot were to have this feature, I'd find 
it very useful... I'm aware that this functionality isn't demonstrated by the 
sample scripts I've found to date.  If it doesn't exist, would it be feasible 
to implement it as a third-party extension?
_______________________________________________
dovecot mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to