Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

small sendmail question

Status
Not open for further replies.

peterve

IS-IT--Management
Mar 19, 2000
1,348
NL
Hi,

how can I configure my local RH7.2 Sendmail system so
all mails to root@localhost are relayed to a remote smtp server, and sent to username@domain.com where username = another username...

(instead of putting the messages into /var/log/messages, I want them to be sent to my second smtp server, to a specific person)

thanks

Peter --------------------------------------------------------------------
How can I believe in God when just last week I got my tongue caught in the roller of an electric typewriter?
---------------------------------------------------------------------
I have not failed, I've just found 10,000 ways that don't work
---------------------------------
 
The easiest way is to use a forward file.

In the user root's directory, create a file called .forward (that is a period in front).

In this file, just type a line with the email address you want this email sent to.
touch .forward (This creates the file)
cat < email@domain >> .forward (this will append the email address to the file)

You can also set this in the /etc/aliases file (I think the setting is called &quot;person who should get root's mail&quot;.) You can type in any valid email address here also.

Make sure that you backup the aliases file before you start, and that you execute newaliases when you are finished.

Hope this helps
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top