is there a way, probably in .muttrc, to make mutt activate the
system bell when new mail arrives?
thanks in advance.
--
m j teigen
"Logic sometimes makes monsters" - Henri Poincare
no. thank god!
Sven
> hello...i am endeavoring to make mutt invoke a system beep.
> just to make sure the non-beeping wasn't a system-wide
> configuration problen, i started pine, which beeped fine upon
> receipt of new mail, which is my goal for mutt.
>
> is there a way, probably in .muttrc, to make mutt activate the
> system bell when new mail arrives?
>
> thanks in advance. -- m j teigen
>
If Sven says "no", then it's probably not possible with Mutt.
But we can probably whip up a wrapper script that would do
the job.
Do you have bash on your box and how do you download mail?
(With mutt's fetchmail or the real fetchmail or what?)
AC
Gonna be offnet for a while.
#!/bin/bash
fetchmail
if grep '^Status.*U' ~/Mail/{mailbox1,mailbox2} &> /dev/null
then
echo -e "\a"
fi
exit 0
Something along those lines...
AC
Actually, yes, there is. Put this in your muttrc:
set beep_new
Gary
i normally run ksh on sdf.lonestar.org (bash interferes with my
pretty mutt colors, i've found). i stay logged in via ssh,
reading mail remotely with mutt. i download no mail to boxes.
> #!/bin/bash
>
> fetchmail
>
> if grep '^Status.*U' ~/Mail/{mailbox1,mailbox2} &> /dev/null
> then
> echo -e "\a"
> fi
>
> exit 0
thanks for the script, but ``set beep_new'' worked in .muttrc
(thanks!). now, i'll just see if i can stand hearing the friggin
beep every time i backspace against the beginning of a line in
vim, in my shell, etc (i previously had the beep silenced,
system-wide).
incidentally, might there be a way to silence the beep in all
instances besides receiving new mail? i know it's likely to be
complicated and requiring me to learn all sorts of new unix,
but i'm curious.
TIA.
i guess it'd be a matter of editing specific configuration files for
everything (.kshrc, .vimrc, etc) to silence beeps for individual
programs. i'm sure information on this is available in more
appropriate newsgroups, or on the web. sorry about that.
check your bash setup for TERM settings and more then.
> but ``set beep_new'' worked in .muttrc (thanks!).
that's not the system bell, you know..
> now, i'll just see if i can stand hearing the friggin beep every time
> i backspace against the beginning of a line in vim, in my shell, etc
> (i previously had the beep silenced, system-wide).
i give you one week.
> incidentally, might there be a way to silence the
> beep in all instances besides receiving new mail?
yes.
> i know it's likely to be complicated and requiring
> me to learn all sorts of new unix, but i'm curious.
"we could tell you - but then we'd have to kill you."
Sven
--
"quiet, dammit!" (1) tweak /dev/snd (2) remove sound card
(3) turn speakers off (4) set visualbell on terminal
(5) prevent programs from "beep"ing (change config)
>>Do you have bash on your box and how do you download mail?
>
> i normally run ksh on sdf.lonestar.org (bash interferes with
> my pretty mutt colors, i've found). i stay logged in via ssh,
> reading mail remotely with mutt. i download no mail to boxes.
>
>> #!/bin/bash
>>
>> fetchmail
>>
>> if grep '^Status.*U' ~/Mail/{mailbox1,mailbox2} &> /dev/null
>> then echo -e "\a" fi
>>
>> exit 0
>
> thanks for the script, but ``set beep_new'' worked in .muttrc
> (thanks!). now, i'll just see if i can stand hearing the
> friggin beep every time i backspace against the beginning of
> a line in vim, in my shell, etc (i previously had the beep
> silenced, system-wide).
>
<chuckle>
> incidentally, might there be a way to silence the beep in all
> instances besides receiving new mail? i know it's likely to be
> complicated and requiring me to learn all sorts of new unix,
> but i'm curious.
>
Me too. :-)
AC
> is there a way, probably in .muttrc, to make mutt activate the
> system bell when new mail arrives?
via procmail:
:0 c
| /usr/bin/play $HOME/dati/audio/wav/voice/quack.wav &
or better:
TMP=`echo $MAILFROM | sed "s/<//" | sed "s/>//"`
:0 c
| say -v -t 10 -f 13 -c 4.0 -x 1100 "mail from $TMP"; echo $TMP >> say-match.txt
:-)
--
Pa.Ped, Como
http://www.pedaletti.it
> Ciao barnacle at freeshell dot org,
>
>> is there a way, probably in .muttrc, to make mutt activate the
>> system bell when new mail arrives?
OK, its an X11 only solution but I find wmbiff handy for this. Plus it
shows me how many mails & new mails I've got in each mailbox, and lets
me use a different sound for each mailbox.
--
Stephen Patterson http://patter.mine.nu/
steveSPAM@.patter.mine.nu remove SPAM to reply
Linux Counter No: 142831 GPG Public key: 252B8B37
Caution: breathing may be hazardous to your health.
[...]
>Something along those lines...
That maybe, depending on the system, resets atimes so a mutt flavour
won't correctly detect where new mail is. Just switch do Maildir and
count the files in $maildir/new or get "fix-atime" from the mutt
maintainer and fix all file attributes for mbox files after your grep
call(s).
bye, Rocco
--
:wq!
> * Alan Connor wrote:
>
> [...]
>
>>Something along those lines...
>
> That maybe, depending on the system, resets atimes so a
> mutt flavour won't correctly detect where new mail is.
Mutt uses atimes instead of the 'Status' flags?
> Just
> switch do Maildir and count the files in $maildir/new or
That would work, but I like mbox.
> get "fix-atime" from the mutt maintainer and fix all file
> attributes for mbox files after your grep call(s).
>
Easy enough to include that in the script, if necessary:
touch -a
> bye, Rocco
> --
> :wq!
Cheers,
AC
--
ZZ :-)
"Paul Walker"
Don't know how many times I have to tell you that
I don't read your posts.
(The number of people on the Usenet who think that people
are just going to go on reading their abusive articles
forever boggles the mind: How can anyone that stupid
operate a computer?)
You have the right to free speech, and I have the right
to free hearing.
I choose not to listen to you anymore.
AC
>> That maybe, depending on the system, resets atimes so a
>> mutt flavour won't correctly detect where new mail is.
> Mutt uses atimes instead of the 'Status' flags?
It uses status flags when it actually opens the mailbox. For the 'mailboxes'
stuff, i.e. detecting which mailboxes have new mail, it uses atimes. This is
why if you have (say) xbiff running, mutt won't reliably pick up new mail in
the spool.
--
Paul
Our garden was debated territory between five local cats, and we'd heard
that the best way to keep other cats out of the garden was to have one
yourself. A moment's rational thought here will spot the slight flaw in this
reasoning. -- Terry Pratchett, The Unadulterated Cat
> Don't know how many times I have to tell you that I don't read your posts.
Alan, you can post this until you're blue in the face, because I don't
actually care.
(a) you obviously haven't kill-filed me, or you wouldn't have known I'd
responded, so you've made yourself look dafter.
(b) I wasn't responding just for your benefit, but for general consumption.
There are other people reading who might not have known of that effect.
If you want, you can pretend to have sent a similar post in response to this
one. We'll both be in much the same situation that way as if you really had
sent one.
--
Paul
Since I won't be reading that post of "Paul Walker's", and
he knows this, he is posting for the benefit of everyone
else reading the thread.
Are you all enjoying the impotent ravings of a thwarted
two-bit Usenet bully?
Paul: Your current post goes unread too, and will be deleted from
the local cache I read from in about 2 seconds.
You wear a gag in my presence. And can't take it off without
my permission. That's a fact.
AC
> Are you all enjoying the impotent ravings of a thwarted
> two-bit Usenet bully?
Alan, increase the dosage. I don't believe I've ever tried to abuse or bully
you, just correct you when you were wrong. It would appear that you don't
take well to this.
But, no matter. In a month or so you'll be responding to my posts again,
until I post something else you don't like, at which point you'll announce
that you've always been ignoring them. <shrug>
--
Paul
You've got to be cruel, to... what was the reason again?
-- Mike Bristow in a.s.r
* Alan Connor [05-03-21 23:11:58 +0000] wrote:
>Mutt uses atimes instead of the 'Status' flags?
Yes. It frequently checks for new mails and would have to open all your
mbox folders to parse all flags. Mutt-ng supports that if you want and
people report that it's _very_ _very_ slow.
[...]
>touch -a
That won't work reliably, too.
Mutt does this: when a mbox folder's atime is _behind_ the mtime, it's
assumed that there's new mail in. When setting the atime to the current,
the atime still is ahead mtime and mutt concludes that there cannot be
new mail in. Since it was also changed outside of mutt, it wouldn't help
if mutt did reset the atime on its own. Conclusion: checking for new
mail with mbox is fragile. Just use maildir (see below).
When using a grep command on mbox folders, I see no other way then
running this 'fix-atime' since it parses the folders and resets only
those atimes of folders which actually contain new mail. Thus, all
folders with new mail will have an atime which one second behind the
mtime and thus, for mutt, contain new mail.
As said, this parsing is very slow since for mbox you need to take care
of things like mime. For example, when you receive a mail which has a
mail as an attachement and that attachment has the 'new' flag set but
you already read the mail it's attached to, there's no mail in the
folder etc. I don't now if the fix-atime tool handles that, but I still
conclude: just switch to maildir.
For maildir this is _much_ faster since mutt just checks wether there's at
least one file in new/ without flags. No mime magic no nothing, just a
very low level file system operation.
bye, Rocco
--
:wq!
> Hi,
>
> * Alan Connor [05-03-21 23:11:58 +0000] wrote:
>
>>Mutt uses atimes instead of the 'Status' flags?
>
> Yes. It frequently checks for new mails and would have to open
> all your mbox folders to parse all flags. Mutt-ng supports that
> if you want and people report that it's _very_ _very_ slow.
>
> [...]
>
>>touch -a
>
> That won't work reliably, too.
>
> Mutt does this: when a mbox folder's atime is _behind_ the
> mtime, it's assumed that there's new mail in. When setting the
> atime to the current,
I didn't say that I would set it to the current atime. I would
set it to whatever it was before the script accessed it.
> the atime still is ahead mtime and mutt
> concludes that there cannot be new mail in. Since it was also
> changed outside of mutt, it wouldn't help if mutt did reset the
> atime on its own. Conclusion: checking for new mail with mbox
> is fragile. Just use maildir (see below).
I like mbox and it works fine.
>
> When using a grep command on mbox folders, I see no other way
> then running this 'fix-atime' since it parses the folders and
> resets only those atimes of folders which actually contain new
> mail. Thus, all folders with new mail will have an atime which
> one second behind the mtime and thus, for mutt, contain new
> mail.
>
> As said, this parsing is very slow since for mbox you need to
> take care of things like mime. For example, when you receive a
> mail which has a mail as an attachement and that attachment has
> the 'new' flag set but you already read the mail it's attached
> to, there's no mail in the folder etc. I don't now if the
> fix-atime tool handles that, but I still conclude: just switch
> to maildir.
>
> For maildir this is _much_ faster since mutt just checks wether
> there's at least one file in new/ without flags. No mime magic
> no nothing, just a very low level file system operation.
>
> bye, Rocco
> -- :wq!
Interesting. However...
I have been reading up on maildir, and am not impressed. Too
complex.
Mbox is much easier to deal with and I've never had a problem.
AC
> Mbox is much easier to deal with and I've never had a problem.
I've had problems with mutt not recognizing mbox folders containing
new mail, too, so now I always configure it with --enable-buffy-size
and it works fine, even when I have other programs checking for new
mail.
Gary
If I had the source handy, I'd look over that option.
Here's what my stock Debian version reports:
$ mutt -v
Mutt 1.3.24i (2001-11-29)
Copyright (C) 1996-2001 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.4.19 (i686) [using ncurses 5.2]
Compile options:
-DOMAIN
+DEBUG
-HOMESPOOL +USE_SETGID +USE_DOTLOCK +DL_STANDALONE
+USE_FCNTL -USE_FLOCK
+USE_POP +USE_IMAP -USE_GSS -USE_SSL +USE_GNUTLS +USE_SASL
+HAVE_REGCOMP -USE_GNU_REGEX
+HAVE_COLOR +HAVE_START_COLOR +HAVE_TYPEAHEAD +HAVE_BKGDSET
+HAVE_CURS_SET +HAVE_META +HAVE_RESIZETERM
+HAVE_PGP -BUFFY_SIZE -EXACT_ADDRESS -SUN_ATTACHMENT
+ENABLE_NLS -LOCALES_HACK +COMPRESSED +HAVE_WC_FUNCS +HAVE_LANGINFO_CODESET +HAVE_LANGINFO_YESEXPR
+HAVE_ICONV -ICONV_NONTRANS +HAVE_GETSID +HAVE_GETADDRINFO
ISPELL="/usr/bin/ispell"
SENDMAIL="/usr/sbin/sendmail"
MAILPATH="/var/mail"
PKGDATADIR="/usr/share/mutt"
SYSCONFDIR="/etc"
EXECSHELL="/bin/sh"
MIXMASTER="mixmaster"
To contact the developers, please mail to <mutt...@mutt.org>.
To report a bug, please use the flea(1) utility.
patch-1.3.24.cd.edit_threads.7
patch-1.3.15.sw.pgp-outlook.1
patch-1.3.24.admcd.gnutls.1
Md.use-editor
Md.paths-mutt.man
Md.use-etc-mailname
Md.Muttrc
Md.muttbug-warning
patch-1.3.23.2.rr.compressed.1
patch-1.2.xtitles.1
patch-1.3.23.1.ametzler.pgp_good_sign
-----------------------
It may be that I don't have any problems with mutt recognizing
new mail because I don't accept anything but plain text without
attachments accept by special arrangement.
AC