I am trying to setup james (2.1a1-2002-08-18) so that given a certain set of
circumstances, a message can either get processed by one repository, or
another. Here's an example:
A message comes into the server and gets picked up by the root processor. If
the message is being sent to, say [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
for example, the mail gets routed through one type of repository ( some
subclass of org.apache.james.mailrepository.AvalonMailRepository) which
saves the message on the local filesystem.
If the message is not sent to [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> , I
would like to route it through a DIFFERENT repository which would save it in
a database, for example.
The bottom line is that I have different storage logic that I need to employ
depending on what kind of message is received. When looking through the
config.xml file, I see where I can manage the list of repositories, but it
seems to me that it only allows one kind of each type ( MAIL, SPOOL) of
repository. If I have two <repository> nodes, each of which point to
different classes, and both of which use the same type and protocol, the one
that was defined last is the one that gets used.
Any help would be appreciated.
Thanks,
Brad