Eventually I want to focus on the confusion that is the repository
management.
Its pretty much a mess at the moment, we have MailRepository,
SpoolRepository,
MailStore, and now MailBoxManager.
I think we need to have one interface "MailSource" analogous to
datasource,
which permits access to repositories by URL or User, and bind the
implementation
of that. This is because the role is not only to provide service
location for
repositories but also to manage the creation of repositories.
I tend to think that the same is true for UserRepositories , and that a
User should also be able to satisfy "getInbox()" perhaps with the help of
adding a domain attribute to User, but we're getting into the realm of
virtual hosting again.
Anyway, next I'm probably going to factor out the globals that we
have, user inboxes
for instance, sort out the local delivery mailet and remove "store"
from the
MailetContext.
It has been awhile since I looked at this but portability is also
limited anywhere that the
underlying storage medium (IE database connection) is exposed. A
limited interface should
be provided for this.
I have more questions on aliasing and default inbox etc than I have answers.
Alias or Address = "[EMAIL PROTECTED]" is a lookup for a User.
In our case (the yet to be renamed mail server that I work on that is
not JAMES):
Alias matches to a root folder. Meaning that root "Mailbox" (subtype of
folder) has multiple aliases:
andy
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(the server is domain limited on what it can accept mail for)
For SMTP, the root mailbox is looked up and then navigated to a
subfolder called INBOX. The mail is placed there.
For POP the lookup is auto contexted to a subfolder called INBOX.
Since andy is one account it is presumed that the
inbox for @foobar.com and @mail.foobar.com are equivalent. If they are
not then it makes more sense to have another
account. I could see this being made a matter for configuration in the
future, but it would be enforcing development
of a new feature on adopters (one which does not seem to directly exist
in the other mail servers that I've examined).
So I can see a more direct "getDefaultInbox" and "getDefaultOutbox"
being reasonable.
With IMAP and more directly the screwy unspecified behavior of folders
and its integration with clients ("Sent" vs
"Outbox" or "Sent Items") some kind of better aliasing support.
However, in driving adoption it again requires a new
and uncommon feature. (One which we'll probably end up supporting by
1.0 but nonetheless)
Inbox is probably safer than
outbox/sent/etc because IMAP at least directly specifies that you SHALL
have a folder called "INBOX". Moreover POP
specifies that it has some default pointer to some folder.
-Andy
I'll drop another line to this list sometime after I commit this
stuff, so you can
take a look, but in the meantime please discuss!
d.