Automate email clear out

Someone needs to completely delete their email trash or junk folders periodically.

I thought that should be possible with an AppleScript or Terminal command that could be set to run every minute or so.

Does anyone know how to do that?

There should be day, week and month options in the preferences for emptying those folders.

Does someone *really* need to clear such folders more than once a day? You mention “every minute”!!?With no context, that sounds like there is a different issue about the types of mail that user is receiving.

Additionally some mail rules in the app or on the mail provider’s server side might provide even more destruction options.

A bit more context would help, you’re right thanks, in that it’s my wife’s iCloud email account.

The key thing though is just wondering if anyone knows a way to automatically, fully remove trash and/or junk using an AppleScript or Terminal command.

I’ll caveat with Ive never used iCloud for email but it’s it fairly standard for email services to periodically delete Trash/Junk folder items?