Issue
- I would like to understand where sender email address for Multi-Factor Authentication comes from.
- I would like to set the log levels so I can see when emails are sent.
Environment
- Liferay DXP 7.4
Resolution
Set up the email's sender:
- By default, when using Multi-Factor Authentication, emails sent by Liferay DXP use the name and email address of the default admin user.
- These are the following:
-
admin.email.from.name=Joe Bloggs
admin.email.from.address=test@domain.invalid - To change the admin email address, add the admin email address property in your portal-ext.properties file and enter your custom value.
- However, if you do not want to change the admin email address, you can set up a separate email address, where Multi-Factor Authentication emails will come from.
- Navigate to Control Panel → Instance Settings → Security → Multi-Factor Authentication and enter another email address in the Template for Email “From” Field.
Set up logging for Multi-Factor Authentication
- Navigate to Control Panel > Server Administration > Log Level
- Search for the following category (add it if not found):
-
com.liferay.multi.factor.authentication.email.otp.web.internal.portlet.action.SendMFAEmailOTPMVCResourceCommand - Raise the log levels to DEBUG
-
The resulting log messages look like this:
DEBUG [http-nio-8080-exec-3][SendMFAEmailOTPMVCResourceCommand:122] One-time password email sent to user 20126 at address test@liferay.com
Additional Information