We have a big installation with postfix + dovecot + sieve.
Now we would like to create a "junk" folder in every customer inbox so they can discard the spam by they own.
We are planning to user global_script_path = /etc/dovecot/dovecot.sieve
Where /etc/dovecot/dovecot.sieve is:

require "fileinto";
if exists "X-Spam-Flag" {
        fileinto "Junk";
}


My question is, will the script find the users in our database? And how, will it be using the lda configuration?
I have been for weeks looking for this in the wiki and couldn't find it anywhere.
I promise I'll put it in there if I find the clue :)