LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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, 06: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, 07:49 PM   #2
!j*
LQ Newbie
 
Registered: Nov 2017
Posts: 14

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

Try: lsmbox (or look into its source code)
 
Old 12-05-2017, 11:54 PM   #3
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
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



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 12: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 10:00 AM
Listing all users who currently have mail in inbox ben1173 Linux - Newbie 1 10-25-2010 11:55 PM
mutt unread mail but none shown moob8 Linux - Software 2 10-19-2007 04:50 PM
Unread mail in evolution Barserk Linux - Software 4 10-03-2005 05:54 PM

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

All times are GMT -5. The time now is 10:36 PM.

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