Jenkins Email-Ext Plug - "Could not be sent to following addresses" - jenkins

I have been troubleshooting an issue with the Jenkins Email-Ext plugin for a while. I have a user on the recipient list for an email-ext notification across multiple pipelines, and in every pipeline Jenkins returns the following in the console output:
"Sending email to: ...
Could not be sent to following addresses: ..."
And this one user in particular is always on the "could not be sent" list. I have tried adding the user to multiple Azure AD groups which should have necessary permissions for these pipelines. I have compared the azure groups to other users in the same department who are able to receive emails, and this user, by all accounts, should have access.
I performed an Exchange message trace to see if the email was blocked at the Exchange level, but there is no record of it.
I am at a loss since documentation on this plugin is very limited, and I cannot find any one having dealt with this issue before online.

Related

The verification could not be sent to NeverBounce

I am new at Zapier and trying to make an email verification using NeverBounce from Zapier and complete the following setup.
I create an app in NeverBounce.
I complete Trigger in steps in Zapier.
Completed the Action and logged in NeverBounce by IP key.
And finally, during testing, I get this error!
The verification could not be sent to NeverBounce.
The app returned `{"message":"We were unable to complete your request. Check our system status at https://twitter.com/neverbounceapi as their may be an issue with our system. The following information was supplied: Insufficient credit balance.
Here is an screen shoot of the error I am facing
Thanks for your help😊.
The error message says you don't have enough credits, you may want to check your account. Or this may be just a glitch with the test procedure and you may want to just proceed with the Zap and see if the actual run is successful.
As an alternative, you may want to switch to Verifalia instead, which not only includes daily credits even with its free plan but also allows to verify lists of email addresses through Zapier (in addition to single email verification).
Verifalia integrations: https://verifalia.com/integrations
Verifalia Zapier integration: https://zapier.com/apps/verifalia/integrations
Disclaimer: I work for Verifalia and have developed its Zapier integration.

TFS not always emailing pull request notifications

I have a project in TFS. The last two pull requests, we got emails for "xxx has approved the code" but not the subsequent emails for "xxx marked the pull request as completed" The pull requests in question were both approved and completed. The emails do not appear to have been caught in Outlook's spam filter.
The subscription for all projects is "A pull request I created or am a reviewer on is updated"
Version: 15.117.26714.0
Is there a way to diagnose why TFS email notifications are so flaky? This isn't the first complaint I've gotten about TFS email notifications being unreliable.
Have tested TFS 2017.2 instance but could not reproduce the issue on my side. Both approved and completed E-mail sent correctly.
So the issue seems not be able to stable reproduce. For now, there is no way to trouble shoot this directly. You could check the event log in TFS sever to see if you got any error or warning info there.
To narrow down the issue, you could analysis both address the E-mail achieved and sent.
Notifications are sent to your preferred email address, which you can
change from your account preferences. Change the preferred one
and use another to see if issue still exists.
The received notifications are sent by the configured SMTP
server. Try to specify another SMTP Server and the email address
to use for sending emails.
One possibility for this issue, the action of approved and completed pull request were too closely. This may cause TFS only trigger one E-Mail. Do it slowly and try again. Based on my testing, in this case, the E-Mail are sent not in sequence, the completed came first then the approved one.
Moreover, you could also explicitly add a subscription with "A pull request I created or am a reviewer on is updated" just for the project you are working on, which may do the trick.

TFS 2018 Email Notifications not sending out

I have been working on a new TFS 2018 install and I have everything setup with the exception of email notifications. I setup in the admin console the SMTP relay information and when i click test and enter in my email, I get the test notification. Now when i switch to the TFS web console and I create a new work item and assign it to a user the user never gets an email. I have verified that the team notification are on and there is a notification setup for when a work item is assigned. Is there something Im missing, is there a log I need to enable to show if there are errors sending emails out?
any help would be great.
Firstly, please make sure you have created the subscriptions correctly and the SMTP server is OK. See Manage notifications for a team.
Based on my test, teams who are not part of Contributors group are not able to receive email notifications.
So, if your project team is not a member of the Contributors group, just add the team to the group. Then try it again.
Another workaround is using the email address directly when creating the subscriptions. This should be related to the AD sync issue. Refer to this thread for details: .
Without Active Directory, TFS will not send team alerts. Users can set
their preferred email address, which TFS will then sync to Active
Directory as the "[Member's default email address]". If no Active
Directory is found, that sync won't work, which means their default
email is blank. Blank email means no alert sent (which means no error
about the sending failing either).

Jenkins "Not sending mail to unregistered user"

Jenkins refuses to send error mails to some users.
In the log I found these messages:
....
Build step 'Maven Goals aufrufen' marked build as failure
Not sending mail to unregistered user user1#example.org
Sending e-mails to: user2#example.org
Finished: FAILURE
The user (user1) is listed in the admin people list. He also has an registered email (user1#example.org).
So why is this user called an unregistered user?
When searching for this warning, I find several open JIRA issues such as https://issues.jenkins-ci.org/browse/JENKINS-43178
But these doesn't help me.
Is this a misconfiguration or a jenkins bug?
There's Allow sending to unregistered users setting under Configure System menu at least in Jenkins >= 2.150.1.
The problem was (for me):
SECURITY-372 (advisory) Emails were sent to addresses not associated with
actual users of Jenkins.
I am using Jenkins with a Gerrit trigger for newly created Patchsets or published drafts.
With this security "fix", Jenkins will try to "guess" the Username from the name before the email address. For Example in "Name Surname ", the "Name Surname" part will be the Username jenkins tries to lookup in the Jenkins UserDB, but that combination is not the same identifier that is used in our LDAP and thus, jenkins will not send emails....unless:
https://wiki.jenkins.io/display/JENKINS/Email-ext+plugin#Email-extplugin-2.57.2(April10,2017)
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.
These JAVA_ARGS can be added in /etc/default/jenkins or /etc/sysconfig/jenkins, depending on your distribution.
To clarify Matthias' answer:
Even if a user account is created during a build (as the SCM provides information about the committer(s)), it is still an 'unregistered user' to Jenkins. Thus, no emails will be sent to that user.
If you navigate to the respective user account at <your-jenkins-URL>/asynchPeople/ you can configure this user account and enter a password for it. Theoretically, the user could login to Jenkins using this password, now. And as soon as a Jenkins user account has a password associated, it is no longer considered 'unregistered'. And will receive email notifications. Voila.
From the OP it's not clear if they use LDAP, but here is some information that solved it for me and that I haven't found anywhere, including the Jenkins JIRA.
The following suggestion:
-Dhudson.tasks.MailSender.SEND_TO_UNKNOWN_USERS=true
as well as:
Allow sending to unregistered users
and:
Create committer as Jenkins user
did not work for me. The first answer did put me on the track to a solution, though.
It turns out that when using LDAP, Jenkins actually matches against the user name of the git committer. So if the git commit message is:
Committer: John Doe <John.Doe#company.com> 2019-05-27 19:12:00
Jenkins will take "John Doe", convert it to "john.doe" and try to match against LDAP. Now, if your LDAP user name is "john.doe" you're good, but in my case the company standard is "doejohn", which will lead to the dreaded message:
Not sending mail to unregistered user John.Doe#company.com
This message is very misleading since it shows the correct e-mail address instead of mentioning the invented (non-existing) user name. The solution for me was to configure the git user name to "doejohn":
$ git config --global user.name "doejohn"
The unregistered user had no jenkins password. After entering a password in the jenkins user password field, mails are sent to that user.
To enter the password
navigate to the user management "People": http://jenkins/asynchPeople/
select a user
select "Configure"
Enter the password in the password field

Integrating JIRA Service Desk with PagerDuty

I would like to create a PagerDuty incident every time a customer creates an issue of a certain type (Fault) on JIRA Service Desk. So I have created a JIRA user with the email address provided by PagerDuty, an incident was created when JIRA sent the invitation to PagerDuty, which seems to indicate that when JIRA sends an email, PagerDuty gets it. Then I added an automation rule (issue notifications did not work as I didn't find a way to send a notification only when an issue of a certain type is created), to notify my special user every time an issue is created with the Fault type.
But when I create an issue of this type, nothing seems to be sent to PagerDuty. I have tested sending an email directly to the email address of PagerDuty user and it worked. I have tested notifying another user when an issue is created in JIRA Service desk and it worked too. So I don't know what's wrong but I can't get the email to be sent to PagerDuty from JIRA Service Desk. Any idea of what I missed?

Resources