Hi, I am trying to create a sieve filter which does something similar to the following: ??? if size :over ${extdata.max_size} { ??? ??? # do something ??? } This doesn't seem supported in recent dovecot and size only appears to accept a literal number? I'm not sure I could extra size into a variable either (to use variable matching). My understanding of sieve filters is that one needs to use something like a match, then use something like SET to put the match into a variable?? This syntax doesn't seem to be compatible with the size test here either, so I don't see that I can do this? My goal is that users can set a user configurable setting (in an external front end) and if the email size is greater than this size then we will do some processing on it. This particular filter is actually in a global sieve filter. I guess I could use an external executable program, but is there another way to do this? Thanks for ideas Ed W
* Ed W. via dovecot:> My goal is that users can set a user configurable setting (in an > external front end) and if the email size is greater than this size > then we will do some processing on it. This particular filter is > actually in a global sieve filter.A global script using per-user parameters? Not what I would choose. I like to generate sieve scripts for individual users (taking their wishes into account of course), because it gives me the ability to perform some sanity checks. -Ralph
On 19/03/2019 17:19, Ralph Seichter via dovecot wrote:> * Ed W. via dovecot: > >> My goal is that users can set a user configurable setting (in an >> external front end) and if the email size is greater than this size >> then we will do some processing on it. This particular filter is >> actually in a global sieve filter. > A global script using per-user parameters? Not what I would choose. I > like to generate sieve scripts for individual users (taking their wishes > into account of course), because it gives me the ability to perform some > sanity checks. > > -RalphHow would you generate scripts for some few thousand users? How would you maintain those thousands of scripts when you make changes to the template? However, even then the problem still remains. Now it's a per person script, but I want the user to have a web front end so they can say if they want (some mangling) to happen to mails over a certain size? How to read that size in the filter file and act on it? (no, I do not want my web front end to be pushing files into the backend of a cluster of mail server machines) Thanks for other thoughts (for now I passed the variable to some external script which does the check there) Cheers Ed W