Debian - Ubuntu
Edit /etc/mdadm/mdadm.conf and add the following line:MAILADDR example@example.com
You can also optionally configure the sending email address:
MAILFROM mdadm@example.com
Important is that "AUTOCHECK" in the file /etc/default/mdadm is set to "true":
# grep AUTOCHECK= /etc/default/mdadm
AUTOCHECK=true