Sieve script - Filters not applying properly
Open
@kesselb is already working on this.
Since Aug 30, 2025.
1. to develop
bug
- Dominant language
- JavaScript
- Stars
- 1k
- Forks
- 348
- Avg merge
- 12h 28m
- Merged PRs (30d)
- 91
Description
Steps to reproduce
- Go into mail (Mail 5.3.1)
- Click on mail settings
- Go to filters
- Create a new filter
- Add condition : "sender" "contains" "test.com"
- Add action : "File into" "junk"
- Save filter
Result:
Check the sieve script editor and it will not have all the correct values
### Nextcloud Mail: Filters ### DON'T EDIT ###
# FILTER: [{"name":"New filter","enable":true,"operator":"allof","tests":[{"operator":"contains","values":[],"field":"from"}],"actions":[{"type":"fileinto","mailbox":"Junk"}],"priority":10}]
# New filter
if address :contains :all "From" [""] {
fileinto "Junk";
}
### Nextcloud Mail: Filters ### DON'T EDIT ###
This will effectivly move all mails into Junk
Expected behavior
The filter is properly created
Actual behavior
Check the sieve script editor and it will not have all the correct values
Nextcloud Mail: Filters ### DON'T EDIT
FILTER: [{"name":"New filter","enable":true,"operator":"allof","tests":[{"operator":"contains","values":[],"field":"from"}],"actions":[{"type":"fileinto","mailbox":"Junk"}],"priority":10}]
New filter
if address :contains :all "From" [""] {
fileinto "Junk";
}
Nextcloud Mail: Filters ### DON'T EDIT
### Mail app version
5.3.1
### Nextcloud version
31.0.8
### Mailserver or service
docker mail server
### Operating system
debian - coker
### PHP engine version
PHP 8.3
### Nextcloud memory caching
_No response_
### Web server
None
### Database
None
### Additional info
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.