[JIRA] (JENKINS-58768) Mailer doesn't authenticate properly with Gmail

0 views
Skip to first unread message

Daniel.Hentschel@allworx.com (JIRA)

unread,
Aug 1, 2019, 11:04:02 AM8/1/19
to jenkinsc...@googlegroups.com
Dan Hentschel created an issue
 
Jenkins / Bug JENKINS-58768
Mailer doesn't authenticate properly with Gmail
Issue Type: Bug Bug
Assignee: Adrien Lecharpentier
Components: mailer-plugin
Created: 2019-08-01 15:03
Environment: Jenkins: 2.187 (Linux)
Mailer: 1.24
Labels: plugin mailer
Priority: Major Major
Reporter: Dan Hentschel

This appears to be a regression in Mailer 1.24. I just updated that plugin this morning. If I go to Manage Jenkins -> Configure System -> Email notification -> Advanced -> Test configuration by sending test e-mail, the test fails with:

 

Failed to send out e-mail

com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication Required. Learn more at
530 5.5.1  https://support.google.com/mail/?p=WantAuthError r14sm33254971qke.47 - gsmtp

 

If I downgrade to the 1.23 version of Mailer, and don't change my configuration at all, then the test email is sent successfully.

 

Email configuration:

 

SMTP server: smtp.gmail.com

Default user e-mail suffix: blank

Use SMTP Authentication: true

User Name and Password: set correctly

Use SSL: true

SMTP Port: 465

Reply-To Address: no-r...@allworx.com

Charset: UTF-8

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

shenzong@163.com (JIRA)

unread,
Aug 5, 2019, 10:33:02 AM8/5/19
to jenkinsc...@googlegroups.com
Zong Shen commented on Bug JENKINS-58768
 
Re: Mailer doesn't authenticate properly with Gmail

+1.

I got the same Authentication issue today on my new jenkins. I was confused why I got this error.

Then I compared with another jenkins which works properly. The only difference is the correct one use the mailer plugin 1.23 while the error one with 1.24.

I upgrade the plugin from 1.23 to 1.24, after that, I got the same error.

And it came to work again once I downgrade it back to 1.23

 

Both nodes run Jenkins ver. 2.176.2 on centOS 7.4

kamalcastro@gmail.com (JIRA)

unread,
Aug 13, 2019, 6:56:03 AM8/13/19
to jenkinsc...@googlegroups.com

I too got the same issue with "smtp.gmail.com" while performing "Test Configuration" in Manage Jenkins --> Configure System --> Mail Settings

Jenkins Version 2.176.2 on Ubuntu 18.04 LTS and Mailer Plugin 1.24.

com.sun.mail.smtp.SMTPSendFailedException: 530-5.5.1 Authentication Required. Learn more at
530 5.5.1  https://support.google.com/mail/?p=WantAuthError j6sm15598012pfg.158 - gsmtp

	at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2057)
	at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1580)
	at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1097)
	at javax.mail.Transport.send0(Transport.java:195)
	at javax.mail.Transport.send(Transport.java:124)
	at hudson.tasks.Mailer$DescriptorImpl.doSendTestMail(Mailer.java:613)
	at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:396)
	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:408)
	at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77)
	at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:212)
	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:145)
	at org.kohsuke.stapler.MetaClass$11.doDispatch(MetaClass.java:535)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedD

stanislav.miklik@gmail.com (JIRA)

unread,
Aug 16, 2019, 4:03:02 AM8/16/19
to jenkinsc...@googlegroups.com

same issue here. "Test configuration" is failing although emails are working fine. I tracked the issue down to wrong parameters send then hitting `Test configuration` button - parameters are not nested as they should be according to code: https://github.com/jenkinsci/mailer-plugin/blame/mailer-1.24/src/main/java/hudson/tasks/Mailer.java#L397

 

note that hitting "apply" sends parameters correctly.

jainsugu@gmail.com (JIRA)

unread,
Aug 26, 2019, 3:02:02 AM8/26/19
to jenkinsc...@googlegroups.com

@Zong Shen how did you downgrade the plugin?
I am not getting any such option besides the plugin (in manage plugin)

jainsugu@gmail.com (JIRA)

unread,
Aug 26, 2019, 3:33:03 AM8/26/19
to jenkinsc...@googlegroups.com

I was facing exactly same issue that Zong Shen mentioned here but the challenge for me was downgrading the plugin since I didn't see downgrade plugin option next to the installed plugin. So, here's how I did it:

1. Download mailer-1.23.hpi from https://javalibs.com/artifact/org.jenkins-ci.plugins/mailer
 
2. Goto jenkins -> Manage Jenkins -> Manage plugins -> Advanced -> Upload Plugin -> Choose downloaded file -> click on upload.
 
3. Restart jenkins once upload is done. (It was showing that mailer is already installed, don't worry just restart jenkins)
 
4. Check mailer version - it will be set to 1.23 now with an upgrade option available.
 
Now, test mail works perfectly fine. 
 
This is just a workaround. Some one please fix the issue with mailer plugin version 1.24

jainsugu@gmail.com (JIRA)

unread,
Aug 26, 2019, 3:33:05 AM8/26/19
to jenkinsc...@googlegroups.com
Sugandha Jain updated an issue
 
Change By: Sugandha Jain
Comment: @[~allenshen] how did you downgrade the plugin?

I am not getting any such option besides the plugin (in manage plugin)

jainsugu@gmail.com (JIRA)

unread,
Aug 26, 2019, 3:34:03 AM8/26/19
to jenkinsc...@googlegroups.com
Sugandha Jain edited a comment on Bug JENKINS-58768
I was facing exactly same issue that Zong Shen mentioned here but the challenge for me was downgrading the plugin since I didn't see downgrade plugin option next to the installed plugin. So, here's how I did it:

1.
# Download mailer-1.23.hpi from  [ https://javalibs.com/artifact/org.jenkins-ci.plugins/mailer ]
 
2. Goto jenkins -> Manage Jenkins -> Manage plugins -> Advanced -> Upload Plugin -> Choose downloaded file -> click on upload.
 
3. Restart jenkins once upload is done. (It was showing that mailer is already installed, don't worry just restart jenkins)
 
4. Check mailer version - it will be set to 1.23 now with an upgrade option available.
 
Now, test mail works perfectly fine.   Hope this helps someone who gets this issue.
 
This is just a workaround. Some one please fix the issue with mailer plugin version 1.24

dbeck@cloudbees.com (JIRA)

unread,
Aug 26, 2019, 3:42:02 PM8/26/19
to jenkinsc...@googlegroups.com
Daniel Beck updated an issue
 
Change By: Daniel Beck
Labels: mailer plugin regression

dbeck@cloudbees.com (JIRA)

unread,
Aug 26, 2019, 3:44:03 PM8/26/19
to jenkinsc...@googlegroups.com
Daniel Beck commented on Bug JENKINS-58768
 
Re: Mailer doesn't authenticate properly with Gmail

Only affects the "test email" feature, this code path isn't used for real emails.

dbeck@cloudbees.com (JIRA)

unread,
Aug 26, 2019, 3:45:05 PM8/26/19
to jenkinsc...@googlegroups.com
Daniel Beck started work on Bug JENKINS-58768
 
Change By: Daniel Beck
Status: Open In Progress

dbeck@cloudbees.com (JIRA)

unread,
Aug 26, 2019, 3:45:07 PM8/26/19
to jenkinsc...@googlegroups.com

dbeck@cloudbees.com (JIRA)

unread,
Oct 12, 2019, 12:07:02 PM10/12/19
to jenkinsc...@googlegroups.com
Change By: Daniel Beck
Status: In Review Closed
Resolution: Fixed
Released As: mailer-1.26
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages