How can I purge messages older than 365 days for all IMAP folders except the Inbox?

How can I purge messages older than 365 days for all IMAP folders except the INBOX? I found an option to purge the mails older than 365 days for all IMAP folders, but I don’t have the option to exclude the Inbox. Or is the Inbox not seen as an IMAP folder?

To the best of my knowledge that specific function does not exist on any of the software that we provide. That isn’t to say that external software can’t be made to do it on our server over the IMAP protocol, but I’m not sure what software offers that specific function.

Do you offer the doveadm command with SSH? With my other webhosting service, I was able to do this but I’m giving MX Route a test run for some of my clients, so not familiar with all options yet.

doveadm expunge -u user@example.com mailbox INBOX.'*' before 365d

We don’t offer SSH on our side, but you would have access to all available IMAP commands over the protocol. That should include expunge. Example: https://busylog.net/telnet-imap-commands-note/#29