-
-
Notifications
You must be signed in to change notification settings - Fork 342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug]: Stalwart doesn't care for seen flag set by sieve filters #1021
Comments
Trusted scripts are global and operate at the SMTP transaction level, for this reason they do not have access to Sieve functions that modify mailboxes such as |
Yes, a global script will do the trick. Have in mind thought thatglobal filters are not used unless they are included from each account's main Sieve filter. |
Well... I'm already calling the global filter via main sieve filter. Not as a script to be called on X stage for all accounts. |
Perhaps this is related to the case sensitivity bug? Have you tried including "globalfilters" in lowercase from the mailbox's main script? |
The script is already included and runs, I can see the headers being added by it. But, I had 2 scripts with the same ID, 1 under system 1 under user scripts. (This is a bug as well I guess?) |
That is fine, you can have the same script id on the trusted and untrusted interpreters. These are kept separately.
No, the untrusted interpreter doe not have access to the trusted scripts and viceversa. |
The Script not found error you are seeing is due to the case sensitivity bug importing scripts, but there is a separate issue for that. Regarding trusted vs untrusted scripts, let me clarify what each of these do:
|
It is not a case sensitivity. Also, we should be able to call the global script from inside a mailbox sieve, and set everything up. So, setting up flags properly shouldn't be an issue. As per RFC6609, there are no such differences. And it also states that
Basically, it's meant to reduce using same scripts over and over and making it a repository for all users to use. So, if we are meant to run a global script via the "trusted" interpreter, we must have access to all of the functionality. |
Thanks. |
What happened?
I have a Trusted script, running for most incoming emails, trying to sort, flag, forward some emails.

As part of that, one part of it tries mark clutter as read.
The problem is, Stalwart does not register these emails as "Read".
So there is always a big chunk of unread emails in such mailboxes.
And
In Snappy and Roundcube, they are listed as "Unread" even if they have the Seen flag.
In thunderbird, they are listed as if they are not marked as read at all.
Same email clients do not display the same behaviour with other mail servers.
How can we reproduce the problem?
I can reproduce the problem by doing the following steps:
Create a trusted sieve script.
Try to change a filter with the action changing the flag of some emails with something like below:
Call that script from your mailbox by adding
include :global "thatfilter";
Send yourself a few emails that should fit the criteria.
Check it with Snappy or Roundcube or Thunderbird.
Messages that should have been marked as "Read" will come as "Unread".
Version
v0.10.x
What database are you using?
PostgreSQL
What blob storage are you using?
PostgreSQL
Where is your directory located?
Internal
What operating system are you using?
Linux
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: