Re: How to deal with new mail?
- To: mutt-users@xxxxxxxx
- Subject: Re: How to deal with new mail?
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Fri, 15 Feb 2008 12:51:19 -0600
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=date: from:to:subject:message-id:references:mime-version:content-type: in-reply-to; q=dns/txt; s=default; bh=FNzdZZQS1HSFy1+WspKeVX9OKM k=; b=IAYYGG6b8utGQ9rWjeMB8/eJZExuqayf+J6BsbHhyajBlSbirc+JgBrcbM ZJTxRuWzpBF55XkViKX7Y68KrOGFXura74w125LlIpAiJ7vF9da/89V+3Asq5Ym7 mX0QeVwQtzK6+nyQBu6ljSFaq/eWfvs6lXuqiu69m9t/6eE8k=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=bhSlXi/L9hOSgiA0jgKDTX/syhLTKzYCF8htvHVISlJpE7UkylyBxeqcYdUmkBSfLvJK4GMSjenOFlNNiNhZbdf8LniPq7xWvrfXphS7PBnNc3VkesEAERyK8I6WYJPd3RPWiZQDB83NpOnTd2vuWoyD9TdfEOn2IlZcqTAYPeo=; h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:OpenPGP:User-Agent;
- In-reply-to: <20080215182109.GB26015@Benjamin Buch>
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx
- Openpgp: id=CA8E235E; url=http://www.memoryhole.net/~kyle/kyle-pgp.asc; preference=signencrypt
- References: <20080215085842.GA949@BenjaminBuch> <20080215120921.GR26720@pub> <20080215160737.GO2383@xxxxxxxxxxxxx> <20080215182109.GB26015@Benjamin Buch>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.17 (2008-01-14)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Friday, February 15 at 07:21 PM, quoth Benjamin Buch:
> I did set up my .muttrc now like this:
>
> mailboxes /var/mail/benni =freunde =kassette =listmutt =lists =mbox
> =root =sent =uni
>
> As I wrote to Vladimir, pressing '.' does nothing, and I don't get
> any notification about new mail below the status bar.
Hmmmm... and these are all local folders? The next task is to figure
out why mutt isn't seeing new mail in them. What sort of an
environment are we working with? Are these folders mbox's or
Maildir's? What sort of filesystem are they on? Are they on an NFS
share or a filesystem that's been mounted with the noatime option?
At issue now is how mutt determines whether there's new mail in a
folder. Maildir's are relatively easy: if there's anything in the new/
directory inside the maildir, then the mailbox has new mail. Mboxes
are more difficult, because doing a thorough job requires reading
through the whole mbox (which mutt would rather not do just to get a
folder list). Instead, mutt relies, by default, on the timestamps of
the file. By default, mutt depends on the access-time and modify-time
of the file (when the mailbox is *read*, only the access-time changes,
and when mail is *delivered*, only the modify-time (and the
change-time) changes, thus if the modify time is more recent than the
access-time the mbox must have new mail in it). However, on some
filesystems, these timestamps are unreliable---for example, if your
filesystem is mounted with the noatime option, the access time is
never updated, and either all mailboxes appear to have new mail or
none of them do (depending on the system). I believe NFS shares have
other problems with timestamps that makes them unreliable. In mutt
1.5.15 and later, there's a $check_mbox_size option that makes mutt
use file size to guess whether an mbox has new mail in it rather than
the timestamps. However, this isn't a perfect workaround, for several
reasons, the biggest one being that at startup mutt assumes that all
mailboxes have no new mail (it can only detect mail delivered after it
recorded the size of each mbox).
What Vladimir was saying about $mark_old can throw a monkey-wrench in
things too, depending on what you're expecting mutt to do. The idea
makes more sense with Maildir's, so I'll explain it that way. The way
maildirs work, there are three component folders of every maildir:
"cur", "new", and "tmp". All messages in the "new" folder are
absolutely considered New. However, messages can also be *marked* as
"New" when they are stored in the "cur" folder. Mutt considers these
messages to be "Old" (i.e. if $mark_old is set, when you open a
Maildir with New messages, any messages that are still New when you
close that Maildir are moved to the cur folder, and thus are still
Unread, but are no longer New: aka "Old". If $mark_old is unset, mutt
will leave any unread New messages in the "new" folder. Maildirs are
only considered to have New messages if they have messages in the
"new" folder, thus, $mark_old will make Unread messages not count as
New if you've opened the folder before). This behavior is more
complicated to implement with other mailbox storage mechanisms (e.g.
IMAP, mbox, MH, etc.), but Mutt has various ways of doing it (some of
them don't work as well as others). But, as long as you have $mark_old
unset, we don't have to worry about the interaction of unread messages
with detection of new messages.
> Pressing c? works, but I get a list with all folders, even if I didn't
> specify them as mailboxes, and not just those with new mail.
> Seems like I misconfigured something?
Ah, no, I just told you wrong. The buffy-list only puts the list of
folders with new stuff below the status-bar. There doesn't seem to be
a way to trim the folder-browser down to just the ones with new mail
in them. Sorry about that. But, for what it's worth, the browser list
should put an N next to each folder with new mail in it.
Does that help at all?
~Kyle
- --
The fact that we live at the bottom of a deep gravity well, on the
surface of a gas-covered planet going around a nuclear fireball 90
million miles away, and think this to be normal, is obviously some
indication of how skewed our perspective tends to be...
-- Douglas Adams
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iD8DBQFHtd8nBkIOoMqOI14RAjsGAKDhH8bMpABevo7N/b0zolAzJ5JkzACfTf2X
HymmuDvwe/tUpHrawoHOV2A=
=EZF3
-----END PGP SIGNATURE-----