Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Just checked again, it is not there. There are few account-specific settings in there at all and this particular setting applies to the account, not the application as a whole. I did find ‘NumberOfDaysToKeepSentMessages’ in ~/Library/Mail/V2/MailData/Accounts.plist, but that plist has not been updated in months. There is no equivalent of Accounts.plist in V3, so it must be stored somewhere else now. I am wondering if it is in one of the databases instead in the MailData directory instead.
Hmm... must be different in Sierra then.
[doublepost=1481898013][/doublepost]
This will go through your email accounts (as defined in MailAccounts) and move any message in the Sent folder over 30 days old to the Trash folder. I'm a newbie at Applescript, but I've tested it and it does work.

Code:
set delDate to (current date) - (60 * days)
set MailAccounts to {"iCloud"}

Nice job and thank you! With these two tweaks it does a 60 day purge on my iCloud email account. Works perfectly. Got the script all fixed up as an Alfred workflow, so it is easy to run.

Screen Shot 2016-12-16 at 6.29.59 AM.png
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.