- I’m getting this message in the build console:
Not sending mail to unregistered user email@example.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?
- CloudBees CI (CloudBees Core)
- CloudBees CI (CloudBees Core) on modern cloud platforms - Managed Master
- CloudBees CI (CloudBees Core) on modern cloud platforms - Operations Center
- CloudBees CI (CloudBees Core) on traditional platforms - Client Master
- CloudBees CI (CloudBees Core) on traditional platforms - Operations Center
- CloudBees Jenkins Enterprise
- CloudBees Jenkins Enterprise - Managed Master
- CloudBees Jenkins Enterprise - Operations Center
- CloudBees Jenkins Platform - Client Master
- CloudBees Jenkins Platform - Operations Center
- CloudBees Jenkins Distribution
- Jenkins LTS
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.
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.
Turn on the configuration under Manage Jenkins –> Configure System –> Extended E-mail Notification –> Allow sending to unregistered users.
Managed Master 220.127.116.11-rolling
Email Extension 2.66