Mailcheck and pseudo message in a mailbox

View: New views
3 Messages — Rating Filter:   Alert me  

Mailcheck and pseudo message in a mailbox

by Yarda :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

With bash-4.0 the mailcheck behaviour is annoying when there is a pseudo
message in a mailbox, e.g.:

-----
#cat /var/mail/yarda
From MAILER-DAEMON Wed Sep 30 14:07:09 2009
Date: 30 Sep 2009 14:07:09 +0200
From: Mail System Internal Data <MAILER-DAEMON@...>
Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA
Message-ID: <1254312429@...>
X-IMAP: 1254311191 0000000002
Status: RO

This text is part of the internal format of your mail folder, and is not
a real message.  It is created automatically by the mail system software.
If deleted, important folder data will be lost, and it will be re-created
with the data reset to initial values.

-----

When the bash starts it reports:
You have mail in /var/mail/yarda

It is very annoying especially in cases when starting bash frequently
(e.g. from Midnight commander), because this message appears frequently.

I think the bash should understand the pseudo message or there should be
a switch for disabling old mail reporting.

Or is there any way how to get rid of this message without removing
metadata from mailbox or disabling mailcheck entirely?



Re: Mailcheck and pseudo message in a mailbox

by Chet Ramey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yarda wrote:
> With bash-4.0 the mailcheck behaviour is annoying when there is a pseudo
> message in a mailbox, e.g.:

It's unfortunate that the system's implementors chose a metadata format
that is indistinguishable from a valid mail message.  Since bash doesn't
read the contents of a mail file at all, it's not a good idea to make it
parse mail messages to work around this problem.

Chet

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@...    http://cnswww.cns.cwru.edu/~chet/



Parent Message unknown Re: Mailcheck and pseudo message in a mailbox

by Yarda :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 4 říj, 20:04, Chet Ramey <chet.ra...@...> wrote:

> Yarda wrote:
> > With bash-4.0 the mailcheck behaviour is annoying when there is a pseudo
> > message in a mailbox, e.g.:
>
> It's unfortunate that the system's implementors chose a metadata format
> that is indistinguishable from a valid mail message.  Since bash doesn't
> read the contents of a mail file at all, it's not a good idea to make it
> parse mail messages to work around this problem.
>
> Chet
>
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                  ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, ITS, CWRU    c...@...    http://cnswww.cns.cwru.edu/~chet/

I think it would be worth adding a switch or option to disable old/
read mail reporting (report only new unread mails) or maybe adding a
possibility to use custom script for mailchecking. The bash-3 worked
OK for me. There are several users reporting the same problem with
bash-4 on various distros bugzillas/forums and mostly solving this by
mailcheck disable that I think is not good solution.