Not sending mail to unregistered user because your SCM claimed this was associated with a user ID which your security realm does not recognize

Issue

  • I’m getting this message in the build console:
Not sending mail to unregistered user abc@xyz.com because your SCM claimed this was associated with a user ID `` which your security realm does not recognize; you may need changes in your SCM plugin.

How can I fix the issue?

Environment

Resolution

This error is generated by the Email Extension plugin.

The issue is that you are trying to send email notifications to an SCM user (e.g. Github user), not a Jenkins user.

A common scenario is that someone commits a change in Github but they don’t have a user in Jenkins. The code change is picked up by Jenkins to create a build and the job is configured to send notifications to the author of the commit. That means we are asking Jenkins to send emails to non-Jenkins users.

SECURITY-372 implemented changes to prevent sending emails to non-Jenkins users by default. In order to resolve the issue, we need to create a Jenkins user who is expecting to receive these notifications.

Workaround

Option 1):

As mentioned in the plugin changelog, if the security fix is undesirable in a particular instance, it can be disabled with either or both of the following two system properties:

-Dhudson.tasks.MailSender.SEND_TO_UNKNOWN_USERS=true: send mail to build culprits even if they do not seem to be associated with a valid Jenkins login.

-Dhudson.tasks.MailSender.SEND_TO_USERS_WITHOUT_READ=true: send mail to build culprits associated with a valid Jenkins login even if they would not otherwise have read access to the job.

Option 2):

Turn on the configuration under Manage Jenkins –> Configure System –> Extended E-mail Notification –> Allow sending to unregistered users.

Tested product/plugin versions

  • Managed Master 2.176.2.3-rolling
  • Email Extension 2.66

Have more questions?

0 Comments

Please sign in to leave a comment.