I want to send a mail to myself at the restart of a server. We use AWS, and a restart results in a changed internal 10.x.x.x address. This address has to be configured in Postgres and elsewhere, and this would be a nice reminder.
I found this solution, but when trying it I get the error that mail is not installed. Sendmail/postfix is installed.
@reboot echo "Server has restarted "`hostname` | mail -s "System Restart" [email protected]
Do I need to install mail-utils or can I do without using another solution?