Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-2752

MappingSource::wildcard is being ignored during the RRT process

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: master, 3.3.0, 3.3.1
    • Fix Version/s: None
    • Component/s: RRT
    • Labels:

      Description

      This issue follows the user mailing list thread https://www.mail-archive.com/server-user@james.apache.org/msg15949.html

      User Story:

      When I send an email to James
      James rewrites the Recipient to a fixed address (WILCARD -> recipient@domain.com)
      

      This need had been expressed by two distinct members of the community.

      `MappingSource::wildcard` is the most straightforward way to implement this (a simple address would do the trick) but sadly MappingSource wildcard testing is not part of the AbstractRecipientRewriteTableTest test suite and thus is not supported.

          // This is failing but it should not !!!
          @Test
          public void wildcardRewritesShouldBeResolvedForAnyInput() throws Exception {
              Mapping mappingForward = Mapping.address(ADDRESS);
      
              virtualUserTable.addMapping(MappingSource.wildCard(), mappingForward);
      
              assertThat(virtualUserTable.getResolvedMappings(USER, Domain.LOCALHOST)).containsOnly(mappingForward);
          }
      

      What we should do:

      • Testing for MappingSource.wildard within AbstractRecipientRewriteTableTest
      • Support it for non-deprecated implementations - deprecated implementations can ignore this feature
      • Integration tests :
      • Using the CLI I can set up a wildcard address rewrite cf DataCommandsIntegrationTest
      • Using webadmin I can set up a wildcard address/forward/group/alias/domain entry (cf unit tests + integration tests)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              BTellier Tellier Benoit
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: