LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 10-17-2005, 10:25 AM   #1
gosh
LQ Newbie
 
Registered: Aug 2005
Posts: 4

Rep: Reputation: 0
configure RHEL4 server to send mail ?


I am running RHEL 4.
All I need to do is set the machine up so that it can send mail. It does not need to receive mail or forward on mail from anywhere else.

I have searched and searched on the net and I cannot work out how to do this, the one billion hits I get about configuring sendmail for some fancy mail server set up get in the way of the very basic thing I need to acheive.

I just need our linux server set up so that when it generates a notification email it can send it. EG send all mail it normally sends to the root account to another email address.

We have an IP address for an relay that is on our private network ( 97.0.0.47 ) so we just need to set that up as our outgoing email server.

Please help ! Our root email address is filling up - we just want to have the machine send this mail on to another email address that we actually read on a daily basis.
 
Old 10-17-2005, 09:01 PM   #2
blkcamarozr28
Member
 
Registered: Oct 2005
Location: Honolulu, Hawaii
Distribution: Fedora Core 1-7, CentOS 4/5, Ubuntu/Xubuntu
Posts: 63

Rep: Reputation: 15
Here's the quickie:

/etc/mail/local-host-names
your.domain.net ***Add your domain in here

edit sendmail.mc
define(`SMART_HOST',`[smtp-server.MyISP.com]') ***Brackets stops sendmail from doing MX Lookup***

/etc/mail
make -C /etc/mail ***Use this command to compile .mc to .cf***
 
Old 10-17-2005, 09:20 PM   #3
blkcamarozr28
Member
 
Registered: Oct 2005
Location: Honolulu, Hawaii
Distribution: Fedora Core 1-7, CentOS 4/5, Ubuntu/Xubuntu
Posts: 63

Rep: Reputation: 15
Whoops read that too fast.

Here's what you can do to forward all root email to another account:

echo someEmail@my.email.com > $HOME/.forward


Or you can do it via the Aliases file. <BETTER WAY>

/etc/aliases and set:

root: <dest_mailaddress>

The run "newaliases"
 
Old 10-18-2005, 06:36 AM   #4
gosh
LQ Newbie
 
Registered: Aug 2005
Posts: 4

Original Poster
Rep: Reputation: 0
thankyou everso much, that worked

If I send a mail from that machine to another address
(eg I use
Code:
mail evilc@evilc.com
from the command-line) it won't deliver.
Is it easy to set it to forward all outbound mail to the email server specified in (`SMART_HOST',`[smtp-server.MyISP.com]') ?

Also, when mail arrives at the destination, it is from "Root <root@osiris.gosh.nhs.uk>" - which just shows up in the address column of my MUA as "root". Can I change this to "Root@Osiris" easily ?

TIA

Last edited by gosh; 10-18-2005 at 06:53 AM.
 
Old 10-18-2005, 01:48 PM   #5
blkcamarozr28
Member
 
Registered: Oct 2005
Location: Honolulu, Hawaii
Distribution: Fedora Core 1-7, CentOS 4/5, Ubuntu/Xubuntu
Posts: 63

Rep: Reputation: 15
If you setup the SMART_HOST this will forward all your email to that SMTP server. Which is what you want right? As for your Root@Osiris account check the sendmail doc's. There is a way to send your email as someone else but i havent done this before. Give it a google.
 
  


Reply

Tags
sendmail


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Configure & Connect a Linux mail server from a windows mail clients digihall7 Linux - Networking 4 10-23-2006 01:21 PM
how to configure mail client to send mail out on different pppd threads vkrishn1 Linux - Newbie 0 12-29-2004 11:54 AM
Server does'nt send mail until shutdown and LAN can't send or receive. Wolfy Linux - Networking 0 08-02-2004 08:31 PM
how do I configure sendmail to be able to send mail outside my network dkscomps Linux - Networking 9 07-04-2004 04:41 PM
I can't send mail by using local mail server hus Linux - Software 0 05-10-2004 03:18 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration