On Sep 24, 2009, at 4:48 PM, Axel Luttgens wrote:
Le 24 sept. 2009 à 22:28, Luther Fuller a écrit :
Hello Luther,
This one was quite difficult to understand.
For both of my mail accounts, I have the Mailbox Behaviors for erasing deleted messages set to 'never'.
Is this for a pop or an imap account?
No other setting related to message deletion?
One pop account and one imap account. I haven't yet noticed any difference, but almost all my mail is via the imap (MobileMe) account.
A couple of weeks ago I noticed that all messages in my Mail trash has disappeared except for 'today' and 'yesterday'.
What do you mean by 'today' and 'yesterday'?
Intelligent (or clever; don't know the exact translation) mailboxes?
Mail rules?
Or?
Todays date and the previous days date. I've checked Mail's Rules and found nothing involving the Trash mailbox.
And did you have the opportunity to look at what possibly happened on the server side?
I keep nothing on the server. All "Store ... on server" boxes are unchecked.
I feared that this may have been caused by testing a script that modified mailbox Behaviors, so I have not since run that script. The script did seem to be working correctly, however. (OS X 10.6.1 and Mail 4.1)
And how did that script modify maibox behaviors?
I guess we can't guess without some help of yours... ;-)
If an incorrect behavior is detected, Mail is quit, the correct settings are written to "com.apple.mail.plist", then Mail is re-launched. The correct mailbox Behaviors are:
set |MoveDeletedMessagesToTrash| of (item i of mailAccountsList) to "YES"
set |NumberOfDaysToKeepSentMessages| of (item i of mailAccountsList) to "-1" -- (never)
set |NumberOfDaysToKeepTrash| of (item i of mailAccountsList) to "-1" -- (never)
This code does NOT run unless the settings need to be changed. This is 3 lines from a long handler. My 'setMailboxBehaviors' handler has been working correctly for a very long time in Leopard and Tiger. The problem appeared shortly after moving to Snow Leopard.
Nevertheless, every few days, at about mid-day, everything in Trash except 'today' and 'yesterday' is erased. (Fortunately, I do backup everyday.)
I have checked the preference file "com.apple.mail.plist", but found no problem.
(Except there is a key 'IndexTrash' = true whose meaning I don't know.)
Seems to be related to Mail's general preference: search into trash mailbox as well.
I checked and your'e right. Thanks.
Has anyone experienced a similar problem with messages erasing from the Trash when it should not?
No, not here. Unless some overlooked setting is acting (depending on the account type, deletion doesn't necessarily happen immediately, so as to allow the user to undo some erroneous action).
Does anyone know what 'IndexTrash' is?
See above.
I have also changed and restored these Mailbox Behaviors manually via Mail and, at first, thought I had fixed the problem. But no!
BTW, you can no longer change Mailbox Behaviors using Mail's AppleScript dictionary. As of Leopard, you can change Mailbox Behaviors via AppleScript, but they revert to the original values when Mail is quit. This worked in Tiger, however, but I can no longer test to make sure. This is why I had to change Mailbox Behaviors by writing to the preference file.