Problem with Jenkins email extension plugin

147 views
Skip to first unread message

Mario Jauvin

unread,
Jun 4, 2020, 8:55:02 AM6/4/20
to jenkins...@googlegroups.com

I have noticed that when using DevelopersRecipientProvider in the declarative pipeline, the information returned is the userid and not the email address.  I get the error:

Error sending to the following INVALID addresses: abc543

abc543 is the user that committed a change.

I also noticed that when I browse to http://jenkins-server/mehttp://jenkins-server/me I do not see an email address.  Just security groups.

I am using Jenkins 2.222.4 and email exntentions plugin 2.69 (both latest)

Slide

unread,
Jun 4, 2020, 8:58:25 AM6/4/20
to Jenkins User Mailing List
Did you setup the default domain in the global configuration?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/F7CC6E33-313B-4974-86F6-A89C0FD82AAC%40gmail.com.

Mario Jauvin

unread,
Jun 4, 2020, 9:30:57 AM6/4/20
to Jenkins Users
I had not.  I added the domain but our email system does not accept abc...@company.com. One must use firstname...@company.com. This information is found in active directory or I believe can be retrieved using ldap.  Any solutions?


On Thursday, June 4, 2020 at 8:58:25 AM UTC-4, slide wrote:
Did you setup the default domain in the global configuration?

On Thu, Jun 4, 2020, 05:54 Mario Jauvin <mar...@gmail.com> wrote:

I have noticed that when using DevelopersRecipientProvider in the declarative pipeline, the information returned is the userid and not the email address.  I get the error:

Error sending to the following INVALID addresses: abc543

abc543 is the user that committed a change.

I also noticed that when I browse to http://jenkins-server/mehttp://jenkins-server/me I do not see an email address.  Just security groups.

I am using Jenkins 2.222.4 and email exntentions plugin 2.69 (both latest)

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins...@googlegroups.com.

Christoph Fetzer

unread,
Jun 4, 2020, 9:38:14 AM6/4/20
to Jenkins Users
We are reading the mail addresses from ldap. The assignment user from repo commit user to mail address happens automagically in the background.

Mario Jauvin

unread,
Jun 4, 2020, 10:04:10 AM6/4/20
to Jenkins Users
This is what I thought but the automagical functionality requires an incantation because it is not working.  Any suggestions?  I have updated all plugins and jenkins to their latest most recent version.  It still does not work.

Mario Jauvin

unread,
Jun 4, 2020, 10:06:53 AM6/4/20
to Jenkins Users
This is the output in the pipeline job: 

Sending email to: abc...@company.com

This does not work in our organization. What could be the problem?

On Thursday, June 4, 2020 at 9:38:14 AM UTC-4, Christoph Fetzer wrote:

Mario Jauvin

unread,
Jun 4, 2020, 10:07:58 AM6/4/20
to Jenkins Users
Obviously the userid and domain have been camouflaged to protect the innocents.

Mario Jauvin

unread,
Jun 4, 2020, 11:25:18 AM6/4/20
to Jenkins Users
Is there some diagnostics or debugging I can turn on to troubleshoot this?


On Thursday, June 4, 2020 at 9:38:14 AM UTC-4, Christoph Fetzer wrote:

Slide

unread,
Jun 4, 2020, 12:07:38 PM6/4/20
to Jenkins User Mailing List
Do you have the LDAP plugin installed and configured? There needs to be a mechanism that the username can be converted to a an email address, this is called a MailAddressResolver (javadoc.jenkins.io/plugin/mailer/hudson/tasks/MailAddressResolver.html). Several SCM plugins implement a MailAddressResolver, in this case it sounds like you would need the LDAP plugin installed and configured, is that the case?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/91b7ad13-a006-4b6f-a876-2fb2713c0e22%40googlegroups.com.


--

Mario Jauvin

unread,
Jun 4, 2020, 1:51:35 PM6/4/20
to Jenkins Users
I am using the active directory plugin and found out the following debug log output:

Resolving e-mail address for "Smith, Jim" ID=abc456
Jun 04, 2020 1:36:42 PM FINE hudson.plugins.active_directory.ActiveDirectoryAuthenticationProvider
Login successful: abc456 dn=CN=abc456,OU=Users,OU=EXT44,OU=IN33,OU=HQ,OU=COMPANY,DC=COM
Jun 04, 2020 1:36:42 PM FINE hudson.plugins.active_directory.ActiveDirectoryMailAddressResolverImpl
Email address = 'null'



On Thursday, June 4, 2020 at 12:07:38 PM UTC-4, slide wrote:
Do you have the LDAP plugin installed and configured? There needs to be a mechanism that the username can be converted to a an email address, this is called a MailAddressResolver (javadoc.jenkins.io/plugin/mailer/hudson/tasks/MailAddressResolver.html). Several SCM plugins implement a MailAddressResolver, in this case it sounds like you would need the LDAP plugin installed and configured, is that the case?

On Thu, Jun 4, 2020 at 8:25 AM Mario Jauvin <mar...@gmail.com> wrote:
Is there some diagnostics or debugging I can turn on to troubleshoot this?

On Thursday, June 4, 2020 at 9:38:14 AM UTC-4, Christoph Fetzer wrote:
We are reading the mail addresses from ldap. The assignment user from repo commit user to mail address happens automagically in the background.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins...@googlegroups.com.

Mario Jauvin

unread,
Jun 4, 2020, 1:57:11 PM6/4/20
to Jenkins Users
I noticed that the error comes from ActiveDirectoryMailAddressResolverImpl in the active_directory plugin. Any suggestion? Is this a problem with the plugin or with the configuration?

Slide

unread,
Jun 4, 2020, 2:37:15 PM6/4/20
to Jenkins User Mailing List
Does your AD implementation put the email address in a non-standard attribute? Does the user ID exist in the AD and does that user account have a valid email address attribute?

On Thu, Jun 4, 2020 at 10:57 AM Mario Jauvin <mar...@gmail.com> wrote:
I noticed that the error comes from ActiveDirectoryMailAddressResolverImpl in the active_directory plugin. Any suggestion? Is this a problem with the plugin or with the configuration?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.


--

Mario Jauvin

unread,
Jun 4, 2020, 4:04:00 PM6/4/20
to Jenkins Users
the user exists and has an email address in the mail attribute.


On Thursday, June 4, 2020 at 2:37:15 PM UTC-4, slide wrote:
Does your AD implementation put the email address in a non-standard attribute? Does the user ID exist in the AD and does that user account have a valid email address attribute?

On Thu, Jun 4, 2020 at 10:57 AM Mario Jauvin <mar...@gmail.com> wrote:
I noticed that the error comes from ActiveDirectoryMailAddressResolverImpl in the active_directory plugin. Any suggestion? Is this a problem with the plugin or with the configuration?

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins...@googlegroups.com.

Slide

unread,
Jun 4, 2020, 4:55:29 PM6/4/20
to Jenkins User Mailing List
I am not super familiar with the AD plugin, so I am not sure why it would be returning null. Maybe you can raise an issue on Jira (when its back up) for that plugin.

To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/46a325d5-6907-4a16-ade8-ec669c5993eeo%40googlegroups.com.


--

Mario Jauvin

unread,
Jun 5, 2020, 8:49:01 AM6/5/20
to Jenkins Users
I check and with ActiveDirectoryAuthenticationProvider the email address appears.  It is in ActiveDirectoryMailAddressResolverImpl where the email is null.

I suspect that the issue is in the method updateUserInfo in ActiveDirectoryUserDetail.  I will try to debug it.  It took quite a while to set this up.  I had to copy my plugins directory into the dev jenkins instance.  Will report back.  Maybe someone with active directory jenkins plugin knowledge can chime in.

Mario Jauvin

unread,
Jun 8, 2020, 9:42:03 AM6/8/20
to Jenkins Users
It turned out that the problem was not in the jenkins or the plugin code but rather in the configuration of the test active directory domain that was being used.  Thanks for all the help.


Reply all
Reply to author
Forward
0 new messages