Originally posted by: Juredd1
Yes I have seen different examples on ways to set up the mailto part so I am guessing it depends on what version of sudo.
If you entered mailto="admin1@.com" and sudo did not complain when you saved the file then I would expect if you wanted to use an mail alias you would enter in your sudoers file for example;
mailto="sudo-admin"
instead of the email address entry. Then in your /etc/aliases file you would put an entry like you listed in the previous post. The "sudo-admin" part is up to you, you can call it whatever you want.
Mine looks just like you have it. Don't forget to run /usr/sbin/newaliases so that it re-reads the aliases file or from my testing it won't read the changes.
So "tail -f /var/log/maillog" on the system and open a second terminal window to test sudo and watch for the email messages to roll through.
I also entered
Defaults mail_always
in the sudoers file. From what I read that will email you on all sudo activity.
Hope this helps.
#AIX-Forum