Squirrelmail as included with Mac OS X Server lets you remotely access your Inbox via a web-browser. It also automatically creates sub-folders to store drafts, sent, and trashed emails as done during a Squirrelmail session. These have a folder structure like this:
Inbox
Drafts
Sent
Trash
When you look at this in Apple Mail, you will see a triangle next to your Inbox, and turning it down reveals the same sub-folders. The purpose of this posting is that this structure is not the same as the default Apple Mail structure, and as such, Apple Mail and Squirrelmail will not automatically be using the same IMAP folders to store drafts, sent, and trash.
It is possible in Apple Mail to select one of these Squirrelmail-created folders, and go to the Mailbox menu and select the "Use This Mailbox For..." command to make it the folder to use for that purpose. It is also possible to edit the Squirrelmail config.php file to adjust its settings which as default will be:
$default_folder_prefix = 'INBOX/';
$trash_folder = 'Trash';
$sent_folder = 'Sent';
$draft_folder = 'Drafts';
I have worked out what to set Squirrelmail to use so that it will then use the same folders that Apple Mail uses as standard. The benefit would be that rather each and every user having to alter the Apple Mail setup, I could do one edit of the config file for Squirrelmail and this would then apply forever for all users.
Apple Mail in the Apple Mail program uses the folder names:
Drafts
Sent
Trash
However, it appears to use on the server:
Drafts
Sent Messages
Deleted Messages
So it appears that in order to get Squirrelmail to match the settings Apple Mail uses, and therefore save the Apple Mail user the hassle at their end, you need to do two things:
$default_folder_prefix = 'INBOX/';
$trash_folder = 'Trash';
$sent_folder = 'Sent';
$draft_folder = 'Drafts';
to this:
$default_folder_prefix = '';
$trash_folder = 'Deleted Messages';
$sent_folder = 'Sent Messages';
$draft_folder = 'Drafts';
This matches what Apple Mail is using. You can make this change either by manually editing /etc/squirrelmail/config/config.php, or by running sudo perl /etc/squirrelmail/config/conf.pl. PS: the iPhone, as it also runs Apple Mail will also benefit from this.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20071210040031921