matomo-org / matomo

Empowering People Ethically with the leading open source alternative to Google Analytics that gives you full control over your data. Matomo lets you easily collect data from websites & apps and visualise this data and extract insights. Privacy is built-in. Liberating Web Analytics. Star us on Github? +1. And we love Pull Requests!
https://matomo.org/
GNU General Public License v3.0
19.83k stars 2.64k forks source link

Configure Security Notification #21168

Open tassoman opened 1 year ago

tassoman commented 1 year ago

When action are performed inside matomo, a "SecurityNotification" is trigged by CoreAdminHome plugin.

Summary

Inside global.ini.php there is no option to disable security notification sending.
Hooking with a plugin it's impossible to stop other plugin activiites.

My environment is still 4.14.2 stable but also appears into 5.x branch.

Your Environment

tassoman commented 1 year ago

In my case, an user got deleted by admin interface UI then an unwanted mail got triggered. There's no trace about notifications inside CoreAdminHome plugin

I found this part of API code https://github.com/matomo-org/matomo/blob/c94c54f62d5da04a24d84831e277449361189c78/plugins/CorePluginsAdmin/API.php#L131

sgiehl commented 1 year ago

You're right. It's currently not possible to turn off all or certain security emails using the config. As a workaround you might be able to solve that by hooking into the Mail.shouldSend event. You could check if the mail is from a certain class and stop sending the mail in that case maybe.

tassoman commented 1 year ago

I found this question is also related to #18216