Inert Ramblings

Mail.app and Courier IMAP: The message could not be saved

Posted in Gnus, IDTENT by Sciri on March 9, 2006

Mac OS X Mail.app doesn’t properly work out of the box when connecting to a Courier IMAP (Plesk) mail server. If Mailbox Behaviors is configured to save Drafts, Sent, Junk, or Trash on the server then Mail.app will constantly report the error The message could not be saved. Quite annoying and, in the case of the Sent mailbox, Mail.app will happily just send the message to the bit bucket and not tell you.

To solve the problem go to Preferences, Advanced, and use INBOX as your IMAP Path Prefix. Problem solved!

Many thanks go out to MacFixIt and SpamapS.

Update (03/29/2007): Please note that this fix is not a magic bullet and is specifically for Courier IMAP mail servers running on Linux managed by a Plesk control panel environment because that’s the only place I’ve tested it. There are literally hundreds of different IMAP servers out there and each one has its own quirks and configuration options.

50 Responses

Subscribe to comments with RSS.

  1. Ben said, on May 22, 2006 at 2:49 am

    Brilliant, thanks for that. I’d been wondering about the ‘could not be saved’ errors, along with my Sent items disappearing into the void, for some time.

    Don’t know why I didn’t think of it earlier, I found out about the “INBOX.” prefix a while ago. Guess I didn’t put 2 and 2 together.

    Thanks again :)

  2. Barry said, on June 30, 2006 at 4:58 am

    much appreciated – your comments saved a lot of messing around and I got the problem solved

    thanks
    Barry

  3. Stan said, on July 26, 2006 at 12:44 pm

    Thanks a lot for the tip, a lot of the documentation for these everyday Mac apps is obscure. Nice to have a simple fix for the problem.
    Thanks :-)
    Stan

  4. Dave said, on August 5, 2006 at 6:33 pm

    Thank you SO MUCH! That fix works perfectly!! :D

  5. James Brown said, on August 18, 2006 at 1:29 am

    Cool!

    Works for me too – well, so far! :-)

    Thanks.

  6. G said, on August 28, 2006 at 6:19 pm

    Yep, this was a life-saver! My hosting company upgraded my IMAP server and that’s when this began. Your tip saved me a ton of time! Thanks!

  7. Dietrich said, on September 27, 2006 at 2:42 am

    thanks a bunch. Mystery solved

  8. Paul B said, on October 18, 2006 at 4:48 pm

    Thanks – fixed a most annoying problem :-)

  9. Carl T said, on November 4, 2006 at 1:36 am

    This didn’t work for me. My account is an AOL account — any other ideas for what might work?

    Cheers!

  10. Marie said, on November 9, 2006 at 3:43 pm

    Thank you so much! I haven’t tried it yet, but I hope it’ll work for me since it worked for other people. It was SO frustrating and I spent a lot of time trying to solve it.

    Best,
    M.

  11. Marie said, on November 10, 2006 at 10:16 am

    I was too early to be happy…

    This new setting brought other troubles – I wasn’t able to access my subfolders on the server. It would complain that folder Inbox/blah wasn’t found on the server….
    :(
    Any ideas?
    Thanks!

  12. Sean said, on November 10, 2006 at 11:21 am

    Marie, changing the prefix has different behavior on different servers. In the case of Plesk, at least in my experience, changing the prefix didn’t prevent me from accessing my subfolders.

    Other servers may rely on the prefix to build the path to the subfolders. A possible workaround is to change the prefix back to what it was, copy all your subfolders to a local e-mail account (On My Mac), change the prefix back to INBOX, and then copy your subfolders back up to the IMAP server. I’ve never done that to solve your specific problem but I’ve done it before to backup e-mail from one server to another.

  13. zaphod2016 said, on December 1, 2006 at 9:25 pm

    Thanks a million!

    I finally have my “sent” folder back!

    I have three IMAP boxes setup across two servers, one Plesk, the other cP. Out-of-the-box my Mail App worked fine. On Nov 7, I suddenly lost the ability to save drafts and see “sent” mail. Following the above advice did the trick, even though I lost the cP mailbox too.

    I’m still a Mac n00b, so I’m not sure what happened. Did an Apple Update change a setting? I seem to remember downloading a few Mail updates. This one really had me stumped.

    Anyway, thanks again.

  14. Bill said, on January 10, 2007 at 9:09 pm

    Thanks for the tip! :D

  15. scoop said, on January 23, 2007 at 9:54 am

    Using INBOX for the IMAP path prefix works for one of my IMAP accounts (using port 143 with no SSL), but not for my .Mac account (using port 993 with SSL on). I’ve tried turning SSL off for the .Mac account, but it still won’t save drafts. Any suggestions?

  16. Don said, on January 25, 2007 at 10:03 am

    Thanks, I only have one IMAP account, so this was popping up every so often, but with no consistency. Very confusing. But the fix worked great!

  17. Ben said, on February 2, 2007 at 5:27 pm

    Awesome tip, that error was driving me nuts! Thank you!

  18. Jennifer Hetzl said, on February 7, 2007 at 7:09 am

    I have this problem in a strange form: 2 out of my 3 IMAP e-mail accounts do not allow to save messages (but ‘Store sent messages on the server’ is OFF, thus sent e-mails go to my Sent folder). 1 account allows to save messages, sent e-mails go to the sent folder, ‘Store sent messages on the server’ is ON however. All other settings for the 3 accounts are identical, e.g. in the ‘Advanced’ section. Any ideas on this?

  19. Duane said, on February 19, 2007 at 9:10 pm

    Better fix.

    Right click your “Inbox” and choose “get info”

    Select the mailbox behaviors

    Desellect Drafts: Store draft messages on server.

    The error should go away.

  20. Sean said, on February 19, 2007 at 9:36 pm

    Duane,

    That gets rid of the error but does not solve the problem. Your solution is like saying “only drive during the day because your headlights don’t work”. ;)

    Your “fix” defeats the whole purpose of IMAP which is to give you access to all your e-mail, including Drafts and Sent Messages, from any computer at any time.

  21. Rich said, on March 8, 2007 at 11:06 am

    Sean – Great tip, thanks very much!

  22. [...] Thanks to George, I am no longer annoyed by the Mail.app error message for IMAP accounts about not being able to save the message. [...]

  23. Fred said, on March 28, 2007 at 5:03 pm

    This isn’t working for me – I get the errors regardless … I have “Advanced” and IMAP Path Prefix: INBOX

    I’ve tried it with “automatically synronize changed mailboxes” checked and unchecked, restarted mail, etc., but always get the error – it’s NOT saving draft to server. Under MailBox behaviors, I *DO* have “Store draft messages on server” selected as well.

  24. Tom said, on March 29, 2007 at 11:40 am

    I am eager to use this “INBOX” fix, but when I do, I find that all of my folders becomed orphaned. How can I fix this. Mail.app help doesn’t even acknowledge this problem and I haven’t found any tips anywhere else. Thanks!

  25. Sean said, on March 29, 2007 at 12:38 pm

    Tom,

    Please note that this particular documented INBOX fix only applies when connecting to Courier IMAP servers running on Linux under the Plesk control panel environment because that’s the only place I’ve tested it. There are literally hundreds of IMAP mail servers out there and each one may have its own quirks and configuration options.

    It sounds like the IMAP server you’re connecting to may not be a Courier/Plesk configuration or it uses a different style of user management. Basically, a “normal” IMAP server creates a mail/ folder under a user’s account and the IMAP Path Prefix is usually “mail/”. This means that the IMAP server looks at the default inbox (/var/spool/mail/username) for incoming mail and the mail/ folder for additional saved folders. It sounds like changing the prefix to INBOX made your mail client look for a folder called INBOX which doesn’t exist on your particular IMAP server.

    In a Courier/Plesk configuration each user doesn’t have a real account; there’s a virtual user database where mail gets funneled on a per-domain basis. By changing the prefix to INBOX it tells the Courier IMAP server to look in the virtual INBOX area instead of a real folder on disk.

  26. Zach said, on May 26, 2007 at 7:09 am

    Thanks for the great info! I’ve verified that this also works for a Courier/cPanel installation also running on Linux.

    Another useful trick so solve a problem I was having (Mail.app making its own “Sent Messages” instead of using the “Sent” folder that already existed) is to select a mailbox on the server (Sent in this case), go to Mail.app’s Mailbox menu, choose “Use this mailbox for…” and select the desired mailbox (Sent again). Now Mail.app properly saves my sent messages in the “Sent” mailbox instead of its own “Sent Messages” box.

  27. [...] If you’re using a Plesk server for email, see this fix. [...]

  28. Scot Hacker said, on June 28, 2007 at 11:57 pm

    Yep – This definitely does the trick on courier IMAP for cPanel 11 as well (probably cPanel 10 too, though I upgraded to cPanel 11 and from mbox to maildir at the same time on the server I run, so I never got to test with maildir and cPanel 10).

  29. Toby said, on June 30, 2007 at 6:36 am

    I too can confirm this problem exists between Mail.app on OS 10.4.10 and a server running CentOS 3.8 with cPanel 11 – but only after we switched the server from running UW-IMAP mbox to courier-IMAP maildir (as is now recommended).

    Applying a combination of the solutions recommended here seems to have worked.

  30. Chad Bishop said, on July 7, 2007 at 2:12 pm

    Big thanks for this tip!!! I’ll make sure to share w/ some other CPanel 11 users!

    -cb

  31. Ed said, on July 11, 2007 at 5:57 pm

    Thanks for this fix. It worked, but created a new account icon in the left nav iwth the draft, sent and trash messages. I guess that’s okay. Will my sent messages be synced with the server in case I log in from home?

  32. DCSOS@aol.com said, on August 26, 2007 at 9:23 pm

    All my SAVED MAIL disappeared from local folder when implementing this..
    BEWARE
    Apple Mail still won’t allow you to save these mails except individually
    so better do it befor implementing this fix

  33. Sean said, on August 27, 2007 at 12:58 pm

    DCSOS: Your Saved Mail folder didn’t disappear; it relocated from the Sent top-level folder to the On My Mac top-level folder. Same thing happened to me.

  34. Ben said, on September 5, 2007 at 8:42 pm

    Awesome stuff … I thought I had this right, but I had checked “Automatically synchronize changed mailboxes,” and my machine froze. I still have it checked on my personal machine, but not my work machine, which is the one that was giving me problems. Everything is all good now … thanks!

  35. [...] people offered their solutions and workarounds. One of the necessary steps is to tell Mail that the IMAP path prefix is “INBOX”; the other necessary step is to set up a mapping between the remote [...]

  36. Dan Thies said, on September 11, 2007 at 11:00 pm

    Thanks for this… I’ve been trying to sort this out. Same setup (Plesk/Courier).

    I had to log into my webmail (Horde) and create the Draft and Trash folders to get that to work. (Options / Mail / Server and Folder Information)

  37. Randy said, on October 1, 2007 at 8:19 pm

    Zach #26,

    i did the same thing: designated the server’s sent mail as the Sent Mail box by “Use this mailbox for…” command. But now Mail.app has become horribly slow…it takes 20-30 seconds to populate the email lists when switching between folders.

    Does anyone have a way to speed this up? Or undo what i did?

    Thanks,
    R

  38. Kelli said, on October 8, 2007 at 8:50 pm

    THANK YOU!!!!! These are the sort of things that drive me nuts (my husband would say I’m crazy)

  39. Tripple said, on October 12, 2007 at 5:01 pm

    This fix also applies when connecting to Courier IMAP servers running on Llnux under the ISPConfig control panel environment.

    Thanks for the tip!

  40. Alex said, on October 17, 2007 at 8:58 am

    Thanks a million, this had me totally stumped!

  41. Ross said, on October 28, 2007 at 4:17 pm

    Thank you! That really helped! :-)

  42. Matt White said, on December 12, 2007 at 1:20 pm

    Just started hosting with Plesk after doing things manually for a couple years. Ran into this problem immediately, and this fixed it right up! Thanks!

  43. Jameel said, on January 8, 2008 at 7:23 pm

    You rock for this one. Finding it now because I’ve put up with it this long, but that’s great! No more error dialog box interruptions when composing…

    Oh yea, and an actually saved draft!

    Thanks!

  44. Daemin said, on January 19, 2008 at 1:53 pm

    Hm, I´m having a little problem,

    When I type INBOX into the field “IMAP path prefix”, it
    1- doesnt solve my problem (mails being composed as well as saved manually as drafts, and sent mails, do not save / appear.
    2- my IMAP mail folders on the server, that usually appear in a nice, orderly list on the left below my local (on the mac) folders, within a “NAME OF IMAP ACC” remote folder which has as a logo a black earth with a white @ on top of it.

    I´m wondering what I´m doing wrong…

  45. espen tagestad said, on January 20, 2008 at 6:33 am

    Thanks a lot for this tip.

  46. Niall McCormack said, on January 22, 2008 at 6:15 pm

    This didn’t work for me and I know my server uses Courier on Linux. So I did a little more searching and found this result…

    ///
    Select the account in the mailbox sidebar, and click on the + at the bottom left of the window to create a sub-folder of said [IMAP] account. Name it what you want; it should not matter. Now select the sub-folder (expanding the arrow if necessary), and go in the menubar to Mailbox > Use This Mailbox For > Sent.
    ///

    So if you already have a ‘Sent’ folder that you wish to use, select that then follow the instructions. This also works perfectly for Trash, Drafts and Junk. Hurrah!!

  47. mike said, on April 11, 2008 at 5:52 pm

    top tip, worked a treat.

  48. Rory said, on May 15, 2008 at 9:53 pm

    I’ve been having BIG problems with IMAP & courier on Cpanel. I have the path correct & it works great. Recently, I’ve been causing courier to put enourmous sustained cpu load on the linux server and this causes my hosting account to get suspended. I have no idea why this happens. Thunderbird does it too but not on windows at uni. Just on mac at home. It went from one of to almost every time I check email now. I have temporarily switched to pop :( Any ideas?

  49. ken said, on January 10, 2009 at 12:00 am

    What if it’s a POP Account?

  50. Martin said, on April 20, 2009 at 7:29 am

    Great tip, it saved me a trip the genius bar.


Leave a Reply