-
Bug
-
Resolution: Not A Defect
-
Minor
-
Jenkins v1.580.2
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
CentOS release 6.6 (Final)
-
Powered by SuggestiMate
I am trying to use the "Default user E-mail suffix" setting to avoid duplication in the "Default Recipients" list, but it doesn't seem to be working. For example:
With this configuration, I expect Email-Ext to append the default suffix to each entry in the default recipients list. This does seem to happen, as the log reports
Checking if email needs to be generated Email was triggered for: Always Sending email for trigger: Always messageContentType = text/html; charset=UTF-8 Request made to attach build log Request made to compress build log Adding recipients from project recipient list Adding recipients from trigger recipient list Setting In-Reply-To since last build was not successful Successfully created MimeMessage Sending email to: john.doe@foo.com jane.doe@foo.com
But the email does not appear to be sent. At least, I'm not receiving anything.
However, with the suffixes manually appended to each entry in the default recipients list:
The emails are sent without issue. What's going on here?
[JENKINS-28300] Emails not sent when default recipients do not include default suffix
Yes, the log output is the same, and this is the only change.
On a tangential note, the tooltip for the Debug mode setting seems to imply that Email-Ext will output logging information to the Jenkins system log, but I can't find anything in there.
I'm going to need some more information, I am able to send emails successfully with just the username in the recipients list box (no suffix). I tried with just one recipient and multiple recipients and the email sent successfully to all recipients listed.
What plugins do you have installed? Do those users have email addresses defined in their people page? Do you use an scm?
Having trouble connecting to our VPN at the moment, so I can't give you a complete list of installed plugins, but I can tell you that all users have an email address configured, and we're using the Git plugin for SCM.
System Properties
Name | Value |
---|---|
awt.toolkit | sun.awt.X11.XToolkit |
executable-war | /usr/lib/jenkins/jenkins.war |
file.encoding | UTF-8 |
file.encoding.pkg | sun.io |
file.separator | / |
hudson.diyChunking | true |
java.awt.graphicsenv | sun.awt.X11GraphicsEnvironment |
java.awt.headless | true |
java.awt.printerjob | sun.print.PSPrinterJob |
java.class.path | /usr/lib/jenkins/jenkins.war |
java.class.version | 51.0 |
java.endorsed.dirs | /usr/java/jdk1.7.0_51/jre/lib/endorsed |
java.ext.dirs | /usr/java/jdk1.7.0_51/jre/lib/ext:/usr/java/packages/lib/ext |
java.home | /usr/java/jdk1.7.0_51/jre |
java.io.tmpdir | /tmp |
java.library.path | /usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib |
java.runtime.name | Java(TM) SE Runtime Environment |
java.runtime.version | 1.7.0_51-b13 |
java.specification.name | Java Platform API Specification |
java.specification.vendor | Oracle Corporation |
java.specification.version | 1.7 |
java.vendor | Oracle Corporation |
java.vendor.url | http://java.oracle.com/ |
java.vendor.url.bug | http://bugreport.sun.com/bugreport/ |
java.version | 1.7.0_51 |
java.vm.info | mixed mode |
java.vm.name | Java HotSpot(TM) 64-Bit Server VM |
java.vm.specification.name | Java Virtual Machine Specification |
java.vm.specification.vendor | Oracle Corporation |
java.vm.specification.version | 1.7 |
java.vm.vendor | Oracle Corporation |
java.vm.version | 24.51-b03 |
JENKINS_HOME | /var/lib/jenkins |
jna.platform.library.path | /usr/lib64:/lib64:/usr/lib:/lib |
lib.svnkit.http.methods | Digest,Basic,NTLM,Negotiate |
lib.svnkit.ssh2.persistent | false |
line.separator | |
mail.smtp.sendpartial | true |
mail.smtps.sendpartial | true |
os.arch | amd64 |
os.name | Linux |
os.version | 2.6.32-504.16.2.el6.x86_64 |
path.separator | : |
sun.arch.data.model | 64 |
sun.boot.class.path | /usr/java/jdk1.7.0_51/jre/lib/resources.jar:/usr/java/jdk1.7.0_51/jre/lib/rt.jar:/usr/java/jdk1.7.0_51/jre/lib/sunrsasign.jar:/usr/java/jdk1.7.0_51/jre/lib/jsse.jar:/usr/java/jdk1.7.0_51/jre/lib/jce.jar:/usr/java/jdk1.7.0_51/jre/lib/charsets.jar:/usr/java/jdk1.7.0_51/jre/lib/jfr.jar:/usr/java/jdk1.7.0_51/jre/classes |
sun.boot.library.path | /usr/java/jdk1.7.0_51/jre/lib/amd64 |
sun.cpu.endian | little |
sun.cpu.isalist | |
sun.font.fontmanager | sun.awt.X11FontManager |
sun.io.unicode.encoding | UnicodeLittle |
sun.java.command | /usr/lib/jenkins/jenkins.war --logfile=/var/log/jenkins/jenkins.log --webroot=/var/cache/jenkins/war --httpPort=8080 --ajp13Port=8009 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20 |
sun.java.launcher | SUN_STANDARD |
sun.jnu.encoding | UTF-8 |
sun.management.compiler | HotSpot 64-Bit Tiered Compilers |
sun.os.patch.level | unknown |
user.country | US |
user.dir | / |
user.home | /var/lib/jenkins |
user.language | en |
user.name | jenkins |
user.timezone | US/Eastern |
Environment Variables
Name | Value |
---|---|
_ | /etc/alternatives/java |
CONSOLETYPE | vt |
HOME | /var/lib/jenkins |
LANG | en_US.UTF-8 |
LANGSH_SOURCED | 1 |
LOGNAME | jenkins |
NLSPATH | /usr/dt/lib/nls/msg/%L/%N.cat |
PATH | /sbin:/usr/sbin:/bin:/usr/bin |
previous | N |
PREVLEVEL | N |
PWD | / |
RUNLEVEL | 3 |
SHELL | /bin/bash |
SHLVL | 3 |
TERM | linux |
UPSTART_EVENTS | runlevel |
UPSTART_INSTANCE | |
UPSTART_JOB | rc |
USER | jenkins |
XFILESEARCHPATH | /usr/dt/app-defaults/%L/Dt |
Plugins
Name | Version | Enabled | Pinned |
---|---|---|---|
active-directory | 1.39 | true | false |
analysis-core | 1.71 | true | false |
ansicolor | 0.4.1 | true | false |
ant | 1.2 | true | false |
antisamy-markup-formatter | 1.3 | true | true |
bitbucket | 1.1.0 | true | false |
bitbucket-pullrequest-builder | 1.4.5 | true | false |
checkstyle | 3.42 | true | false |
clone-workspace-scm | 0.6 | true | false |
cloudbees-folder | 4.8 | true | false |
cobertura | 1.9.7 | true | false |
conditional-buildstep | 1.3.3 | true | false |
credentials | 1.22 | true | true |
cvs | 2.12 | true | true |
email-ext | 2.40.1 | true | false |
envinject | 1.91.2 | true | false |
external-monitor-job | 1.4 | true | true |
git | 2.3.5 | true | false |
git-client | 1.17.0 | true | false |
hipchat | 0.1.9 | true | false |
javadoc | 1.3 | true | true |
jenkins-multijob-plugin | 1.16 | true | false |
junit | 1.6 | true | true |
ldap | 1.11 | true | true |
mailer | 1.15 | true | true |
mapdb-api | 1.0.6.0 | true | false |
matrix-auth | 1.2 | true | true |
matrix-project | 1.4 | true | true |
maven-plugin | 2.9 | true | true |
next-build-number | 1.1 | true | false |
nodejs | 0.2.1 | true | false |
pam-auth | 1.2 | true | true |
parameterized-trigger | 2.26 | true | false |
postbuild-task | 1.8 | true | false |
postbuildscript | 0.17 | true | false |
role-strategy | 2.2.0 | true | false |
run-condition | 1.0 | true | false |
sbt | 1.5 | true | false |
scm-api | 0.2 | true | false |
scoverage | 1.1.2 | true | false |
script-security | 1.14 | true | false |
ssh-credentials | 1.11 | true | true |
ssh-slaves | 1.9 | true | true |
subversion | 2.5 | true | true |
template-project | 1.4.2 | true | false |
token-macro | 1.10 | true | false |
translation | 1.12 | true | true |
versionnumber | 1.5 | true | false |
violations | 0.7.11 | true | false |
warnings | 4.47 | true | false |
windows-slaves | 1.0 | true | false |
ws-cleanup | 0.25 | true | false |
Ok, I've been running on Windows, I can try running on Linux, though I don't think it will make a difference for me. Can you try enabling debug mode in JavaMail (you would need to set mail.debug=true in the system properties).
Alex: This could be a regression in Mailer. I think it now refuses email to addresses without @ IIRC.
I'm not using mailer to create the javamail session anymore, also in my tests on my machine it works without the suffix just fine. I should test with a newer version of mailer just in case though. Thanks for the idea.
I upgraded to Mailer 1.15 as is listed in the table above, but it still sends emails just fine.
Alright, I set mail.debug to true in the system properties and restarted. Now what?
Run the build and post the build log. It should contain debug output from JavaMail.
Strange, now that I go to test it again, it's working fine. I'll report back here if I have any more problems.
Ah, I was wrong. It still isn't working, but not for the reason I thought. Compressing and attaching the build log seems to be the issue.
When "Attach Build Log" is set to "Compress and Attach Build Log", the email is not sent. However, when it is set to either "Attach Build Log" or "Do Not Attach Build Log", the email is sent with no problems.
Here's the log with "Compress and Attach Build Log", which claims to have sent the email:
Checking if email needs to be generated Email was triggered for: Always Sending email for trigger: Always messageContentType = text/html; charset=UTF-8 Request made to attach build log Request made to compress build log Adding recipients from project recipient list Adding recipients from trigger recipient list Successfully created MimeMessage Sending email to: master.commander@foo.com john.doe@foo.com jane.doe@foo.com joe.blow@foo.com row.boat@foo.com low.goat@foo.com DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc] DEBUG SMTP: useEhlo true, useAuth false DEBUG SMTP: trying to connect to host "<SMTP proxy host>", port 25, isSSL false 220 mail-ut-01.foo.local Microsoft ESMTP MAIL Service, Version: 7.5.7601.17514 ready at Mon, 11 May 2015 13:33:39 -0400 DEBUG SMTP: connected to host "<SMTP proxy host>", port: 25 EHLO jenkins-ut-01.foo.local 250-mail-ut-01.foo.local Hello [<Jenkins host>] 250-TURN 250-SIZE 2097152 250-ETRN 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-8bitmime 250-BINARYMIME 250-CHUNKING 250-VRFY 250 OK DEBUG SMTP: Found extension "TURN", arg "" DEBUG SMTP: Found extension "SIZE", arg "2097152" DEBUG SMTP: Found extension "ETRN", arg "" DEBUG SMTP: Found extension "PIPELINING", arg "" DEBUG SMTP: Found extension "DSN", arg "" DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg "" DEBUG SMTP: Found extension "8bitmime", arg "" DEBUG SMTP: Found extension "BINARYMIME", arg "" DEBUG SMTP: Found extension "CHUNKING", arg "" DEBUG SMTP: Found extension "VRFY", arg "" DEBUG SMTP: Found extension "OK", arg "" DEBUG SMTP: use8bit false MAIL FROM:<jenkins@foo.com> 250 2.1.0 jenkins@foo.com....Sender OK DEBUG SMTP: sendPartial set RCPT TO:<master.commander@foo.com> 250 2.1.5 master.commander@foo.com RCPT TO:<john.doe@foo.com> 250 2.1.5 john.doe@foo.com RCPT TO:<jane.doe@foo.com> 250 2.1.5 jane.doe@foo.com RCPT TO:<joe.blow@foo.com> 250 2.1.5 joe.blow@foo.com RCPT TO:<row.boat@foo.com> 250 2.1.5 row.boat@foo.com RCPT TO:<low.goat@foo.com> 250 2.1.5 low.goat@foo.com DEBUG SMTP: Verified Addresses DEBUG SMTP: master.commander@foo.com DEBUG SMTP: john.doe@foo.com DEBUG SMTP: jane.doe@foo.com DEBUG SMTP: joe.blow@foo.com DEBUG SMTP: row.boat@foo.com DEBUG SMTP: low.goat@foo.com DATA 354 Start mail input; end with <CRLF>.<CRLF> Date: Mon, 11 May 2015 13:33:38 -0400 (EDT) From:jenkins@foo.com Reply-To:master.commander@foo.com To: master.commander@foo.com, john.doe@foo.com, jane.doe@foo.com, joe.blow@foo.com, row.boat@foo.com, low.goat@foo.com Message-ID: <1125147562.1.1431365619490.JavaMail.jenkins@jenkins-ut-01.foo.local> Subject: =?UTF-8?Q?Dashboard_=C2=BB_Dev_=C2=BB_Dashboard-Dev-Deplo?= =?UTF-8?Q?y-Frontend_-_Build_#_61_-_Successful!?= MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_0_965143550.1431365618993" X-Jenkins-Job: Dashboard-Dev-Deploy-Frontend X-Jenkins-Result: SUCCESS ------=_Part_0_965143550.1431365618993 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable ... (HTML body here) ... ------=_Part_0_965143550.1431365618993 Content-Type: application/octet-stream; name=build.zip Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=build.zip ... (attachment binary stuff here) ... ------=_Part_0_965143550.1431365618993-- . 250 2.6.0 <1125147562.1.1431365619490.JavaMail.jenkins@jenkins-ut-01.foo.local> Queued mail for delivery QUIT 221 2.0.0 mail-ut-01.foo.local Service closing transmission channel Finished: SUCCESS
I originally thought it had been fixed because the build I tested just happened to be configured to not attach a build log.
Hmmm, the javamail log looks like things are working, but I'll take a look
Do you have the capability to check the logs on the server to see if there are any errors?
Argh, I messed up again. Talked to IT, and apparently our SMTP server rejects emails with .exe and .zip attachments for security reasons. So there's no problem with the plugin, I'm just a dolt. Sorry to waste your time!
my case I'm able to send email using default setting[even able to send text email] but not able to send email from Editable Email plugin.
Please help.
Is the build log output the same when you have the suffix added to the recipients list? Also, is this the only change you make in the configuration?