Mail.app doesn't delete e-mail off server

Discussion in 'Mac Apps and Mac App Store' started by Doctor Q, Sep 8, 2004.

  1. Doctor Q Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #1
    I use Mail.app 1.3.9 (v610) under Panther 10.3.5 with two POP3 e-mail accounts.

    When I receive e-mail from these accounts, copies of the e-mail stay on the server for one account and not for the other account. I want e-mail to be erased from the server when I pick it up for both accounts.

    These e-mail accounts use the same e-mail server, where they are set up identically, other than the mailbox name.

    They are set up identically in Mail.app as well, except for the account name and e-mail address. In particular, they both have the "Remove copy from server after retrieving a message: Right away" option checked. I have even confirmed this by peeking in file ~/Library/Preferences/com.apple.mail.plist and seeing that it says

    <key>DeletionPolicy</key>
    <string>RightAway</string>​
    for both accounts.

    To make sure "it heard me", I tried unchecking the "Remove copy..." setting, saving, quitting, launching, checking it, saving, quitting and launching again. The problem remains. Somehow the setting doesn't work for one account.

    I can manually click "Remove now" in Mail.app preferences, and the e-mail is removed from the e-mail server. But, for one out of two accounts, it does not remove e-mail automatically at the time it is received.

    Any ideas?
     
  2. fuijin macrumors newbie

    fuijin

    Joined:
    Aug 23, 2004
    Location:
    KY
    #2
    hmm. i was having the same problem but i went into preferences and changed the settings as you said you did. im sorry i dont know what to tell ya.
     
  3. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #3
    there is a bad interaction thing going on these days among malformed messages (usually from spam or virus mail), mail servers and Mail.app -- sometimes it just can't unstick broken messages and you have to use alternative means to get at them (since Mail.app can't download them, it won't show them to you as something you can delete either).

    Other POP3 mail programs might be able to extract the messages, or if you have a webmail interface to the accounts you can try looking in there.

    If the first two options aren't available to you, you can try doing it by hand. POP3 is a nice simple protocol, and you can do it from the terminal using telnet.

    Here's the conversation I would use to look at my Apple mailbox (what I type is in bold):

    $ telnet mail.mac.com pop3
    Trying 17.250.248.64...
    Connected to mail.mac.com.
    Escape character is '^]'.
    +OK Netscape Messaging Multiplexor ready
    user imeowbot
    +OK password required for user imeowbot
    pass xxxxxxxxxxx
    +OK Maildrop ready
    stat
    +OK 1 956
    quit
    +OK
    Connection closed by foreign host.
    $


    The +OK 1 956 after the stat command tells me that the mailbox has one message in it, and a total of 956 bytes are being used.

    To look at the first message, I would use retr 1

    To delete it (if it looks old and appears to be stuck), I use dele 1

    When Mail.app gets stuffed up with a mailbox like that, there may be a pile of old messages stuck in there, so this could be a tedious process doing retr and dele on messages 2 up through whatever. But usually it's right at or near the beginning, because it's been there for a while. As I mentioned above, pointing another mail program at the account to see if that can unstick it might be less annoying.

    Of course, you could have an entirely different strange problem, but I've seen Mail.app get confused with what I describe here enough times to suspect that this is what happened.

    [I would call this a Mail.app bug, even though the messages that trigger the problem are malformed. Programs need to do something sensible when they are faced with broken data, and silently leaving the mailbox stuffed isn't very sensible.]
     
  4. Doctor Q thread starter Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #4
    Thanks for the tip. I wish it was the particular problem I've run into, but it isn't.
    Code:
    [b]telnet mymailserver pop3[/b]
    Connected to mymailserver
    Escape character is '^]'.
    +OK POP at mymailserver starting.
    [b]user doctorq[/b]
    +OK Password required for doctorq
    [b]pass xxxxxxxxxxxx[/b]
    +OK doctorq has 0 messages (0 octets).
    [b]stat[/b]
    +OK 0 0
    [b]quit[/b]
    +OK Pop server at mymailserver signing off.
    Connection closed by foreign host.
    Plus, I'm administrator of this mail server so I can look at the mailboxes directly. Mine is empty after I empty it manually using Mail.app's "Remove Now" feature, but then starts filling up again. I think Mail.app is confused about whether to issue the delete commands for this account.

    So, if I want to bite the bullet and trash my preferences and redefine the account, how do I make sure to retain my previous e-mail?
     
  5. varmit macrumors 68000

    varmit

    Joined:
    Aug 5, 2003
    #5
    Do you have the setting in Mail for leaving your mail on the server checked off?
     
  6. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #6
    That's wacked out.

    I'd move all the messages out of the "special" folders (In, Out, Drafts, Sent) into new folders I created myself, then quit Mail. There will be ~/Library/Mail/Mailboxes/xxx.mbox files for each of those new folders. Drag them somewhere safe with the Finder, kill the mail prefs and start over. It might not hurt at this point to also lose the old POP-* and IMAP-* folders in ~/Library/Mail at this point, even if their mailboxes are now empty. Each of those folders contains a prefs file called MessageUidsAlreadyDownloaded, and if one of those is messed up it could possibly be contributing to the problem.

    (You could even try deleting that file in your existing problem inbox and restarting mail to see if that cures the problem, now that I think of it. Somehow I don't think it will work, but if you've already got a backup of your messages, why not give it a shot?)

    There should also be a file in there called MessageSorting.plist; you'll probably want t save a copy of that somewhere too, it contains your filters. Just like with the mailboxes, you can sneak it back into place and restart mail if reconfiguring manages to hose it.

    Then quit Mail again, put copies *.mbox back where they came from, and Mail will reconcile everything when it next starts. (moving these out and making copies might not really be necessary, but the peace of mind os nice to have.)

    It might be safe to leave those folders in place before trashing prefs, but...
     
  7. Doctor Q thread starter Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #7
    Sort of. The actual option is "Remove copy from server after retrieving a message" and I have it checked on and the drop-down set to "Right away".
     
  8. Doctor Q thread starter Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #8
    How it all turned out... a story with a happy ending.

    I finally bit the bullet, backed up my ~/Library/Mail folder, took screenshots of all the Mail.app rules I had defined, and deleted my com.apple.mail.plist file and my ~/Library/Mail folder. Then I relaunched Mail.app, set all my preferences, typed in the rules again, and imported my mail from the backup copy.

    The result was that my e-mail is now properly deleted from the mail server, solving the original problem.

    The only oddity is that three of my 12 mailboxes ended up with all the mail flagged "unread". Easy to fix, and now I'm back in business.

    Thanks for the help!
     
  9. Doctor Q thread starter Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #9
    Followup: The problem has returned. I don't know why, but my messages (for one of two e-mail accounts on the same server) collect in my mailbox, even though Mail.app is set to delete them. And now, once in a while, one of my local Mail.app folders changes so that every message is marked unread. I think I have an evil copy of Mail.app.
     
  10. art4hire macrumors newbie

    Joined:
    Jul 29, 2008
    #10
    Mail being deleted off Server

    I use a mac almost exclusively and I delete messages off my mac and they seem to be deleted. I also use a PC for some apps and on occasion I will open outlook on the PC and literally I'll have thousands of emails. It seems as though the emails I delete off my mac are not being deleted off the server until I delete them from a PC. Any thoughts?
     
  11. Doctor Q thread starter Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #11
    On the Mac (assuming you are using Mail.app), look at Mail -> Preferences -> Accounts. Select your email account name in the list on the left side and click the Advanced tab. You may need to check the "Remove copy from server" checkbox.
     

Share This Page