When I was troubleshooting the situation that made me aware of the problem I described, the user I was trying to help had 3 Macs (2 laptops and a desktop), and he had stopped using Apple mail in the the email on the first laptop, which was older. I checked the settings on the newer laptop and the desktop, which were in constant use, and found that removal of deleted emails after 30 days on the server was not enabled on either. When I found out about the old laptop, I had the user log into the account currently in use, and there was no Mail configuration for it, but when I asked the user about an additional user account that I discovered on the old Mac laptop, he told me he had not logged into that account on that Mac for some time - months, perhaps years. He was able to log into the account, however, and when Mail was opened, it was configured for the account, and the setting for removal of deleted mail after 30 days was enabled. After we turned the setting off, the problem appeared to be solved.
One difficulty in troubleshooting this problem, I think, is being able to correctly assume that a mail item from 30 days back was never intentionally expunged from the server, which Apple Mail allows at any time. If you're sure you never use that feature of the interface, then I guess you can make the assumption. I'm assuming you have emails in your trash that are 30 days old so you can confirm that they are gone after today. If that's the case, you can temporarily work around the problem by copying those emails to another folder where they won't be deleted after 30 days. Maybe you're already doing that?