Really strange 'new messages' problem

2007-12-09 Thread Chris G
I have just had the shell account where I read my mail moved from a
FreeBSD system to a Linux one.  I was using mutt 1.5.16 on the FreeBSD
system, I'm using 1.5.17 on the Linux system.  I have the same home
directory on both systems so my muttrc file is unchanged (except for
removing sentmail from the mailboxes line).

I'm getting an odd effect when I log in to read new mail, the busier
mailing lists' mail appears in two chunks.  I.e. I see new mail in the
fedora mailing list mailbox, I open it and read, say, 20 messages.  I
then go to the next mailing list (possibly mutt) read messages there
and then, immediately afterwards the next new messages are 50 or so in
the fedora mailbox again.  There's no way they're really new or have
arrived since the first lot.  This wasn't happening in the FreeBSD
environment, does anyone have any ideas what might be causing it?

-- 
Chris Green


Re: Reliable/safe way of removing empty maildirs?

2007-12-09 Thread Louis-David Mitterrand
On Thu, Dec 06, 2007 at 01:03:13PM +, Chris G wrote:
 What's a reliable way of removing empty maildirs?

my /etc/crontab entry:

for i in ~/Maildir/.*; do if [ -d $i ]  [ ! $(find $i -mindepth 2 -type 
f) ]; then rm -rf $i ; fi ; done


attachment viewing and mailcap query

2007-12-09 Thread Jamie Griffin
Hi - 

I've read so many websites and the manuals to set up attachment viewing from 
mutt. I've got a .mutt/auto_view file and a .mutt/mailcap file with appropriate 
entries in it. 

The main problem i'm having is with ms applications - word is the one i've 
tried so far. 

I got around this by putting the following in my .mutt/mailcap file:

application/msword; view_attachment %s - '/Applications/Microsoft\ Office\ 
2004/Microsoft\ Word'

and have a 'view_attachment' script in /usr/local/bin. This worked ok, but when 
opening mail with a word document attached, i kept getting an error-message 
saying:

mailcap entry application/msword not found. This frustrated me and i thought 
my configuration must be wrong. 

I was able to open the attachment by pressing the 'v' key to view, and 
selecting the attachment which then opened it with the msword program. I was 
still bothered by the mailcap entry error i was getting.

I then installed antiword and added the following entry into my .mutt/mailcap 
file:

application/msword; antiword %s | more; copiousoutput; needsterminal

This does allow me to view the attachment contents, but can't open the 
attachment with the word program. I would like to do both, this is where i'm 
having problems. Perhaps my set up is wrong?

Does anyone have any suggestions?

Jamie


pgpzL5W1vJ3Sd.pgp
Description: PGP signature


Re: attachment viewing and mailcap query

2007-12-09 Thread Brian Salter-Duke
On Sun, Dec 09, 2007 at 07:49:39PM +, Jamie Griffin wrote:
 Hi - 
 
 I've read so many websites and the manuals to set up attachment viewing 
 from mutt. I've got a .mutt/auto_view file and a .mutt/mailcap file 
 with appropriate entries in it. 
 
 The main problem i'm having is with ms applications - word is the one 
 i've tried so far. 
 
 I got around this by putting the following in my .mutt/mailcap file:
 
 application/msword; view_attachment %s - '/Applications/Microsoft\ Office\ 
 2004/Microsoft\ Word'

This will work after pressing v but cannot work when you just open the
mail. That needs something that converts word to text and the mailcap
entry needs the 'copiousoutput;' parameter. 

 and have a 'view_attachment' script in /usr/local/bin. This worked ok, 
 but when opening mail with a word document attached, i kept getting 
 an error-message saying:
 
 mailcap entry application/msword not found. This frustrated me and i 
 thought my configuration must be wrong. 
 
 I was able to open the attachment by pressing the 'v' key to view, and 
 selecting the attachment which then opened it with the msword program. 
 I was still bothered by the mailcap entry error i was getting.
 
 I then installed antiword and added the following entry into my 
 .mutt/mailcap file:
 
 application/msword; antiword %s | more; copiousoutput; needsterminal

Do you have this line and the one above in the mailcap file? If so it
will use Msword from the attachemnt menu after pressing v and antiword
in line when you open the mail.

The other question is thsi - are all your word attachemnts of
application/msword type? They could be application/vnd.msword or indeed
a host of other things unfortunately and you will have to add other
lines to your mailcap to cover these.
 
 This does allow me to view the attachment contents, but can't open the 
 attachment with the word program. I would like to do both, this is 
 where i'm having problems. Perhaps my set up is wrong?
 
 Does anyone have any suggestions?
 
 Jamie



-- 
The PROPER way to handle HTML postings is to cancel the article, then
hire a hitman to kill the poster, his wife and kids, and fuck his dog
and smash his computer into little bits. Anything more is just extremism.
-- Paul Tomblin
Brian Salter-Duke (Brian Duke) Email: b_duke(AT)bigpond(DOT)net(DOT)au



Re: Reliable/safe way of removing empty maildirs?

2007-12-09 Thread Chris G
On Sun, Dec 09, 2007 at 05:59:40PM +0100, Louis-David Mitterrand wrote:
 On Thu, Dec 06, 2007 at 01:03:13PM +, Chris G wrote:
  What's a reliable way of removing empty maildirs?
 
 my /etc/crontab entry:
 
 for i in ~/Maildir/.*; do if [ -d $i ]  [ ! $(find $i -mindepth 2 
 -type f) ]; then rm -rf $i ; fi ; done

Which is OK until some mail arrives between the find and the rm
surely?!

-- 
Chris Green


Re: attachment viewing and mailcap query

2007-12-09 Thread Jamie Griffin
Thanks for that. 

I did keep both lines/entries in the mailcap file, only now i have swapped them 
around, like so: 

application/msword; view_attachment %s - '/Applications/Microsoft\ Office\ 
2004/Microsoft\ Word'
application/msword; antiword %s | less; copiousoutput; needsterminal

This does now allow me to first view the document in the pager form, but also 
allows me to open the attachment using the word program when pressing the v 
key. 

I've just been doing this over the weekend and so far have only been 
experimenting with the documents i have. I'm sure i'll come across problems 
when i receive different file types. 

from what the snippet i've shown you, does it look as though i'm doing it 
correctly? I'm afraid it's been a lot of trial and error so far. 

Jamie 


pgpLN3yYe2hge.pgp
Description: PGP signature


Re: Reliable/safe way of removing empty maildirs?

2007-12-09 Thread Louis-David Mitterrand
On Sun, Dec 09, 2007 at 08:41:07PM +, Chris G wrote:
 On Sun, Dec 09, 2007 at 05:59:40PM +0100, Louis-David Mitterrand wrote:
  On Thu, Dec 06, 2007 at 01:03:13PM +, Chris G wrote:
   What's a reliable way of removing empty maildirs?
  
  my /etc/crontab entry:
  
  for i in ~/Maildir/.*; do if [ -d $i ]  [ ! $(find $i -mindepth 2 
  -type f) ]; then rm -rf $i ; fi ; done
 
 Which is OK until some mail arrives between the find and the rm
 surely?!

No, it is still OK: 

1) if any maildir is missing the mda (procmail) will instantly recreate them

2) one should only prune empty maildirs for low-priority list/bulk mail


Re: Mixmaster

2007-12-09 Thread Francesco Ciattaglia
* Brian Salter-Duke [EMAIL PROTECTED] [09.12.07 17:30]:
 On Thu, Dec 06, 2007 at 09:51:44PM +0100, Francesco Ciattaglia wrote:
  * Brian Salter-Duke [EMAIL PROTECTED] [06.12.07 21:31]:
   Is anyone using the mixmaster support in mutt? I ask merely because I
   was involved in improving this about 7 years ago, and I'm curious. I have
   no intention of ever using it again. The support is for a very old
   version of Mixmaster and not for the more recent version 3 betas. 
   
   Should Mixmaster support be kept? It is unlikely to carry on working
   even with the old mixmaster code (version 2.4 beta 46 from September
   2002), and that code may soon be not available.
   
   Brian.
  
  Last Mixmaster changes are dated 2007 september, see:
  http://svn.noreply.org/svn/mixmaster/trunk/Mix/HISTORY
 
 Yes, but none of those versions (2.9  3.0) are supported as far as I
 know by thye current mutt code. About 7 years ago I looked at getting
 mutt to support the 2.9 version 3 betas and decided it was a really big
 job and beyond me. I have no intention of coming back to this. Are you
 going to do it?

Hi Brian,
I know about incompatibility between last releases of Mixmaster and Mutt,
I noticed that mixmaster is still alive only to remark that perhaps
the code, the last version of it, should remain available.

But, sorry, I'm not a programmer, not anymore :-) so for me it's
impossible, even to think, to take on the hard work of updating your
job.

Mutt and Mixmaster Development teams should cooperate for
interoperability.

  
  I would like to use mixmaster support, yes.
  
  I wrote also a complete reference guide* for using mixmaster with Mutt,
  but it's kept in stand-by, because of incompatibility between
  recent versions of Mutt and Mixmaster.
 
 Why not put it on the wiki? It might encourage people to remove the
 incompatability. I added a small change to update the manual to mutt.dev
 yesterday.
  

The explanation I wrote is in italian, but the wiki speaks english.

 
 Brian.

Ciao
Ataualpa aka Francesco Ciattaglia.

-- 
:/ La cosa più facile al mondo è seguire una tendenza, ma è la
 .  /--\ / via più rapida per andare in fallimento. [Jim Rogers]
   o)  =
\__/ \
 \
- Avoid the Gates of Hell! Choose Linux. || www.ataualpa.altervista.org


Re: Really strange 'new messages' problem

2007-12-09 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sunday, December  9 at 04:50 PM, quoth Chris G:
I have just had the shell account where I read my mail moved from a
FreeBSD system to a Linux one.  I was using mutt 1.5.16 on the FreeBSD
system, I'm using 1.5.17 on the Linux system.  I have the same home
directory on both systems so my muttrc file is unchanged (except for
removing sentmail from the mailboxes line).

I'm getting an odd effect when I log in to read new mail, the busier
mailing lists' mail appears in two chunks.  I.e. I see new mail in the
fedora mailing list mailbox, I open it and read, say, 20 messages.  I
then go to the next mailing list (possibly mutt) read messages there
and then, immediately afterwards the next new messages are 50 or so in
the fedora mailbox again.  There's no way they're really new or have
arrived since the first lot.  This wasn't happening in the FreeBSD
environment, does anyone have any ideas what might be causing it?

Is it possible that there's some sort of locking issue, where those 
messages are being held in the mail queue and after mutt cleans the 
lock your MTA is suddenly delivering them all?

~Kyle
- -- 
In order to keep a true perspective of one's importance, everyone 
should have a dog that will worship him and a cat that will ignore 
him.
-- Dereke Bruce
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iD8DBQFHXGqRBkIOoMqOI14RAifnAKDMD51ASGaf/v7PtSrq+Ys2QSJiMgCfa4SH
s3FrVNXpmx1sYcDOJjgQV6Y=
=dSvW
-END PGP SIGNATURE-


Re: attachment viewing and mailcap query

2007-12-09 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sunday, December  9 at 07:49 PM, quoth Jamie Griffin:
 I got around this by putting the following in my .mutt/mailcap file:

 application/msword; view_attachment %s - '/Applications/Microsoft\ Office\ 
 2004/Microsoft\ Word'

 and have a 'view_attachment' script in /usr/local/bin. This worked 
 ok, but when opening mail with a word document attached, i kept 
 getting an error-message saying:

 mailcap entry application/msword not found. This frustrated me and 
 i thought my configuration must be wrong. 

It's saying that because you've most likely told mutt to auto-view 
(i.e. view inline) all MSWord documents. However, auto-viewing 
something requires a mailcap entry with the copiousoutput setting. 
Since you didn't have one, mutt told you it couldn't find an 
appropriate mailcap entry.

 I was able to open the attachment by pressing the 'v' key to view, 
 and selecting the attachment which then opened it with the msword 
 program. I was still bothered by the mailcap entry error i was 
 getting.

Right, because when you view an attachment *that* way, you don't need 
one with copiousputput. To get rid of the error, all you'd have to 
do is take application/msword out of your auto_view settings.

 I then installed antiword and added the following entry into my 
 .mutt/mailcap file:

 application/msword; antiword %s | more; copiousoutput; needsterminal

 This does allow me to view the attachment contents,

As it would; it has the copiousoutput setting.

 but can't open the attachment with the word program. I would like to 
 do both, this is where i'm having problems. Perhaps my set up is 
 wrong?

You mean the first setting no longer works? Probably because mutt 
interprets the mailcap linearly, and uses the FIRST ACCEPTABLE entry. 
If the copiousoutput entry is first, then it will be used for 
everything. If the other entry is first, it will be used when 
copiousoutput is not required, but will be skipped when copiousoutput 
IS required.

~Kyle
- -- 
Where all men think alike, no one thinks very much.
 -- Walter Lippmann
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iD8DBQFHXGwVBkIOoMqOI14RAtmXAKDyFtRNydoOZ2LV+ySjw3p6y4xNHACfQDZp
0Hnm49UBzBGW/LrL0QTO59k=
=e/B2
-END PGP SIGNATURE-


view_attachment script query

2007-12-09 Thread Jamie Griffin
Hi -

further to my query about viewing attachments, i want to ask about the script 
i'm using in /usr/local/bin to
launch the program which opens the attachment.

Firstly, it's working and the attachments are oping succesfully. However, after 
i've closed it and return to mutt
there's an error message on the command line which says: 
/usr/local/bin/view_attachment: line 122: [: too many arguments

here is line the part of the script from line 122:

f [ -z $open_with ]; then
open $newfile
else
open -a $open_with $newfile
fi


The fact it's working fine is good, of course, but this has bothered me. Does 
anyone know why this is? perhaps i should remove the argument? 

I haven't written it myself, it's one i've gotten off the net. by removing the 
argument will this cause problems? Any suggestions would be great. 

Jamie 


pgpk13U7EBzFP.pgp
Description: PGP signature


Re: view_attachment script query

2007-12-09 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sunday, December  9 at 11:10 PM, quoth Jamie Griffin:
Firstly, it's working and the attachments are oping succesfully. 
However, after i've closed it and return to mutt
there's an error message on the command line which says: 
/usr/local/bin/view_attachment: line 122: [: too many arguments

Probably insufficient quoting somewhere.

here is line the part of the script from line 122:

if [ -z $open_with ]; then

There's your problem. That should be:

 if [ -z $open_with ]; then

The reason is that if your open_with path has any spaces in it (which 
Microsoft Word does), it will be treated as multiple arguments to 
the test. What your really want is just to treat the whole thing as a 
single string, and that's what surrounding it in double-quotes 
ensures.

open $newfile
else
open -a $open_with $newfile
fi


The fact it's working fine is good, of course, but this has bothered 
me. Does anyone know why this is? perhaps i should remove the 
argument? 

The reason it's working fine is that when the test fails (because of 
the incorrect quoting), all that happens is that the else portion is 
triggered, which is what you wanted to happen in the first place 
(since you're specifying an open_with argument).

~Kyle
- -- 
I know that there are people who do not love their fellow man, and I 
hate people like that!
  -- Tom Lehrer
-BEGIN PGP SIGNATURE-
Comment: Thank you for using encryption!

iD8DBQFHXHcaBkIOoMqOI14RAhroAJ9KGIk+gdvfUG4uAASzSMPiLrtdCgCgpEra
nrlC0Cu6JcA+gBX1hZloFGo=
=ywd+
-END PGP SIGNATURE-


Mutt Run Amok

2007-12-09 Thread Bill
After installing Leopard 10.5, Mutt has developed the nasty habit of running 
amok after some extended time of use (perhaps several hours, sometimes much 
longer).  

The key symptom is a massive ramp-up in process hogging, as illustrated below:  

Activity Monitor info:
Process ID 252  
CPU Usage hovering around 90%  
RSIZE: 13.5 MB
Virtual Memory: 682.91
Private Memory Size: 14.42
Parent Process: Bash (239)
Process Group: mutt (252)

Sample returns: Can't sample process 252 because it is running in Rosetta

Top command in Terminal shows mutt running as 252, but Terminal 'kill 252' does 
not kill mutt

The only way to kill is to force quit Mutt in Activity Monitor.

Activity Monitor shows Open Files and Ports:
/Users/bj
/sw/bin/mutt
/usr/libexec/oah/Shims/Interposers.dylib
/sw/lib/ncurses/libncurses.5.dylib
/sw/lib/libncursesw.5.dylib
/sw/lib/libintl.1.0.1.dylib
/sw/lib/libiconv.2.2.0.dylib
/usr/lib/libmx.A.dylib
/usr/lib/libstdc++.6.0.4.dylib
/usr/lib/libgcc_s.1.dylib
/usr/lib/libSystem.B.dylib
/usr/lib/system/libmathCommon.A.dylib
/usr/lib/dyld
/private/var/db/dyld/dyld_shared_cache_rosetta
/usr/libexec/oah/translate
/dev/ttys000
/dev/ttys000
/dev/ttys000
/Users/bj/muttmail/default

Any assistance would be appreciated.

bj


Re: Mutt Run Amok

2007-12-09 Thread Kyle Wheeler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sunday, December  9 at 09:48 PM, quoth Bill:
 After installing Leopard 10.5, Mutt has developed the nasty habit of 
 running amok after some extended time of use (perhaps several hours, 
 sometimes much longer).  

Someone had this same problem, and mentioned it on the list. Maybe 
search the list archives. I believe the problem probably involved 
upgrading and/or recompiling old libraries (i.e. he linked to many 
libraries in /sw, none of which had been updated/recompiled for 
Leopard).

~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!

iD8DBQFHXNk5BkIOoMqOI14RAq4RAJ0aNz4C+hHkl0cBKGlbyprZRihoXACg+sBS
lOzE6zdj2pYF1ogT242+byU=
=HHz3
-END PGP SIGNATURE-


Re: attachment viewing and mailcap query

2007-12-09 Thread Gary Johnson
On 2007-12-09, Jamie Griffin [EMAIL PROTECTED] wrote:
 Hi - 
 
 I've read so many websites and the manuals to set up attachment 
 viewing from mutt. I've got a .mutt/auto_view file and a 
 .mutt/mailcap file with appropriate entries in it. 
 
 The main problem i'm having is with ms applications - word is the 
 one i've tried so far. 

You didn't which web sites you had read, so if you haven't already, 
take a look here:

   http://www.spocom.com/users/gjohnson/mutt/#mime
   http://www.spocom.com/users/gjohnson/mutt/#office

The methods explained there have worked well for me.  The rules I am 
using now for application/msword are these in my mailcap file:

   application/msword; mutt_rem_bgrun openoffice.org-2.1 -view %s; test=RunningX
   application/msword; word2text %s; copiousoutput

and this in my muttrc:

   auto_view application/msword

The mutt_rem_bgrun script allows me to have mutt run on Solaris and 
launch applications such as OpenOffice on Linux.

HTH,
Gary