/var/mail/root - emailing on SUSE 10.0

I am a Linux newbie, but I want to figure out the next automation step.  I want to have what ends up going to /var/mail/root go to an email client so I can read it.  I would love and easy report or even how to read that file in email so I can analyze problems quickly.  I have crontab issues that I would like to know about ahead of time and make sure I don't run into any issues.

Thanks,

Awakenings
awakeningsAsked:
Who is Participating?
 
pjedmondConnect With a Mentor Commented:
Another thought....you could put an email address in the ~/.forward file in your home directory. This is not created by defaul, so you'll need to create it:

 echo 'remoteuser@anisp.com' > ~/.forward

These links gives a fuller description of what can be done with this file:

http://www.feep.net/sendmail/tutorial/intro/forward.html
http://www-acs.ucsd.edu/email/dotforward.php
0
 
awakeningsAuthor Commented:
P.S.  If you can tell me how to relay to an external email server, I would be very happy!

P.P.S.  I'm out tonight so I'll look at everything tomorrow.
0
 
pjedmondConnect With a Mentor Commented:
What is wrong with the various linux email clients? pine etc? su to root, and use.

http://www.ucl.ac.uk/is/unix/pine.htm is a reasonable tutorial for pine

Or do you want to forward the mail to another email address? If you are using sendmail, then you need to alter your /etc/aliases file.

At the end add:

root:      user

and root's mail will be forwarded to local account user instead. If you wish to send the emails to a remote user, then add the line:

root:     remoteuser@anisp.com

HTH:)

0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
pjedmondConnect With a Mentor Commented:
There are other solutions with procmail or other MTAs, but I'd assume that you are using sendmail as you haven't stated. If using something else, then tell the experts, and I'm sure that a solution will be forthcoming:)
0
 
ahoffmannConnect With a Mentor Commented:
the answer to your question is simply: mail. mailx, pine, mutt
Or as pjedmond suggested: use ~/.forward (for user root), or use your MTA's alias file.

But I guess that you (newbie) mean something like Netscape, Thunderbird or TheBat! to access your mail, then you simple need to configure it to use /var/mail/root as inbox.
0
 
awakeningsAuthor Commented:
Ok...  I installed pine as that seems to be the way to go.  It is fine with me and I am looking to learn best practices on linux anyway.  I may be doing this completely wrong, but I'd like your help anyway.  I configured incoming-folders-to-check to \var\mail as that contains the messages I am looking for.  There are a few hundred messages present so it seems.  It is the best policy to delete these messages -- as many of them are routine notes that my cron jobs ran properly?  To me they look mundane, but are useful for troubleshooting when things go awry.

    To jump back to my second question, I probably didn't explain myself well.  Is there a way to forward particular types of emails from Pine to an external email list or group?  For example, I have an output of syslog messages that I run through swatch every day.  It outputs the information in plain text.  Can I have this automated to send those txt files through the use of pine?  I'm trying to see what my options are with pine.  Can I send the messages I am picking up now through /var/mail to an external email client?

Thanks!

Awakenings
0
 
ahoffmannConnect With a Mentor Commented:
> .. to forward particular types of emails from Pine to an external email list or group?
you mean automatically forwarded when it arrives in your mailbox (inbox)?
That's done usineg procmail.
You write a ~/.forward with following content:

|/usr/bin/procmail

then you need to write a ~/.procmailrc, see man procmail for details (to much to explain here)
0
 
awakeningsAuthor Commented:
Ok...  I got some basics set up and working.  I'll give ya points and open up another setting to go forward.  Thanks.
0
 
pjedmondCommented:
A pleasure to help:)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.