Alias Folders in Dovecot

Since I’ve now been able to use my mobile phone to send e-mails I have noticed a small issue. The folders which my Outlook client uses to store the sent e-mails is different than what the Phone client uses.

I noticed this issue when I went to look in the ‘Sent’ folder in Outlook and didn’t see the any of the e-mails which I knew I had sent from the phone. A quick look around revealed a new  folder ‘.sent items’ had been created and within it the e-mails were stored. arrgh.

I had a choice to make. I can either reconfigure Outlook and SquirrelMail to store e-mails in Sent Items – but then I thought – if others also started using Phones I would have to alter their configurations. Probably a lot of unnecessary work.

Unfortunately in dovecot – my chosen IMAP server – there is no aliasing of folders capability. The only way to  get this to work is  to use filesystem symlinks (symbolic links).

Once I’d moved the e-mails into the Sent folder I then ‘fixed’ this with

sudo rm -r ".sent items"
sudo ln -s .Sent ".sent items" 

And similarly my client also used ‘.deleted items’ so I linked .deleted items to .Trash

This is truly ugly, but thre is now other way to do this right now.