[Discuss] Mailcheck not showing new mail

Bill Horne bill at horne.net
Sun Aug 10 12:43:00 EDT 2014


On 8/9/2014 11:06 PM, Tom Metro wrote:
> Bill Horne wrote:
>> I'm calling "mailcheck -cs " from my login script...
> I presume this mailcheck:
> http://manpages.ubuntu.com/manpages/precise/man1/mailcheck.1.html
>
> (There seem to be several tools with that name.)

That's the one.

>> ...but it is reporting "No new mail" when it shouldn't be.
>>
>> You have new mail in /var/mail/moder8
>> moder8 at telecom:~$ mailcheck -cs
>> No new mail.
>>
>> My .mailcheckrc file has my home mailbox listed.
> The first message, presumably produced by 'mail', is reported on your
> spool file, not Maildirs in your home directory. You say .mailcheckrc
> specifies your "home mailbox." What exactly do you mean by that?
>
> To match 'mail' I'd expect it to be:
> /var/mail/$(USER)

It's /var/mail/moder8, which is the actual name, but it's in there.

... oops, wait: I just noticed that the file name is ".mailcheckr".

<Home Simpson mode=on>
D-Oh! (Slaps head)
</simpson>

Hey, just a sec:

The result of running "mailcheck -cs" without a local .mailcheckrc is 
"no new mail." when there is mail in the mailbox, and no output when the 
mailbox is empty. It *is* paying attention to the mail spool, albeit not 
in the way I want. What's up with that?


> Also check to see if /etc/mailcheckrc exists and see what it points to.
> (If it does not already, it should probably contain a path, as I show
> above, that matches the convention of where inboxes are stored on your
> system.)

Another puzzle: on Ubuntu 14.04 LTS, it's all commented out. There is an 
entry that looks like

#/var/spool/mail/$(USER)

( /var/spool/mail is a link to ../mail)

... but nothing actually enabled, for that or other options.

(brief pause while Bill corrects short circuit in operator)

Now, with a properly named .mailcheckrc file, it seems to do what it 
should. My question remains, though, why it would be able to tell the 
difference between a spool file with <anything> in it, or <nothing> in 
it, but not signal if the file has new mail?

Bill

-- 
E. William Horne
William Warren Consulting
339-364-8487




More information about the Discuss mailing list