how to configure email
Hi All,
Ok, here is what i am trying to do. I have a shell script that runs each night and creates a log file. when it completes, i want the shell script to email me the report in the body of an email. This script runs on multiple servers.....some running RHEL4 others running SCO Unixware. From searching the web i have found that i can do this with either sendmail, mutt, mail, or mailx commands. I would like to find a sollution that does NOT require installing any new packages....so i'm leaning towards mail or mailx (sendmail and mutt are not installed by default on SCO unixware....not sure if they are compatible with SCO unixware either). It is also my understanding that i must configure an MTA. This is where i am totally lost. Can someone give me detailed steps on how to do this? Is the concept of configuring an MTA comparable to configuring the server settings, etc in MS outlook? Thanks |
configuring an MTA and outlook are completely different. look for a good how-to (flurdy.com/docs/postfix/) on the internet for installing an MTA called postfix, it wraps sendmail though so mail and xmail would not work with it, but Postfix should do what you need. Postfix will turn your box into an email server that can send and receive email independently of any other service (hotmail, gmail, aol.com, etc). Be sure to follow all the instructions in the how to and make sure your server is not an Open Relay (meaning spammers can use your box to send there junk).
When you properly configure the mail server, I suggest having your script output to stdout and then you can use the following command in cron set to the time you want and you will be set: Code:
jim@my_box_name:/home/username$ my_script_name | sendmail name@domain.com best of luck to you. - Jim |
Quote:
|
All times are GMT -5. The time now is 03:35 PM. |