Mail triggering for IBM DataPower errors
In this blog, we’ll provide examples to help demonstrate the process of mail triggering when IBM DataPower errors occur.
Prerequisites:
Go to the following link :
https://support.google.com/mail/?p=InvalidSecondFactor
Go to Security Tab:
Set the Application Password, generate it, and store it.
Login to DataPower:
- Go to User Agent
- Click on Default.
- Go to SMTP Client Policies
Configure the following as shown above:
URL Matching Expression: dsmtp://smtp.gmail.com*
Recipient e-mail: *Reciever_Mail_Address
Sender e-mail: *Sender_Mail_Address
Subject: Anything you want
Options: Enable both – STARTTLS & Authentication
Authentication Method: set as LOGIN
- Go to the Basic-Auth Policy in the same tab:
URL Matching Expression: dsmtp://smtp.gmail.com*
User name: *Sender username
Password Alias: Click on “+” to create it to keep the password
Select Password Alias:
In the password field:
Give the password which you are generated for applications in your Gmail and click on Apply
Search Log Target in the search bar and config it as shown below:
Go to Event Subscriptions:
If you want specific service logs then select it or else select all in the dropdown and select the minimum event priority. Here I selected all and error i.e, all the errors irrespective of the services will be triggered to mail.
Testing:
Go to the Home Page of Datapower.
Click on TroubleShooting
- Go to Reporting Section :
- Click on generate error report.
- Then,
Configure the following :
SMTP Server: smtp.gmail.com
Subject: Test
Email: Reciever Email
Email Sender: Sender Email Address
- Click on Send Error Report.
- Go to sender mail or receiver mail and check whether mail is triggered or not.
You can see the mails with [smtp][error][network] Event Notification then we can confirm that mails have been triggered and our smtp log target worked fine.