Many thanks
You are right,
I don't understand one thing.
When a message is downloaded I can see it in the main "messages received" folder.
I can see it in the subfolder to which it was assigned by the filter on gmail.
When I open aquamail and open a subfolder I can read this message and delete it.
The problem is that even though I delete a message from the subfolder, this message will still be in the main "messages received" folder.
In order to delete an email I have to delete it in 2 places, one place is the main folder "messages received" and the other is a subfolder assigned by me, prepared only for an email from a specific person or instance
When I do similar things on my gmail account, I don't have such problems.
I delete the message in one place and it disappears, you don't need to delete it twice