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

Email-Ext Plugin is not resolving Email from Active Directory

       
      I have performed the Active Directory integration with the plugin. I am using TFS as a source control. Now whenever someone performs a check-in, the build is triggered. And it sends mail to the culprit developer in case of failure. But the issue is, it is not fetching the Mail Id from active directory but fetching from its own database. Suppose a user with ID: A123456 performs check-in and so it tries to send mail to A123456@Domain.com(If i click on people in Jenkins i can see a new user is created with ID and Name A123456, ideally id should map to Active Directory). But it should fetch the mail from active directory as this is incorrect id.

       

      I am using Active Directory and TFS, But still it is going to resolve the Email fro JIRA.

       

      hudson.plugins.jira.JiraMailAddressResolver@495024 failed to resolve A123456. Ignoring and moving on
      java.lang.NullPointerException
      at hudson.plugins.jira.JiraMailAddressResolver.findMailAddressFor(JiraMailAddressResolver.java:35)
      at hudson.tasks.MailAddressResolver.resolve(MailAddressResolver.java:125)
      at hudson.tasks.Mailer$UserProperty.getAddress(Mailer.java:747)
      at hudson.plugins.tfs.model.TfsUserLookup.find(TfsUserLookup.java:40)
      at hudson.plugins.tfs.model.Project.convertServerChangeset(Project.java:60)
      at hudson.plugins.tfs.model.Project.getVCCHistory(Project.java:101)
      at hudson.plugins.tfs.model.Project.getDetailedHistoryWithoutCloakedPaths(Project.java:225)
      at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:66)
      at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:352)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:125)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
      at

          [JENKINS-62713] Email-Ext Plugin is not resolving Email from Active Directory

          Arpit Gupta created issue -
          Arpit Gupta made changes -
          Description Original:  
          I have performed the Active Directory integration with the plugin. I am using TFS as a source control. Now whenever someone performs a check-in, the build is triggered. And it sends mail to the culprit developer in case of failure. But the issue is, it is not fetching the Mail Id from active directory but fetching from its own database. Suppose a user with ID: A123456 performs check-in and so it tries to send mail to A123456@Domain.com(If i click on people in Jenkins i can see a new user is created with ID and Name A123456, ideally id should map to Active Directory). But it should fetch the mail from active directory as this is incorrect id.
          New:  
           I have performed the Active Directory integration with the plugin. I am using TFS as a source control. Now whenever someone performs a check-in, the build is triggered. And it sends mail to the culprit developer in case of failure. But the issue is, it is not fetching the Mail Id from active directory but fetching from its own database. Suppose a user with ID: A123456 performs check-in and so it tries to send mail to A123456@Domain.com(If i click on people in Jenkins i can see a new user is created with ID and Name A123456, ideally id should map to Active Directory). But it should fetch the mail from active directory as this is incorrect id.

           

          I am using Active Directory and TFS, But still it is going to resolve the Email fro JUra.

           

          hudson.plugins.jira.JiraMailAddressResolver@495024 failed to resolve A123456. Ignoring and moving on
          java.lang.NullPointerException
           at hudson.plugins.jira.JiraMailAddressResolver.findMailAddressFor(JiraMailAddressResolver.java:35)
           at hudson.tasks.MailAddressResolver.resolve(MailAddressResolver.java:125)
           at hudson.tasks.Mailer$UserProperty.getAddress(Mailer.java:747)
           at hudson.plugins.tfs.model.TfsUserLookup.find(TfsUserLookup.java:40)
           at hudson.plugins.tfs.model.Project.convertServerChangeset(Project.java:60)
           at hudson.plugins.tfs.model.Project.getVCCHistory(Project.java:101)
           at hudson.plugins.tfs.model.Project.getDetailedHistoryWithoutCloakedPaths(Project.java:225)
           at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:66)
           at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:352)
           at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:125)
           at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
           at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
           at
          Arpit Gupta made changes -
          Description Original:  
           I have performed the Active Directory integration with the plugin. I am using TFS as a source control. Now whenever someone performs a check-in, the build is triggered. And it sends mail to the culprit developer in case of failure. But the issue is, it is not fetching the Mail Id from active directory but fetching from its own database. Suppose a user with ID: A123456 performs check-in and so it tries to send mail to A123456@Domain.com(If i click on people in Jenkins i can see a new user is created with ID and Name A123456, ideally id should map to Active Directory). But it should fetch the mail from active directory as this is incorrect id.

           

          I am using Active Directory and TFS, But still it is going to resolve the Email fro JUra.

           

          hudson.plugins.jira.JiraMailAddressResolver@495024 failed to resolve A123456. Ignoring and moving on
          java.lang.NullPointerException
           at hudson.plugins.jira.JiraMailAddressResolver.findMailAddressFor(JiraMailAddressResolver.java:35)
           at hudson.tasks.MailAddressResolver.resolve(MailAddressResolver.java:125)
           at hudson.tasks.Mailer$UserProperty.getAddress(Mailer.java:747)
           at hudson.plugins.tfs.model.TfsUserLookup.find(TfsUserLookup.java:40)
           at hudson.plugins.tfs.model.Project.convertServerChangeset(Project.java:60)
           at hudson.plugins.tfs.model.Project.getVCCHistory(Project.java:101)
           at hudson.plugins.tfs.model.Project.getDetailedHistoryWithoutCloakedPaths(Project.java:225)
           at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:66)
           at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:352)
           at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:125)
           at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
           at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
           at
          New:  
           I have performed the Active Directory integration with the plugin. I am using TFS as a source control. Now whenever someone performs a check-in, the build is triggered. And it sends mail to the culprit developer in case of failure. But the issue is, it is not fetching the Mail Id from active directory but fetching from its own database. Suppose a user with ID: A123456 performs check-in and so it tries to send mail to A123456@Domain.com(If i click on people in Jenkins i can see a new user is created with ID and Name A123456, ideally id should map to Active Directory). But it should fetch the mail from active directory as this is incorrect id.

           

          I am using Active Directory and TFS, But still it is going to resolve the Email fro JIRA.

           

          hudson.plugins.jira.JiraMailAddressResolver@495024 failed to resolve A123456. Ignoring and moving on
           java.lang.NullPointerException
           at hudson.plugins.jira.JiraMailAddressResolver.findMailAddressFor(JiraMailAddressResolver.java:35)
           at hudson.tasks.MailAddressResolver.resolve(MailAddressResolver.java:125)
           at hudson.tasks.Mailer$UserProperty.getAddress(Mailer.java:747)
           at hudson.plugins.tfs.model.TfsUserLookup.find(TfsUserLookup.java:40)
           at hudson.plugins.tfs.model.Project.convertServerChangeset(Project.java:60)
           at hudson.plugins.tfs.model.Project.getVCCHistory(Project.java:101)
           at hudson.plugins.tfs.model.Project.getDetailedHistoryWithoutCloakedPaths(Project.java:225)
           at hudson.plugins.tfs.actions.CheckoutAction.checkout(CheckoutAction.java:66)
           at hudson.plugins.tfs.TeamFoundationServerScm.checkout(TeamFoundationServerScm.java:352)
           at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:125)
           at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:93)
           at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:80)
           at
          Arpit Gupta made changes -
          Component/s New: active-directory-plugin [ 15526 ]

          Alex Earl added a comment -

          MailAddressResolver is a class in the Mailer plugin. It loops through all of the classes that inherit from the class and if one of them can resolve the email address, it uses that. This is not an issue with email-ext.

          Alex Earl added a comment - MailAddressResolver is a class in the Mailer plugin. It loops through all of the classes that inherit from the class and if one of them can resolve the email address, it uses that. This is not an issue with email-ext.
          Alex Earl made changes -
          Component/s Original: email-ext-plugin [ 15538 ]
          Arpit Gupta made changes -
          Component/s New: tfs-plugin [ 15521 ]

          Arpit Gupta added a comment -

          But why is it trying to resolve the mail address using JiraMailAddressResolver when it is integrated with the Active directory

          Arpit Gupta added a comment - But why is it trying to resolve the mail address using JiraMailAddressResolver when it is integrated with the Active directory

          Alex Earl added a comment -

          Because the MailAddressResolver gets a list of all available resolvers and the first one that says it can resolve wins. See https://github.com/jenkinsci/mailer-plugin/blob/master/src/main/java/hudson/tasks/MailAddressResolver.java#L123

          Alex Earl added a comment - Because the MailAddressResolver gets a list of all available resolvers and the first one that says it can resolve wins. See https://github.com/jenkinsci/mailer-plugin/blob/master/src/main/java/hudson/tasks/MailAddressResolver.java#L123

          Arpit Gupta added a comment -

          I have not performed integration with JIRA. Then why is Jira able to resolve the aderess. 

          Arpit Gupta added a comment - I have not performed integration with JIRA. Then why is Jira able to resolve the aderess. 

            fbelzunc FĂ©lix Belzunce Arcos
            arpit2503 Arpit Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: