• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • mailer-plugin
    • None
    • Linux debian wheezy

      An attempt to send an e-mail to empty list of recipients, ignored.

      Even though I have configured the alias 'proj_myapp'

          [JENKINS-27262] email is not sent

          Ferry Huberts added a comment -

          Jenkins ver. 1.598
          Debian Wheezy 32bit

          Ferry Huberts added a comment - Jenkins ver. 1.598 Debian Wheezy 32bit

          Alex Earl added a comment -

          Need a bit more information on this. How do you have your job configured? Which email plugin are you using (Mailer or email-ext)?

          Alex Earl added a comment - Need a bit more information on this. How do you have your job configured? Which email plugin are you using (Mailer or email-ext)?

          Ferry Huberts added a comment -

          I'm sorry, I thought I did describe it better.

          The mail server is configured as 'mygit' with 'mygit' in /etc/hosts as '1.2.3.4 mygit'.

          The job is configured to send an email notification to 'proj_myapp' for every unstable build.
          'proj_myapp' is an alias that is configured on 'mygit', and to which I can send email without problems.

          Before this used to work just fine.
          I don't know which version of Jenkins broke it since I don't regularly update Jenkins and don't have failing builds very often.

          It still doesn't work for Jenkins 1.607.

          Ferry Huberts added a comment - I'm sorry, I thought I did describe it better. The mail server is configured as 'mygit' with 'mygit' in /etc/hosts as '1.2.3.4 mygit'. The job is configured to send an email notification to 'proj_myapp' for every unstable build. 'proj_myapp' is an alias that is configured on 'mygit', and to which I can send email without problems. Before this used to work just fine. I don't know which version of Jenkins broke it since I don't regularly update Jenkins and don't have failing builds very often. It still doesn't work for Jenkins 1.607.

          Alex Earl added a comment -

          Which mailer plugin are you using? Also, which version of Jenkins did it work on?

          Alex Earl added a comment - Which mailer plugin are you using? Also, which version of Jenkins did it work on?

          Ferry Huberts added a comment -

          mailer = the default Jenkins mailer, currently @ 1.15

          which version: (as I said) I don't know. probably a few versions before I filed the bug

          Ferry Huberts added a comment - mailer = the default Jenkins mailer, currently @ 1.15 which version: (as I said) I don't know. probably a few versions before I filed the bug

          Alex Earl added a comment -

          Can you provide a config.xml for the job and a build log?

          Alex Earl added a comment - Can you provide a config.xml for the job and a build log?

          Ferry Huberts added a comment -

          The xml I can only provide privately.
          The part relevant to email:

              <hudson.tasks.Mailer plugin="mailer@1.12">
                <recipients>proj_nbsolsrd</recipients>
                <dontNotifyEveryUnstableBuild>false</dontNotifyEveryUnstableBuild>
                <sendToIndividuals>false</sendToIndividuals>
              </hudson.tasks.Mailer>
          

          There is nothing special in the build logs.

          Failed build:

          Build step 'Execute shell' marked build as failure
          Archiving artifacts
          An attempt to send an e-mail to empty list of recipients, ignored.
          Started calculate disk usage of build
          Finished Calculation of disk usage of build in 0 seconds
          Started calculate disk usage of workspace
          Finished Calculation of disk usage of workspace in 0 seconds
          Finished: FAILURE
          

          Next successful build:

          Archiving artifacts
          An attempt to send an e-mail to empty list of recipients, ignored.
          Started calculate disk usage of build
          Finished Calculation of disk usage of build in 0 seconds
          Started calculate disk usage of workspace
          Finished Calculation of disk usage of workspace in 0 seconds
          Finished: SUCCESS
          

          Ferry Huberts added a comment - The xml I can only provide privately. The part relevant to email: <hudson.tasks.Mailer plugin= "mailer@1.12" > <recipients>proj_nbsolsrd</recipients> <dontNotifyEveryUnstableBuild> false </dontNotifyEveryUnstableBuild> <sendToIndividuals> false </sendToIndividuals> </hudson.tasks.Mailer> There is nothing special in the build logs. Failed build: Build step 'Execute shell' marked build as failure Archiving artifacts An attempt to send an e-mail to empty list of recipients, ignored. Started calculate disk usage of build Finished Calculation of disk usage of build in 0 seconds Started calculate disk usage of workspace Finished Calculation of disk usage of workspace in 0 seconds Finished: FAILURE Next successful build: Archiving artifacts An attempt to send an e-mail to empty list of recipients, ignored. Started calculate disk usage of build Finished Calculation of disk usage of build in 0 seconds Started calculate disk usage of workspace Finished Calculation of disk usage of workspace in 0 seconds Finished: SUCCESS

          Alex Earl added a comment -

          My guess is that Mailer tries to resolve proj_nbsolsrd to a username, which is can't do and so it replaces it with an empty string. Can you try setting up a user in the Jenkins database with the username proj_nbsolsrd and specify the email address as proj_ngsolsrd and see if that works?

          Alex Earl added a comment - My guess is that Mailer tries to resolve proj_nbsolsrd to a username, which is can't do and so it replaces it with an empty string. Can you try setting up a user in the Jenkins database with the username proj_nbsolsrd and specify the email address as proj_ngsolsrd and see if that works?

          Ferry Huberts added a comment -

          I really don't want to do that for real.
          I can try it for a test but not as a solution.
          Tomorrow I can try.

          Mailer shouldn't ever try to resolve the name, the MTA will return an error when the name is not valid, it's not Jenkins' business to try to do the MTA's work.

          As I said, proj_xxx is a valid alias on the MTA, the MTA can resolve it just fine.

          Ferry Huberts added a comment - I really don't want to do that for real. I can try it for a test but not as a solution. Tomorrow I can try. Mailer shouldn't ever try to resolve the name, the MTA will return an error when the name is not valid, it's not Jenkins' business to try to do the MTA's work. As I said, proj_xxx is a valid alias on the MTA, the MTA can resolve it just fine.

          Alex Earl added a comment -

          It ALWAYS tries to resolve the address. You can claim its not Jenkins' job to do that, but its a feature that is heavily used by many people. It's not something that is going to be removed.

          Alex Earl added a comment - It ALWAYS tries to resolve the address. You can claim its not Jenkins' job to do that, but its a feature that is heavily used by many people. It's not something that is going to be removed.

          Ferry Huberts added a comment -

          then it should just assume entries that it can't resolve to be valid. removing such entries really is a mistake

          Ferry Huberts added a comment - then it should just assume entries that it can't resolve to be valid. removing such entries really is a mistake

          Alex Earl added a comment -

          Its just a theory, i don't know for sure. I don't maintain mailer, just trying to help out.

          Alex Earl added a comment - Its just a theory, i don't know for sure. I don't maintain mailer, just trying to help out.

          Alex Earl added a comment -

          Alex Earl added a comment - Looks like it will not send if it can't resolve. https://github.com/jenkinsci/mailer-plugin/blob/5049c6360ac14597a7336b88274adb867f255e84/src/main/java/hudson/tasks/MailSender.java#L444

          Ferry Huberts added a comment -

          Guys,

          Please please fix this!
          I marked it critical for a reason.

          There really is no need to remove 'unresolved' entries: if mail can't be sent the the mail server administrator will get reports from the mail agent.

          This is truly killing our workflow.

          Ferry Huberts added a comment - Guys, Please please fix this! I marked it critical for a reason. There really is no need to remove 'unresolved' entries: if mail can't be sent the the mail server administrator will get reports from the mail agent. This is truly killing our workflow.

          Alex Earl added a comment -

          I don't know if there is currently a maintainer for the Mailer plugin.

          Alex Earl added a comment - I don't know if there is currently a maintainer for the Mailer plugin.

          Ferry Huberts added a comment -

          Well, someone can easily fix this, right?
          The offending commit was already identified.

          Ferry Huberts added a comment - Well, someone can easily fix this, right? The offending commit was already identified.

          Alex Earl added a comment -

          Which commit was identified?

          Alex Earl added a comment - Which commit was identified?

          Ferry Huberts added a comment -

          See https://github.com/jenkinsci/mailer-plugin/pull/20

          Please release the plugin right after pulling this in

          Ferry Huberts added a comment - See https://github.com/jenkinsci/mailer-plugin/pull/20 Please release the plugin right after pulling this in

            Unassigned Unassigned
            fhuberts Ferry Huberts
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: