james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: aliases
Date Thu, 05 Feb 2004 16:56:26 GMT
> I doubt though that one table can cope with several domains
> and several aliases per domain.

The table maps user@domain to a string.  The string follows certain rules to
be parsable.  Craig Raw contributed the original code for XML format, which
I have extended.  A sample mapping, using the new code and the XML format,
is:

  <mailet match="All" class="XMLVirtualUserTable">
    <!-- 1:1 mapping -->
    <mapping>morgoth@middle-earth=sauron@mordor</mapping>
    <!-- 1:n mapping -->
    <mapping>istari@middle-earth=saruman@isengard;radigast;gandalf</mapping>
    <!-- DSN mapping -->
    <mapping>boromir@osgilliath=error:550 Requested action not taken: no
such user here</mapping>
    <!-- regex based mapping -->
    <mapping>*@osgilliath=regex:(.*)@osgilliath:${1}@minas-tirith</mapping>
    <!-- both standard and regex mapping -->
    <mapping>ring@*=onering@mordor;regex:ring@(.*)@:ring@${1}</mapping>
    <!-- conditional regex mapping example -->

<mapping>*@listserver=regex:(.*)-on@listserver:${1}-subscribe@listserver;

regex:(.*)-off@listserver:${1}-unsubscribe@listserver
    </mapping>
  </mailet>

If we had two tables, the string elements would be independent entries in
the second table.  That is not a bad thing.  I am simply pointing out that
we do have the basic code for this feature.  The current code parses the
mapping in the base class using a tokenizer, but I'll think about changing
the linkage so that the specialized class can handle separation.

> explain to me how you need to support something somebody else writes and
deploys
> (meaning extends a service class adds some functionality...)?

And if we want to change the interfaces?  If we want to change, perhaps
radically, how the code works?  As you said, "providing protected access
methods [encourages] use and expansion", which could encumber our own future
use and expansion.  Java lacks a "friend" mechanism, which would allow us to
make our own packages friends, and be far more restrictive about what is
truly public.

> I also created a table which contains a list of domains and ip which
> are to be refused, an extension of server and handler do the rest,
> since  I don't want to restart james all the time if I add or remove
> some.

I would have done this with the DNS server, the specialized database used
for looking up information related to hosts.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message