On Ubuntu 20, I'm trying to send audit logs to [email protected]. I do have a real domain and email server but I'm redacting them here. When I trigger an audit event, the email is instead sent to root on the local machine. So far I've tried the following:
- Running
echo "Subject: test" | sendmail -f root@my_machine.com [email protected]
the test email is sent successfully. /etc/audit/auditd.conf
has been modified to replaceaction_mail_acct = root
withaction_mail_acct = [email protected]
- After modifying auditd.conf, I restarted it using
service auditd restart
I don't see any relevent errors in:
- /var/log/mail.err
- /var/log/mail.log
::: update :::
With the action_email_acct
set to a real account, I then ran sudo ls
in a terminal to generate an audit event that I can see in /var/log/audit/audit.log. Should I be seeing the audit event here if it's supposed to be emailed?
The
action_mail_acct
is not for sending audit alerts but for giving notifications about low disk space (belowspace_left
oradmin_space_left
) whenspace_left_action
oradmin_space_left_action
is configured toemail
. Fromauditd.conf(5)
: