There is no need to use the plugin. Go to your vmail directory, example:
cd /var/vmail/example.com/exampleUser/
then, if you want for example to have all messages stored into the "Sent Messages"
folder to be stored into the "Sent"
folder instead, just move the files of "Sent Messages"
into "Sent"
through your client as first step.
Then, in the /var/vmail/example.com/exampleUser/mail
folder, remove the "Sent Messages"
hidden folder:
rm -r /var/vmail/example.com/exampleUser/mail/.Sent\ Messages
Before sending any other email, proceed adding a symlink to the hidden folder "Sent"
from "Sent Messages"
(long line here, if you copy and paste do it carefully):
ln -s /var/vmail/example.com/exampleUser/mail/.Sent /var/vmail/example.com/exampleUser/mail/.Sent\ Messages
This should be working fine. Just repeat the same procedure if you want to have the "Sent Items"
or "Mail Sent"
or any other folder symlinked to the "Sent"
one, or if you want any other solution with other folders pointing to other folders and keep the mails in just one of them.
If you need to make dovecot and the client to use "INBOX"
as the "Sent"
folder, you should create the symbolic link from the mail folder with the username (long line again):
ln -s /var/vmail/example.com/exampleUser/mail/ /var/vmail/example.com/exampleUser/mail/.Sent\ Messages
unless you didn't change it. Then edit in the /etc/dovecot/conf.d/15-mailboxes.conf
the lines:
namespace inbox {
# For \Sent mailboxes there are two widely used names. We'll mark both of
# them as \Sent. User typically deletes one of them if duplicates are created.
mailbox Sent {
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
}
or other equivalent to make them become:
namespace inbox {
# For \Sent mailboxes there are two widely used names. We'll mark both of
# them as \Sent. User typically deletes one of them if duplicates are created.
mailbox INBOX {
special_use = \Sent
}
mailbox INBOX {
special_use = \Sent
}
}
As you can notice, two are the same now, so you can just delete one:
namespace inbox {
# For \Sent mailboxes there are two widely used names. We'll mark both of
# them as \Sent. User typically deletes one of them if duplicates are created.
mailbox INBOX {
special_use = \Sent
}
}
Then it should work fine.
I've gone through this process because I wanted my sent emails to be in my inbox folder both from my laptop and my phone. The dovecot hack was enough for the laptop, but the phone kept using the "Sent Messages"
folder, so I had to use the symlink trick. Be very careful in selecting the right "Sent"
or "Sent Messages"
or whatever folder to make the symlink to and from!
I guess the plugin simply does a symlink itself, so you're just making similar stuff. With this technique you may merge all the folders you want and keep your clients work with no changes. :-)