Solved

Forward system messages to email address

Posted on 2004-04-26
5
546 Views
Last Modified: 2013-12-27
How do I forward system messages to my email address? I am using Solaris 8.
0
Comment
Question by:jackyleee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 6

Expert Comment

by:danths
ID: 10924875
you should be able to do it with /etc/aliases
0
 
LVL 48

Expert Comment

by:Tintin
ID: 10924980
Depends on your definition of "system messages".  

Do you mean mail send to root?

Do you mean syslog messages?

If you just want root mail to be forwarded to you, edit /etc/aliases and add:


root:  your@email.address

Then type 'newaliases'
0
 
LVL 4

Expert Comment

by:Otetelisanu
ID: 10925314
Here are the steps how to change the send mail logs.

1. make a copy from your /etc/syslog.conf

2. edit /etc/syslog.conf and change the following line:
   mail.debug                      ifdef(`LOGHOST', /var/log/syslog, @loghost)
   mail.debug                      ifdef(`LOGHOST', /var/log/maillog, @loghost)

3. touch /var/log/maillog

4. stop syslogd with "/etc/init.d/syslog stop" command

5. start syslogd with "/etc/init.d/syslog start" command
 
send a mail and you should be able to see the log entries in /var/log/maillog file.

0
 

Author Comment

by:jackyleee
ID: 10925836
I mean syslog messages, only error messages. I want the system to log to /var/adm/messages & send an email to me as well.
0
 
LVL 21

Accepted Solution

by:
tfewster earned 125 total points
ID: 10942745
AFAIK, syslog can't send mail messages as one of its actions - But you could install swatch or other add-on security tools to monitor the syslog (and other logs) and mail you.

http://swatch.sourceforge.net/
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question