I had a special script that removes e-mail from Trash after 90 days. But one day I was looking for a message older than 7 days and realized that older messages are no longer in trash!
I checked Roundcube settings, but it does not have such option. There is only an option to delete all messages from after logout.
Auto expunge can be configured in dovecot, but there was not such configuration:
doveconf | grep expunge
People on the internet were pointing to mail clients like Thunderbird. After some more digging I found out the iPhone by default has such setting! OMG!!!
You need to go to your mail account advanced settings on your iPhone.