LinuxQuestions.org
Review your favorite Linux distribution.
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 03-17-2010, 09:40 AM   #1
siddhant_2010
LQ Newbie
 
Registered: Mar 2010
Posts: 13

Rep: Reputation: 0
Question Need to see the last 5 received mails when logged in with normal user


Hi All,
I am trying to see the last 5 mails in a single window that the rootuser has sent to a particular normal user.However,I am not able to do so.Is there any command that can display the last 5 mails in a single window sent to a particular user?

Thanks

Siddhant Bezbaruah
 
Old 03-17-2010, 10:55 AM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 164Reputation: 164
That's a pretty custom application there. I'm also unsure what you mean by '5 mails in a single window'. The easiest way I can think to accomplish this would be to use perl and directly view the mail spool and evaluate the messages in the spool. Honestly though, I'd probably just fire up mutt -f /path/to/mail and hit o f /root and look... or write an expect script to do that for me.
 
Old 03-21-2010, 02:38 AM   #3
siddhant_2010
LQ Newbie
 
Registered: Mar 2010
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks for your reply.What i mean by '5 mails in a single window' is that when we run 'mail'command from the normal user terminal to display the user's received mails,it doesn't display the last received mails,instead of that it only displays the top 20 mails.So i am looking for a command that displays the last mails that the user had received.Please guide me with this command.
Thanks

Siddhant Bezbaruah
 
Old 03-22-2010, 12:54 PM   #4
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 164Reputation: 164
As far as I know, mutt, mail, and mailx do not have that functionality built in. You many need to write a custom application or feature extension to mail/mutt/mailx to do what you're looking for.
 
  


Reply


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
Audio when logged in as root, not when normal user? LDJ Linux - Newbie 2 01-12-2007 06:03 PM
startx does not load when logged in as a normal user? xunzi Linux - Newbie 0 06-29-2004 09:37 AM
Ugly fonts when logged in as normal user Abdul Linux - Software 2 03-09-2004 02:46 AM
Modem connection slow when logged on af normal user Fennek Linux - Networking 0 03-18-2003 06:09 PM
Mails not received by a user J_Szucs Linux - Newbie 3 08-18-2002 07:20 PM


All times are GMT -5. The time now is 08:34 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration