[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

/var/mail/root - emailing on SUSE 10.0

Posted on 2006-06-06
9
Medium Priority
?
916 Views
Last Modified: 2010-08-05
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
0
Comment
Question by:awakenings
  • 4
  • 3
  • 2
9 Comments
 

Author Comment

by:awakenings
ID: 16846661
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
 
LVL 22

Assisted Solution

by:pjedmond
pjedmond earned 1200 total points
ID: 16847047
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
 
LVL 22

Assisted Solution

by:pjedmond
pjedmond earned 1200 total points
ID: 16847063
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 22

Accepted Solution

by:
pjedmond earned 1200 total points
ID: 16847098
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
 
LVL 51

Assisted Solution

by:ahoffmann
ahoffmann earned 800 total points
ID: 16849731
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
 

Author Comment

by:awakenings
ID: 16852374
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
 
LVL 51

Assisted Solution

by:ahoffmann
ahoffmann earned 800 total points
ID: 16854993
> .. 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
 

Author Comment

by:awakenings
ID: 16855828
Ok...  I got some basics set up and working.  I'll give ya points and open up another setting to go forward.  Thanks.
0
 
LVL 22

Expert Comment

by:pjedmond
ID: 16856073
A pleasure to help:)
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month18 days, 17 hours left to enroll

834 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