James Server
  1. James Server
  2. JAMES-1035

XML/JDBCVirtualUserTable should not implement DomainList

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: 3.0-M1
    • Component/s: James Core
    • Labels:
      None

      Description

      VirtualUserTable (AbstractVirtualUserTable and its implementations) implements DomainList but should not be related to the domain management.
      We should remove "implements DomainList" and its implementation methods.
      We should also remove the mentions in spring-beans.xml as possible "domainlist" bean.

        Activity

        Eric Charles created issue -
        Eric Charles made changes -
        Field Original Value New Value
        Assignee Eric Charles [ eric@apache.org ]
        Hide
        Eric Charles added a comment -
        Show
        Eric Charles added a comment - Implemented and committed in http://svn.apache.org/viewvc?rev=985504&view=rev
        Eric Charles made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Hide
        Stefano Bagnara added a comment -

        IIRC implementing DomainList was a need in order to configure James with JDBCVirtualUserTable and still use the same bean also for the server domain list. This way you have a single db table for users and domains are "computed" from enlisted rules.

        I'm not suggesting we should revert this commit, just explaining how it worked!

        I'm not up to date with the current trunk, so maybe now we have a smarter way to manage multi domain virtual user tables and domains without the need to reconfigure/restart james: in this case maybe we should add at least a comment here on how to do that now.

        Show
        Stefano Bagnara added a comment - IIRC implementing DomainList was a need in order to configure James with JDBCVirtualUserTable and still use the same bean also for the server domain list. This way you have a single db table for users and domains are "computed" from enlisted rules. I'm not suggesting we should revert this commit, just explaining how it worked! I'm not up to date with the current trunk, so maybe now we have a smarter way to manage multi domain virtual user tables and domains without the need to reconfigure/restart james: in this case maybe we should add at least a comment here on how to do that now.
        Hide
        Eric Charles added a comment -

        There are 2 ways to create usernames depending on the value of <enableVirtualHosting/> in James.xml
        1.- false: a String (without @). In this case, the associated email will be the username + the default domain defined in James.xml
        2.- true: the option 1.- or a email address.

        Mapping is always from a mail address (name@domain.tld) to a username (so : mail -> username).

        For XMLVirtualUserTable, mappings are defined in virtualusertable-store.xml and are statically read at startup (so you need to restart).
        For JDBCVirtualUserTable, mappings can be created via management console and are taken into account without the need to restart.

        In both cases, the mail of the mapping ("mail -> username) can be a mail of a domain listed as a james local domain, or any other external domain.

        For multidomain support, the classical path is:

        • create the list of local domains
        • create the username such as "user@domain.tld".

        After, create your mappings : addmapping any_email_address username

        With this change, we don't support anymore something like "the list of domains is generated from a list of existing mappings" (I guess this is what was done with the previous impl).
        But with that, I think there was a mix of 2 things : the domains list, and the mapping list.

        For the record, the forward and alias stuff are no more supported.

        If still ok to everyone to remove the "implements DomainList", the possible configs will be documented on James 3.0 web site.

        Show
        Eric Charles added a comment - There are 2 ways to create usernames depending on the value of <enableVirtualHosting/> in James.xml 1.- false: a String (without @). In this case, the associated email will be the username + the default domain defined in James.xml 2.- true: the option 1.- or a email address. Mapping is always from a mail address (name@domain.tld) to a username (so : mail -> username). For XMLVirtualUserTable, mappings are defined in virtualusertable-store.xml and are statically read at startup (so you need to restart). For JDBCVirtualUserTable, mappings can be created via management console and are taken into account without the need to restart. In both cases, the mail of the mapping ("mail -> username) can be a mail of a domain listed as a james local domain, or any other external domain. For multidomain support, the classical path is: create the list of local domains create the username such as "user@domain.tld". After, create your mappings : addmapping any_email_address username With this change, we don't support anymore something like "the list of domains is generated from a list of existing mappings" (I guess this is what was done with the previous impl). But with that, I think there was a mix of 2 things : the domains list, and the mapping list. For the record, the forward and alias stuff are no more supported. If still ok to everyone to remove the "implements DomainList", the possible configs will be documented on James 3.0 web site.
        Hide
        Norman Maurer added a comment -

        I'm with eric here.. lets get rid of it

        Show
        Norman Maurer added a comment - I'm with eric here.. lets get rid of it
        Mark Thomas made changes -
        Workflow jira [ 12518018 ] Default workflow, editable Closed status [ 12566123 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12566123 ] jira [ 12581511 ]

          People

          • Assignee:
            Eric Charles
            Reporter:
            Eric Charles
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development