Solved

Forward system messages to email address

Posted on 2004-04-26
5
544 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
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 20

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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
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…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

773 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