LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-04-2017, 07:14 PM   #1
goofygoober
Member
 
Registered: Nov 2017
Posts: 37

Rep: Reputation: Disabled
Unhappy mailx listing users with unread mail!


Hello there, I'm itching for some help with figuring out how to list the users in /var/spool/mail/ directory that have unread mail.
How would this even be possible considering I do not have access to other user's mail list?

Thanks for any help!
 
Old 12-04-2017, 08:49 PM   #2
!j*
LQ Newbie
 
Registered: Nov 2017
Posts: 11

Rep: Reputation: Disabled
mailx listing users with unread mail!

Try: lsmbox (or look into its source code)
 
Old 12-06-2017, 12:54 AM   #3
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 3,273

Rep: Reputation: 587Reputation: 587Reputation: 587Reputation: 587Reputation: 587Reputation: 587
The unread flag is either set or clear. You can write a script to plow through each users email until it finds a set 'unread' flag, make note of the user, and continue on until every user's status as you define it is determined.

You can write the names to a file one at a time as you go, or all at the end when you're done. But without access to the emails it might be tough.
 
  


Reply

Tags
linux, mailx


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 nark a message as "Unread" in mailx ?? techie_san778 Linux - Server 1 06-30-2013 01:53 PM
[SOLVED] How to send a mail in HTML format using mailx or mail or sendmail commands vishnu_knl Linux - Newbie 8 04-05-2012 11:00 AM
Listing all users who currently have mail in inbox ben1173 Linux - Newbie 1 10-26-2010 12:55 AM
mutt unread mail but none shown moob8 Linux - Software 2 10-19-2007 05:50 PM
Unread mail in evolution Barserk Linux - Software 4 10-03-2005 06:54 PM

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

All times are GMT -5. The time now is 09:12 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