Re: maildirs and Lines:

2000-07-01 Thread Mikko Hänninen

Brian D. Winters [EMAIL PROTECTED] wrote on Fri, 30 Jun 2000:
 1) Extend fcc-hooks to allow piping to a filter program.

I think that would be a good feature.  Not just because of this, but for
other uses too.

 2) Add an "auto_add_maildir_lines" option.

I would have expected that by default, Mutt always adds a Lines header
when saving a message.  Obviously if you're not getting that with Fcc's,
then it doesn't work that way. :-)  But at least if take a message
without a Lines header and save it to a Maildir, I think the header does
get added, doesn't it?

*tests*

No it doesn't. :-(

I don't think this even needs to be an option, or is there some bad
performance hit or something why the user might not want Mutt always to
add a Lines header when writing a message to a Maildir?

 Does anyone know of a reason other than, "No one has submitted a patch
 yet," why one of these hasn't been added, or is there a better
 solution which I'm missing?

I would guess it's the former...


Mikko
-- 
// Mikko Hänninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
// The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy  scifi, the Corrs /
The 5 year plan: In 5 years we'll make up a new plan. Or just re-use this one.



Re: maildirs and Lines:

2000-07-01 Thread Brian D. Winters

On Sat, Jul 01, 2000 at 01:48:26PM +0300, Mikko Hänninen wrote:
 Brian D. Winters [EMAIL PROTECTED] wrote on Fri, 30 Jun 2000:
  2) Add an "auto_add_maildir_lines" option.
 
...
 I don't think this even needs to be an option, or is there some bad
 performance hit or something why the user might not want Mutt always to
 add a Lines header when writing a message to a Maildir?

There is a performance hit.  (I don't believe it is bad; see next
paragraph.)  You need to scan the whole message once in order to know
how many lines it has, so you can write Lines:.  In order to insert
the header, you need to make a copy of the message, which means making
two passes over the message or reading the entire message into memory
while you count lines.  (I believe the FAQ's procmail recipe reads the
entire message into memory, but who can tell for sure exactly what it
does. :)  The python script I wrote yesterday to put in list-specific
.qmail-... files also reads the entire message into memory and then
outputs it after counting the lines.)

Now, how do mboxes work again? :)  The cost of rewriting an individual
maildir message is nothing compared to the cost of adding a Status:
header in a big mbox.  I'd be happy to take the hit once per message
in my maildir.  In fact I already do, as it passes through the filter
on delivery.  I think that adding Lines: should be an option (I'm sure
someone won't want it), but the default should be "yes".

Brian



maildirs and Lines:

2000-06-30 Thread Brian D. Winters

(I checked the archives, and although this has been asked before, no
one had a good answer.  Hopefully someone will have a better idea this
time around, or I missed the answer in the archives.)

I use maildirs, but I prefer to see lines rather than sizes in the
message index.  I've been using the procmail recipe to add Lines: for
a long time, and it works well on incoming mail.  This doesn't
implicitly deal with outgoing e-mail, but in most cases bccing myself
works well enough.  The problem with bccing myself is that I get two
copies when I send to mailing lists which return a copy to me.  The
easy solution is to remove the Bcc header when I send to a list,
except it isn't that easy.

I have been removing the Bcc manually, which is a pain and sometimes I
forget.  A few days ago I decided to try to make it automatic (I am
using mutt after all...), and remembered why I haven't set this up
earlier.  send-hooks take effect after all of the recipient headers
are set.  Bcc is a recipient header.  fcc-hooks don't have that
ordering problem, but there is no way to pipe the message through
procmail or any other program to add Lines:.

I see two obvious solutions:

1) Extend fcc-hooks to allow piping to a filter program.
2) Add an "auto_add_maildir_lines" option.

Does anyone know of a reason other than, "No one has submitted a patch
yet," why one of these hasn't been added, or is there a better
solution which I'm missing?

Brian