Right click on the trash folder of an IMAP account gives a menu with Expire... After selecting that item the check box for the number of days is not checked. Checking the check boxes for read and unread and exit the popup shows that the number of messages is reduced, but reentering this popup shows that the check boxes are unchecked again. So the Expire... setting is honored but not saved.
I fixed a bug when we click on ok in 5.4.2 So for me it's fixed.