/
/
Setting up email notifications for paniclog

Setting up email notifications for paniclog

To send notifications about Exim mail server paniclog entries to the desired email address, specify the desired email address as an alias.

Determine which file Exim uses to assign aliases:

exim -bP routers | grep aliases | grep data

Typically, it is the file located at /etc/exim4/aliases.

Specify the desired alias for the root user's email address in this file. For example, if you want to redirect notifications from a server named domain.com to serveradmin@mail.com, the entry should look like this:

root@mail.domain.com : serveradmin@mail.com

Also specify the domain from the server name in the /etc/exim4/domains file:

mail.domain.com: mail.domain.com

Verify that the alias is configured correctly:

# exim -bt root
serveradmin@mail.com
    <-- root@mail.domain.com
    <-- root@mail.domain.com
  router = dnslookup, transport = remote_smtp
  host mx.mail.com [2a02:6b8::311] MX=10
  host mx.mail.com [77.88.21.249]  MX=10

Test that the email is sent to the target email address:

echo "test" | mail -s "test root redirect" root
tail -f /var/log/exim4/mainlog