Closed alienscience closed 9 years ago
It depends, will it case a big refactoring to support multiple mailstore if we do it later? It can be useful if we think of a server with different users, each user could have a mailstore in their home directory with multiple mailbox
It's me who added that change. The use case for multiple mailstores was that you could use maildir for local addresses and a SQL backend for a more serious production environment at the same time. Now that I think of it, it might not be a real problem so I'm going to remove the support for this.
I also assumed that a mailbox can only be located in one mailstore. I guess I assumed wrong. For example:
You can't have alex@email.com in maildir and alex@email.com in an SQL storage at the same time. It doesn't make any sense to me and would brake things in weird ways.
Thx for the fix @xarg
A recent change added support for multiple mailstores. I cannot think of a use case for this and it adds complexity to the session.go code - many commands will require loops. It may also be difficult to merge the results from different mailstores, e.g when moving to a subfolder.
The idea of a Mailstore is based on the Apache James IMAP architecture. This project has just one Mailstore. I think it would be easiest to keep things simple for now and remove support for multiple mailstores.