Re: How to deal with new mail?
> > 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?
Yes, they are all local folders within my maildirectory
/home/benni/mail.
Format is mbox, since it was the default format for procmail and mutt,
so I thought I'll stick with it.
I'm using (x)ubuntu linux, all is on my local filesystem which is ext3.
I'm not quite sure about the noatime option, but mount -l gives me
/dev/sda5 on / type ext3 (rw,errors=remount-ro) []
, and I guess you would see it there if sda5 would be 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).
I checked the mailboxes manually, and they have access-times and
modify-times that differ. Although the modify-times are far older as
the access-times because I visited those mailboxes some times after they
recieved new mail... but seems like everything is all right I guess.
> 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.
You're tempting me to switch to maildirs... ;-)
For testing purposes, I did set mark_old=no. In this way I can keep new
messages marked as new even if I visited the folder they're in.
Right now, I can only tell if there's new mail in a mailbox by visiting
that mailbox. If I did so with mark_old unset, the new mails would be
marked as old mails after visiting, and I would have to wait until I
would receive new mail or write some mail to myself which would be
annoying after some times.
> > 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.
Ah, how I whish there would be some information about new mails below
the status bar! There are no 'N's as well... The FAQ says you can't have
a new message count if using mbox-format, but even with this format the
folder-browser should flag mailboxes with 'N'.
> Does that help at all?
> ~Kyle
I just can't see why the thing with new mails don't work...
But thank you for your reply! I learned new things about mutt, so yes,
it helped!
I've attached my .muttrc and the dump of mutt -v,
perhaps I'm using a version to old for fancy new-mail-display
(is 1.5.15 to old??) or have something heavily misconfigured in my .muttrc.
I would be glad if you could take a short
look at it!
Benjamin
####################
# #
# My mutt settings #
# #
####################
### folders and mailboxes ###
## ##
set folder="$HOME/mail"
set record="+sent"
set mbox="+mbox"
set postponed="+postponed"
set alias_file="~/.muttalias"
mailboxes =freunde =kassette =listmutt =lists =mbox =root =sent =uni
### sourced files ###
## ##
source /home/benni/.muttalias
### global settings ###
## ##
set from = 'benni.buch@xxxxxx'
set hostname = 'Benjamin Buch'
set editor="vim"
set delete=no
set sendmail="/usr/bin/nbsmtp -U username -P password -d url.fu -h
pop3.address.fu -f my.email@xxxxxxxxxx"
set mark_old=no
set pager_index_lines=9
### list subscriptions ###
## ##
subscribe mutt-users@xxxxxxxx
subscribe django-users@xxxxxxxxxxxxxxxx
### macros ###
## ##
macro index G "!fetchmail -k"
macro pager G "!fetchmail -k"
##########################################
# #
# The following is a copy of /etc/Muttrc #
# #
##########################################
#
# default list of header fields to weed when displaying
ignore "from " received content- mime-version status x-status message-id
ignore sender references return-path lines
ignore date delivered-to precedence errors-to in-reply-to user-agent
ignore x-loop x-sender x-mailer x-msmail-priority x-mimeole x-ms- x-priority
ignore x-accept-language x-authentication-warning thread- priority importance
ignore x-original-to domainkey-signature dkim-signature
# emacs-like bindings
bind editor "\e<delete>" kill-word
bind editor "\e<backspace>" kill-word
# map delete-char to a sane value
bind editor <delete> delete-char
# some people actually like these settings
#set pager_stop
#bind pager <up> previous-line
#bind pager <down> next-line
# Specifies how to sort messages in the index menu.
set sort=threads
# Uncomment if your MTA does not strip Bcc: headers.
# (exim4 and postfix strip them, exim(3) does not.)
#unset write_bcc
# Postfix and qmail use Delivered-To for detecting loops
unset bounce_delivered
set mixmaster="mixmaster-filter"
# System-wide CA file managed by the ca-certificates package
set ssl_ca_certificates_file="/etc/ssl/certs/ca-certificates.crt"
# imitate the old search-body function
macro index \eb "<search>~b " "search in message bodies"
# simulate the old url menu
macro index,pager \cb "<pipe-message> urlview<Enter>" "call urlview to extract
URLs out of a message"
macro attach,compose \cb "<pipe-entry> urlview<Enter>" "call urlview to extract
URLs out of a message"
# Show documentation when pressing F1
macro generic,pager <f1> "<shell-escape> zcat /usr/share/doc/mutt/manual.txt.gz
| sensible-pager<enter>" "show Mutt documentation"
# show the incoming mailboxes list (just like "mutt -y") and back when pressing
"y"
macro index,pager y "<change-folder>?<toggle-mailboxes>" "show incoming
mailboxes list"
bind browser y exit
# If Mutt is unable to determine your site's domain name correctly, you can
# set the default here. (better: fix /etc/mailname)
#
# set hostname=cs.hmc.edu
# If your sendmail supports the -B8BITMIME flag, enable the following
#
# set use_8bitmime
##
## *** DEFAULT SETTINGS FOR THE ATTACHMENTS PATCH ***
##
##
## Please see the manual (section "attachments") for detailed
## documentation of the "attachments" command.
##
## Removing a pattern from a list removes that pattern literally. It
## does not remove any type matching the pattern.
##
## attachments +A */.*
## attachments +A image/jpeg
## unattachments +A */.*
##
## This leaves "attached" image/jpeg files on the allowed attachments
## list. It does not remove all items, as you might expect, because the
## second */.* is not a matching expression at this time.
##
## Remember: "unattachments" only undoes what "attachments" has done!
## It does not trigger any matching on actual messages.
## Qualify any MIME part with an "attachment" disposition, EXCEPT for
## text/x-vcard and application/pgp parts. (PGP parts are already known
## to mutt, and can be searched for with ~g, ~G, and ~k.)
##
## I've added x-pkcs7 to this, since it functions (for S/MIME)
## analogously to PGP signature attachments. S/MIME isn't supported
## in a stock mutt build, but we can still treat it specially here.
##
attachments +A */.*
attachments -A text/x-vcard application/pgp.*
attachments -A application/x-pkcs7-.*
## Discount all MIME parts with an "inline" disposition, unless they're
## text/plain. (Why inline a text/plain part unless it's external to the
## message flow?)
##
attachments +I text/plain
## These two lines make Mutt qualify MIME containers. (So, for example,
## a message/rfc822 forward will count as an attachment.) The first
## line is unnecessary if you already have "attach-allow */.*", of
## course. These are off by default! The MIME elements contained
## within a message/* or multipart/* are still examined, even if the
## containers themseves don't qualify.
##
#attachments +A message/.* multipart/.*
#attachments +I message/.* multipart/.*
## You probably don't really care to know about deleted attachments.
attachments -A message/external-body
attachments -I message/external-body
# enable mime lookup by extension
mime_lookup application/octet-stream
##
# See /usr/share/doc/mutt/README.Debian for details.
source /usr/lib/mutt/source-muttrc.d|
Mutt 1.5.15+20070412 (2007-04-11)
Copyright (C) 1996-2007 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.
System: Linux 2.6.22-14-generic (i686)
ncurses: ncurses 5.6.20070716 (compiled with 5.6)
libidn: 1.0 (compiled with 1.0)
Einstellungen bei der Compilierung:
-DOMAIN
+DEBUG
-HOMESPOOL +USE_SETGID +USE_DOTLOCK +DL_STANDALONE
+USE_FCNTL -USE_FLOCK +USE_INODESORT
+USE_POP +USE_IMAP +USE_SMTP -USE_GSS -USE_SSL_OPENSSL +USE_SSL_GNUTLS
+USE_SASL +HAVE_GETADDRINFO
+HAVE_REGCOMP -USE_GNU_REGEX
+HAVE_COLOR +HAVE_START_COLOR +HAVE_TYPEAHEAD +HAVE_BKGDSET
+HAVE_CURS_SET +HAVE_META +HAVE_RESIZETERM
+CRYPT_BACKEND_CLASSIC_PGP +CRYPT_BACKEND_CLASSIC_SMIME +CRYPT_BACKEND_GPGME
-EXACT_ADDRESS -SUN_ATTACHMENT
+ENABLE_NLS -LOCALES_HACK +COMPRESSED +HAVE_WC_FUNCS +HAVE_LANGINFO_CODESET
+HAVE_LANGINFO_YESEXPR
+HAVE_ICONV -ICONV_NONTRANS +HAVE_LIBIDN +HAVE_GETSID +USE_HCACHE
-ISPELL
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/mail"
PKGDATADIR="/usr/share/mutt"
SYSCONFDIR="/etc"
EXECSHELL="/bin/sh"
MIXMASTER="mixmaster"
Um die Entwickler zu kontaktieren, schicken Sie bitte
eine Nachricht (in englisch) an <mutt-dev@xxxxxxxx>.
Um einen Bug zu melden, besuchen Sie bitte http://bugs.mutt.org/.
patch-1.5.13.cd.ifdef.2
patch-1.5.13.cd.purge_message.3.4
patch-1.5.13.cd.trash_folder.3.4
patch-1.5.13.nt+ab.xtitles.4
patch-1.5.14.rr.compressed.1
patch-1.5.4.vk.pgp_verbose_mime
patch-1.5.6.dw.maildir-mtime.1