Hmm... must be different in Sierra then.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.
[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.
Last edited: