Enable SMTP on OS X Server?
I have a couple OS X Servers (10.3.4) in production. They provide AFP and SMB services.
I would like to set up a cronjob to run every night that does the following:
1) run the du and df commands (disk information), etc
2) emails me the info from setp 1. to my home email account.
Thus, I need to set up a way for my servers to email me. My servers are NOT e-mail servers by the way, just file servers.
What is the best way to set up my servers so they can send outgoing messages over the 'Net to my home account?
Thanks!
I would like to set up a cronjob to run every night that does the following:
1) run the du and df commands (disk information), etc
2) emails me the info from setp 1. to my home email account.
Thus, I need to set up a way for my servers to email me. My servers are NOT e-mail servers by the way, just file servers.
What is the best way to set up my servers so they can send outgoing messages over the 'Net to my home account?
Thanks!
Comments
It reads from stdin, so you can just pipe your command. You can test it like this:
[dstranathan@localhost]$ sendmail dstranathan@yourdomain.com
from: asdasdasd <asdasd@asds.com>
to: dstranathan@yourdomain.com
message body
more content
.
(don't forget the period on a single line, or ^d)
Since you want to use cron anyway, you can also create an email alias for the particular cron job's user as cron sends output created by cron jobs to the local user.
add a line in /etc/aliases:
dstranathan: dstranathan@yourdomain.com
update the alias db:
sudo postalias /etc/aliases
cron output should now be sent to the email address dstranathan@yourdomain.com.