I want to receive email when people login to my server via ssh (as a security measure), however, when I login, I get:
No mail for root
Email is something@gmail.com
Does it need Postfix to work? I already install it on server but i haven't configured it
Can you give me a tutorial to configure Postfix in case it needed? Will email be sent even if my domain hasn't been propagated yet?
I added this in .bash_profile
echo 'ALERT - Root Shell Access on:' `date` `who` |
mail -s "Alert: Root Access from `who | awk '{print $6}'`" something@gmail.com
mail -s "Test" something@gmail.commanually? Any errors in /var/log/syslog, /var/log/mail.log and /var/log/mail.err? Do you have SMTP configured? – grs Aug 12 '12 at 19:07