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

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.

52 thoughts on “Mail.app and Courier IMAP: The message could not be saved”

  1. 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. 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

  3. 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!

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

    Cheers!

  5. 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.

  6. 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!

  7. 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.

  8. 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.

  9. 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?

  10. 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!

  11. 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?

  12. 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.

  13. 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.

  14. 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.

  15. 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!

  16. 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.

  17. 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.

  18. 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).

  19. 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.

  20. 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?

  21. 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

  22. 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.

  23. 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!

  24. 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)

  25. 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

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

    Thanks for the tip!

  27. 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!

  28. 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…

  29. 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!!

  30. 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?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.