Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-28594

Leading underscore added to committers email address.

      When automatic e-mails to committers are triggered, the domain name with underscore is added to the mail address.

      For example:
      Domain user 'domain/user' e-mail should be 'user@mailserver.com', instead, the mail is sent to 'domain_user@mailserver.com'.

          [JENKINS-28594] Leading underscore added to committers email address.

          nir h created issue -

          Alex Earl added a comment -

          Are you sure the activedirectory plugin is the one returning the addresses? The email-ext plugin uses the MailAddressResolver from Mailer to resolve addresses for users. So, this isn't a bug with email-ext.

          Alex Earl added a comment - Are you sure the activedirectory plugin is the one returning the addresses? The email-ext plugin uses the MailAddressResolver from Mailer to resolve addresses for users. So, this isn't a bug with email-ext.
          Alex Earl made changes -
          Assignee Original: Alex Earl [ slide_o_mix ]
          nir h made changes -
          Component/s New: mailer-plugin [ 17522 ]

          nir h added a comment -

          Not sure which plugin exactly causes this issue.

          nir h added a comment - Not sure which plugin exactly causes this issue.

          Alex Earl added a comment -

          can you enable the logger for hudson.plugins.active_directory.ActiveDirectoryMailAddressResolverImpl at the FINE level and see what the logs show for when the address is resolved?

          Alex Earl added a comment - can you enable the logger for hudson.plugins.active_directory.ActiveDirectoryMailAddressResolverImpl at the FINE level and see what the logs show for when the address is resolved?

          nir h added a comment -

          Here is it (I switched my domain and user name with [myDomain] and [myUserName]:

          May 28, 2015 4:45:15 PM FINE hudson.plugins.active_directory.ActiveDirectoryMailAddressResolverImpl
          Failed to look up Active Directory for e-mail address
          org.acegisecurity.userdetails.UsernameNotFoundException: No such user or group: [myDomain]_[myUserName]
          at hudson.plugins.active_directory.ActiveDirectoryAuthenticationProvider.getDnOfUserOrGroup(ActiveDirectoryAuthenticationProvider.java:220)
          at hudson.plugins.active_directory.ActiveDirectoryAuthenticationProvider.retrieveUser(ActiveDirectoryAuthenticationProvider.java:107)
          at hudson.plugins.active_directory.AbstractActiveDirectoryAuthenticationProvider.loadUserByUsername(AbstractActiveDirectoryAuthenticationProvider.java:53)
          at hudson.plugins.active_directory.ActiveDirectoryMailAddressResolverImpl.findMailAddressFor(ActiveDirectoryMailAddressResolverImpl.java:54)
          at hudson.tasks.MailAddressResolver.resolve(MailAddressResolver.java:122)
          at hudson.tasks.Mailer$UserProperty.getAddress(Mailer.java:560)
          at hudson.plugins.tfs.model.TfsUserLookup.find(TfsUserLookup.java:32)
          at hudson.plugins.tfs.model.Project.convertServerChangeset(Project.java:63)
          at hudson.plugins.tfs.model.Project.getVCCHistory(Project.java:110)
          at hudson.plugins.tfs.model.Project.getDetailedHistory(Project.java:130)
          at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:38)
          at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:214)
          at hudson.model.AbstractProject.checkout(AbstractProject.java:1276)
          at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
          at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
          at hudson.model.Run.execute(Run.java:1744)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:98)
          at hudson.model.Executor.run(Executor.java:374)

          nir h added a comment - Here is it (I switched my domain and user name with [myDomain] and [myUserName] : May 28, 2015 4:45:15 PM FINE hudson.plugins.active_directory.ActiveDirectoryMailAddressResolverImpl Failed to look up Active Directory for e-mail address org.acegisecurity.userdetails.UsernameNotFoundException: No such user or group: [myDomain] _ [myUserName] at hudson.plugins.active_directory.ActiveDirectoryAuthenticationProvider.getDnOfUserOrGroup(ActiveDirectoryAuthenticationProvider.java:220) at hudson.plugins.active_directory.ActiveDirectoryAuthenticationProvider.retrieveUser(ActiveDirectoryAuthenticationProvider.java:107) at hudson.plugins.active_directory.AbstractActiveDirectoryAuthenticationProvider.loadUserByUsername(AbstractActiveDirectoryAuthenticationProvider.java:53) at hudson.plugins.active_directory.ActiveDirectoryMailAddressResolverImpl.findMailAddressFor(ActiveDirectoryMailAddressResolverImpl.java:54) at hudson.tasks.MailAddressResolver.resolve(MailAddressResolver.java:122) at hudson.tasks.Mailer$UserProperty.getAddress(Mailer.java:560) at hudson.plugins.tfs.model.TfsUserLookup.find(TfsUserLookup.java:32) at hudson.plugins.tfs.model.Project.convertServerChangeset(Project.java:63) at hudson.plugins.tfs.model.Project.getVCCHistory(Project.java:110) at hudson.plugins.tfs.model.Project.getDetailedHistory(Project.java:130) at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:38) at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:214) at hudson.model.AbstractProject.checkout(AbstractProject.java:1276) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532) at hudson.model.Run.execute(Run.java:1744) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374)

          Alex Earl added a comment -

          How does TFS store your username? Can you add a logger for "hudson.plugins.tfs.model.TfsUserLookup" as well?

          Alex Earl added a comment - How does TFS store your username? Can you add a logger for "hudson.plugins.tfs.model.TfsUserLookup" as well?

          nir h added a comment -

          I don't know how TFS stores my username.
          Adding "hudson.plugins.tfs.model.TfsUserLookup" added the following line before the ActiveDirectoryMailAddressResolverImpl log:
          "
          May 28, 2015 6:28:37 PM FINE hudson.plugins.tfs.model.TfsUserLookup
          Looking up Jenkins user for TFS account '%s'.
          "

          nir h added a comment - I don't know how TFS stores my username. Adding "hudson.plugins.tfs.model.TfsUserLookup" added the following line before the ActiveDirectoryMailAddressResolverImpl log: " May 28, 2015 6:28:37 PM FINE hudson.plugins.tfs.model.TfsUserLookup Looking up Jenkins user for TFS account '%s'. "

          Alex Earl added a comment -

          Oh, that's fantastic...they don't have the value for the account name. What my guess is happening is that the user account name comes in as domain\username, this is passed to the MailAddressResolver, which converts the \ into a _. It doesn't find a user in the Jenkins database with that account and so it can't resolve the address correctly. Can you go to http://YOURSERVER/jenkins/asynchPeople/ and see if there are user accounts in the form of domain_user?

          Alex Earl added a comment - Oh, that's fantastic...they don't have the value for the account name. What my guess is happening is that the user account name comes in as domain\username, this is passed to the MailAddressResolver, which converts the \ into a _. It doesn't find a user in the Jenkins database with that account and so it can't resolve the address correctly. Can you go to http://YOURSERVER/jenkins/asynchPeople/ and see if there are user accounts in the form of domain_user?

            Unassigned Unassigned
            nir_hp nir h
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: