LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to configure email (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-configure-email-612428/)

linux-who? 01-09-2008 04:03 PM

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

jimbo1708 01-09-2008 04:55 PM

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
I hope this works for you. Setting up an email server can be a doosey, so be prepared to put some time into the project.

best of luck to you.

- Jim

linux-who? 01-10-2008 02:07 PM

Quote:

Originally Posted by jimbo1708 (Post 3017136)
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).

Thanks for the reply Jimbo1708. I may be totally missing the concept here, but the servers that i am running the script on are not publicly registered machines. they have access to the internet, but that's it. So, i need for these machines to send me the email through a hosted email address (hotmail, gmail, aol, etc).


All times are GMT -5. The time now is 03:35 PM.