Erasing deleted messages on IMAP account in Mail.app

hi there

i have tried with GUI scripting and keystrokes to make an apple script that would ‘erase deleted messages’ which is command-k in mail.app. to no avail. can someone help? it should be very simple - just so that I can attach it to a rule. i have tried many things, including apple script and automator but couldn’t get my head around this simple thing.

i would appreciate any help. cheers, michael

Have you looked at the empty trash on quit and empty trash frequency properties of an account.

You can also set Mail>Preferences>Accounts>Mailbox Behaviours to not save deleted messages to a mailbox.

Hi thanksfor the quick reply. Yes I have looked at that. For some reason however that option does not seem to work. Although I can see mail emptying the trash on quit, for instance, deleted messages on the imap server are not actually ‘expunged’. Hence my quest. So if anyone has help, it’s appreciated. Mike.