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

Leading and trailing underscores are added to commiters email address, unable to send build notification

XMLWordPrintable

      Jenkins email-ext plugin fails to send email, the error is

      Failed to create e-mail address for _developer1@xxx.net_
      Failed to create e-mail address for _developer2@xxx.net_
      Failed to create e-mail address for _developer1@xxx.net_
      Failed to create e-mail address for _developer1@xxx.net_

      (Names and domain are changed)

      Jan 13, 2013 7:15:56 PM hudson.plugins.emailext.ExtendedEmailPublisher addAddressesFromRecipientList
      WARNING: Could not create email address.
      javax.mail.internet.AddressException: Domain contains illegal character in string ``_developer1@xxx.net_''
      at javax.mail.internet.InternetAddress.checkAddress(InternetAddress.java:1269)
      at javax.mail.internet.InternetAddress.parse(InternetAddress.java:1091)
      at javax.mail.internet.InternetAddress.parse(InternetAddress.java:633)
      at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:111)
      at hudson.plugins.emailext.EmailRecipientUtils.convertRecipientString(EmailRecipientUtils.java:60)
      at hudson.plugins.emailext.ExtendedEmailPublisher.addAddressesFromRecipientList(ExtendedEmailPublisher.java:687)
      at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:508)
      at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:297)
      at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:289)
      at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:249)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:810)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perJan 13, 2013 7:15:56 PM hudson.plugins.emailext.ExtendedEmailPublisher addAddressesFromRecipientList
      WARNING: Could not create email address.
      javax.mail.internet.AddressException: Domain contains illegal character in string ``_developer1@xxx.net_''
      at javax.mail.internet.InternetAddress.checkAddress(InternetAddress.java:1269)
      at javax.mail.internet.InternetAddress.parse(InternetAddress.java:1091)
      at javax.mail.internet.InternetAddress.parse(InternetAddress.java:633)
      at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:111)
      at hudson.plugins.emailext.EmailRecipientUtils.convertRecipientString(EmailRecipientUtils.java:60)
      at hudson.plugins.emailext.ExtendedEmailPublisher.addAddressesFromRecipientList(ExtendedEmailPublisher.java:687)
      at hudson.plugins.emailext.ExtendedEmailPublisher.createMail(ExtendedEmailPublisher.java:508)
      at hudson.plugins.emailext.ExtendedEmailPublisher.sendMail(ExtendedEmailPublisher.java:297)
      at hudson.plugins.emailext.ExtendedEmailPublisher._perform(ExtendedEmailPublisher.java:289)
      at hudson.plugins.emailext.ExtendedEmailPublisher.perform(ExtendedEmailPublisher.java:249)
      at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:810)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:785)
      at hudson.model.Build$BuildExecution.cleanUp(Build.java:192)
      at hudson.model.Run.execute(Run.java:1587)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:236)formAllBuildSteps(AbstractBuild.java:785)
      at hudson.model.Build$BuildExecution.cleanUp(Build.java:192)
      at hudson.model.Run.execute(Run.java:1587)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:236)

      First I thought is the problem is in email-ext plugin, but when I went to "Changes" tab and opened the page

      http://host/jenkins/user/Developer%201%20__developer1@xxx.net_/
      (hostname changed)

      it showed

      Jenkins User Id: Developer 1 _developer1@xxx.net_

      For unknown reason Jenkins adds a leading and trailing underscore to email address

      Environment
      Jenkins ver. 1.498
      Jenkins Mercurial plugin 1.42
      Jenkins Email Extension Plugin 2.25
      Mercurial Distributed SCM (version 1.4.3)
      Ubuntu 10.04.4 LTS
      Java(TM) SE Runtime Environment (build 1.6.0_32-b05)
      Java HotSpot(TM) 64-Bit Server VM (build 20.7-b02, mixed mode)

      We have a build cluster with a master and two slaves, this problem happened on the slave machine.

      When I type hg log on Jenkins job's workspace, then all changesets have
      correct email address without underscores, so it is not Mercurial configuration problem.

            jglick Jesse Glick
            sgr Sergey Grigoriev
            Votes:
            6 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:
              Resolved: