Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Bit of an unusual case, but I'm planning to restructure how I use OS X when I next do a clean-install, such that I have a separate user account for casual use and work use, to keep things a lot tidier and to avoid distractions.

However, I'd still like to know how many unread messages I have in the other account, either visible from the loginwindow or by some other convenient means.

Is there any way to achieve this, e.g - by installing a script on the account I want to get a count for? Of course if the other account isn't signed in this won't work, in which case a last known count is fine.

I suppose maybe I'm just spoiled by smart phones that let you see message count (or even messages) from a lock-screen, but it'd be nice to have something similar without having to actually add the same e-mail account to Mail for both users.

share|improve this question
You mention about distractions so this is about keeping focused on one task or the other. So you don't want a desktop notification for each account when new email arrives? Since this will happen in real time, rather when returning to the computer you want the option to login and check what the new emails are? I use a smart phone for this and turn on and off mail accounts as needed. Will you just end up logging off to see if you have new email? –  MichaelStoner Jul 14 '14 at 12:34

2 Answers 2

up vote 2 down vote accepted

I think @Buscar웃 is right, you need to fetch your mail before you know how much mail is in your inbox.

I think you can use your Terminal for that, and with the combination of 'GeekBench' it might even look pretty.

A common mailclient for OS X terminal is mail, it is already installed, but unfortunately I have no clue on how to configure it correctly.

Another terminal mail client is mutt. You can install mutt using brew

brew install mutt

You can then configure mutt and run it in your other account. Mutt is lightweight and will not use much resources.

share|improve this answer
Ah, I didn't think of using a terminal client just to track unread messages, but that could definitely work. I've figured out how to do the same with Applescript for OS X's mail, but as has been pointed out it would require the other user to be signed in as Mail would need to be running, so a terminal client seems the best option. I'll give mail a try first and investigate mutt if I have any trouble! –  Haravikk Jul 15 '14 at 7:19

In order for system to know the unread account of the "other" email account it has to access it!

So you can not go around that.

Showing the last accessed count has little use, it could be days old.

share|improve this answer
A script on the login window doesn't require the user to be logged in—that's what Launch Daemons are for. –  grgarside Jul 14 '14 at 12:08
The login window is not a must btw –  CousinCocaine Jul 14 '14 at 12:20
not too much of topic: Is it possible to do a sudo otheruser open -a Mail? –  CousinCocaine Jul 14 '14 at 12:24
^it is not possible –  CousinCocaine Jul 14 '14 at 12:24
@GeorgeGarside I was not talking about user log in, but about mail. How does the mail supposed to get count if it is not active. –  Buscar웃SD Jul 14 '14 at 12:30

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.