LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-25-2009, 11:06 AM   #1
northpoint
LQ Newbie
 
Registered: Dec 2009
Location: Quebec Laurentians
Distribution: Fedora
Posts: 5

Rep: Reputation: 0
Arrow Trying to Understand , mail system messages to root


Greetings and Salutations !

and Happy Holidays.


I have questions concerning receiving messages through mail and cron for root.

I've tried:
Code:
 # mail -u root - No mail for root
Code:
cat /var/log/spooler
has no output


Code:
# cat /var/log/maillog
mailog - displays
Code:
sendmail[3508]: nBP8S391003508: from=root, size=2266, class=0, nrcpts=1, msgid=<200912250828.nBP8S391003508@my.server>, relay=root@localhost
What does this mean?


I understand it has nothing to do with running mail server, but receiving system messages.
Is there another way to see these messages?
which ones can i disable that aren't necessary?
And I found a script for Arno's iptables firewall logs , that is supposed to mail root the out put
script :
Code:
  #! /bin/sh
   #
   #  /etc/cron.daily/fwfilter - Arno's iptables-firewall activity
   #  monitoring script.
   # 

   FWFILTER=/path/to/arno's/fwfilter
   FWLOG=/var/log/firewall
   DAY="$(/bin/date '+%b %e' --date=yesterday)"
   
   if [ -f "${FWFILTER}" -a -f "${FWLOG}" ]; then
      /bin/grep "${DAY}" ${FWLOG} | ${FWFILTER}
   fi

Thanks for any feedback
 
Old 12-26-2009, 07:25 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,954

Rep: Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434Reputation: 2434
No comment on the script. /var/spool/mail/root is usually root's mailbox, and should be perms 0600.
Many mailers are unhappy mailing to root, you have to use an alias. It's a permissions thing. They have a 'mexican wave' of processes firing the mail to each other; all have different uids and the last has the uid of the recipient. If one gets root, it will default to nobody :-/. Your like on the log looks like a mail sent to root 2266 bytes, from root to root. That bit is hardly kosher either, having the recipient and sender as the same guy. Get a luser or two into the picture.
 
Old 12-26-2009, 07:41 AM   #3
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Take a look at /etc/aliases, if you see an entry like :

Code:
root:		kbp
.. then there will never be any mail in roots mailbox, check kbp's instead

cheers
 
Old 12-26-2009, 08:21 AM   #4
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
On a desktop or laptop system, mail is sent to the user's mail, not the root account.
 
Old 12-31-2009, 09:55 PM   #5
northpoint
LQ Newbie
 
Registered: Dec 2009
Location: Quebec Laurentians
Distribution: Fedora
Posts: 5

Original Poster
Rep: Reputation: 0
thanks for the feedback
 
  


Reply

Tags
cron, maillog


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to I configure UNIX mail to e-mail messages to external addresses? Thaidog Linux - Server 2 03-05-2008 08:53 PM
root system mail to imap server spot101 Linux - Server 6 10-28-2007 11:06 AM
delete messages in /var/mail/root using a script cccc Debian 1 09-11-2007 10:25 AM
Need to be root to view system messages? ThorsHammer1111 Linux - Newbie 5 08-24-2003 09:51 PM
Filtering mail messages on ISP's mail server broxtor Linux - Software 0 07-28-2003 02:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration