Re: support for compressed folders in 1.2?
I'm using procmail with gziped boxes, with no problems with a patch and lockfiles : first, my .muttrc : cut- append-hook \\.gz$ "touch $HOME/.mutt_gzip.lock ; gzip -c %t %f ; rm -f $HOME/.mutt_gzip.lock" open-hook \\.gz$ "touch $HOME/.mutt_gzip.lock ; gzip -cd %f %t" close-hook \\.gz$ "gzip -c %t %f ; rm -f $HOME/.mutt_gzip.lock" /cut- .mutt_gzip.lock is my lockfile second, the patch : cut- diff -urN mutt-1.2/mx.c mutt-1.1.12/mx.c --- mutt-1.2/mx.c Wed May 10 10:44:09 2000 +++ mutt-1.1.12/mx.cTue May 2 17:16:08 2000 @@ -915,6 +915,15 @@ else if (!ctx-changed ctx-deleted == 0) { mutt_message _("Mailbox is unchanged."); +#ifdef USE_COMPRESSED +if (ctx-compressinfo) { + char * home = getenv("HOME"); + char fichlock[256]; + strcpy(fichlock,home); + strcat(fichlock,"/.mutt_gzip.lock"); + unlink(fichlock); +} +#endif mx_fastclose_mailbox (ctx); return 0; } /cut- third, my .procmailrc : cut- :0w# Anything from Antoine Martin * ^From.*martina.* | proczip Antoine.gz /cut- finally, the script proczip : cut- #!/bin/sh if [ -f ${HOME}/.mutt_gzip.lock ] ;then \ cat $DEFAULT ; \ else\ /usr/local/gnu/bin/gzip -fcq9 ${MAILDIR}/$1 ; \ fi /cut- Now, I'll explain how it works : When I open a gzipped mailbox with mutt, I create a lockfile. When procmail want to deliver a mail, it will put it in the compressed mailbox ONLY if this mailbox is not used by mutt. If the mailbox is used, the mail will be delivered in the $DEFAULT mbox, which should NOT be compressed, of course. Any idea to make this better ? Antoine On Sat, May 20, 2000 at 04:25:29PM +0200, Roland Rosenfeld wrote: On Sat, 20 May 2000, Zhendong wrote: Then what about the supporting for compressed mail folders in procmail when using mutt? I use procmail to deliver mails to different mail folders. After I've changed the mutt folders to gz format, procmail still delivers mails as uncompressed format, they can not work well together. It's possible to append mails to gzipped folders by something like | gzip folder in your .procmailrc. BUT DON'T DO THIS, if you do not want to loose mail! IIRC, there is no mechanism to merge changes in the compressed folder into the temporary uncompressed folder, so if you have a compressed folder open for reading, while a new mail arrives and is appended to this compressed folder, it will never been shown, but simply overwritten, when leaving the compressed folder with mutt. I suggest to use compressed folders only for archive folders but not for incoming folders. Tscho Roland -- * [EMAIL PROTECTED] * http://www.spinnaker.de/ *
Re: support for compressed folders in 1.2?
Zhendong: folders. After I've changed the mutt folders to gz format, procmail still delivers mails as uncompressed format, they can not work well together. then run the mails through gzip. the line "| gzip folder" will append compressed data to the folder. this has nothing to do with mutt. furthermore, the attitude behind the statement "...they can not work well together" drives me up the wall. do you really silently expect any program to foresee every users needs and integrate all possible solutions? this is the opposite of unix thinking, where a number of independant little programs to their speciality bound into a framework by a smart and small operating system, which operates the same way. your statement reveals micro$oft thinking: give the users one big babel tower, and if they can't get their tasks done with it, it cannot be done at all! gzip does not even have to uncompress the target file to append new data, it handles compressed data streams well. -- clemens [EMAIL PROTECTED] do D4685B884894C483
Re: support for compressed folders in 1.2?
clemensF proclaimed on mutt-users that: the opposite of unix thinking, where a number of independant little programs to their speciality bound into a framework by a smart and small operating system, which operates the same way. your statement reveals micro$oft thinking: give the users one big babel tower, and if they can't get their tasks done with it, it cannot be done at all! heresy Sounds a lot like emacs thinking to me :) g,dr -- Suresh Ramasubramanian | sureshr at staff.juno.com An idea is not responsible for the people who believe in it.
Re: support for compressed folders in 1.2?
Yuzhendo Zhendong (perhaps one and the same) -- ...and then [EMAIL PROTECTED] said... % Can we use Procmail to play with the compressed mail folders? Since I % found that even when mutt can deal with compressed folders, procmail % will not deliver mails in compressed format. So there will some % problems. ...and then Zhendong said... % % Then what about the supporting for compressed mail folders in procmail % when using mutt? I use procmail to deliver mails to different mail % folders. After I've changed the mutt folders to gz format, procmail % still delivers mails as uncompressed format, they can not work well % together. I'll leave the explanation from our friend clemens alone and also leave all of the credit for the rant :-) Yes, you can use procmail with compressed folders by compressing your incoming mail (| gzip -c) before it writes to the folder ( box.gz). Be sure that you do sufficient locking (no, I still haven't really figured out procmmail locking and when I should specifiy a lock and when not and ...) to guarantee that only one stream at a time is appended to your mailbox; mixing two at once is bad even if the file doesn't get wiped. Before messing with all of that, though, I'd ask "why on earth are you delivering to a compressed folder??" because it's just one more step to handle. In order for mutt to read the compressed folder it's going to have to uncompress it to a temp file first, and you certainly don't want to have to mess with that every time you go to read mail. Why not deliver to an uncompressed mailbox (of some sort -- mbox, maildir, MH) as usual, read your mail as usual, and then archive (perhaps with good old $move though you may have to do some tweaking to tell it how to move from box to box.gz) to a compressed folder? The mail is still available in case you need to go back in time, but the stuff you're likely to use regularly is *easy* to use. Just my twenty millibucks; YMMV. HTH HAND! :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.bigfoot.com/~davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! The "new millennium" starts at the beginning of 2001. There was no year 0. Note: If bigfoot.com gives you fits, try sector13.org in its place. *sigh* PGP signature
Re: support for compressed folders in 1.2?
Hi clemensF, David T-G Thank you for pointing me out :) David T-G wrote: I'll leave the explanation from our friend clemens alone and also leave all of the credit for the rant :-) Yes, you can use procmail with compressed folders by compressing your incoming mail (| gzip -c) before it writes to the folder ( box.gz). Be sure that you do sufficient locking (no, I still haven't really figured out procmmail locking and when I should specifiy a lock and when not and ...) to guarantee that only one stream at a time is appended to your mailbox; mixing two at once is bad even if the file doesn't get wiped. Before messing with all of that, though, I'd ask "why on earth are you delivering to a compressed folder??" because it's just one more step to handle. In order for mutt to read the compressed folder it's going to have to uncompress it to a temp file first, and you certainly don't want to have to mess with that every time you go to read mail. Why not deliver to an uncompressed mailbox (of some sort -- mbox, maildir, MH) as usual, read your mail as usual, and then archive (perhaps with good old $move though you may have to do some tweaking to tell it how to move from box to box.gz) to a compressed folder? The mail is still available in case you need to go back in time, but the stuff you're likely to use regularly is *easy* to use. Just my twenty millibucks; YMMV. HTH HAND! :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.bigfoot.com/~davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! The "new millennium" starts at the beginning of 2001. There was no year 0. Note: If bigfoot.com gives you fits, try sector13.org in its place. *sigh*
Re: support for compressed folders in 1.2?
On Sat, 20 May 2000, Zhendong wrote: Then what about the supporting for compressed mail folders in procmail when using mutt? I use procmail to deliver mails to different mail folders. After I've changed the mutt folders to gz format, procmail still delivers mails as uncompressed format, they can not work well together. It's possible to append mails to gzipped folders by something like | gzip folder in your .procmailrc. BUT DON'T DO THIS, if you do not want to loose mail! IIRC, there is no mechanism to merge changes in the compressed folder into the temporary uncompressed folder, so if you have a compressed folder open for reading, while a new mail arrives and is appended to this compressed folder, it will never been shown, but simply overwritten, when leaving the compressed folder with mutt. I suggest to use compressed folders only for archive folders but not for incoming folders. Tscho Roland -- * [EMAIL PROTECTED] * http://www.spinnaker.de/ *
Re: support for compressed folders in 1.2?
Roland Rosenfeld: | gzip folder BUT DON'T DO THIS, if you do not want to loose mail! IIRC, there is no mechanism to merge changes in the compressed folder into the temporary uncompressed folder, so if you have a compressed folder open for reading, while a new mail arrives and is appended to this compressed folder, it will never been shown, but simply overwritten, when leaving the compressed folder with mutt. I suggest to use compressed folders only for archive folders but not for incoming folders. an exception might be allowed if the folder is protected by a lock. but when looking at the details, updating a compressed folder while it's uncompressed temporary image is open for reading will not damage anything. but when the folder isn't locked and =updated= by the viewer when mail is appended at the same time, things might well go wrong. -- clemens [EMAIL PROTECTED]
Re: support for compressed folders in 1.2?
Suresh Ramasubramanian: heresy Sounds a lot like emacs thinking to me :) g,dr you, youDANGEROUS PERSON!
Re: support for compressed folders in 1.2?
It works for compressed mutt mail folders. Then what about the supporting for compressed mail folders in procmail when using mutt? I use procmail to deliver mails to different mail folders. After I've changed the mutt folders to gz format, procmail still delivers mails as uncompressed format, they can not work well together. thanks. zd === From: Lars Hecking Subject: Re: support for compressed folders in 1.2? Date: Thu, 18 May 2000 08:59:24 -0700 I'm making the move from 0.95.5i to 1.2 to get all of the useful changes therein. However, I'd been using Alain Penders' support for compressed folders in 0.95.5i, and now can't live without it. :) I tried just patching the existing diffs into 1.2, but of course that failed. Before I go through and port this stuff over to 1.2, does anybody know if this has already been done? Thanks much! http://www.spinnaker.de/mutt/#compressed
Re: support for compressed folders in 1.2?
heh. nevermind. found it on spinnaker. pls ignore... eric On Thu, May 18, 2000 at 09:37:19AM -0400, Eric Osborne wrote: Folks- I'm making the move from 0.95.5i to 1.2 to get all of the useful changes therein. However, I'd been using Alain Penders' support for compressed folders in 0.95.5i, and now can't live without it. :) I tried just patching the existing diffs into 1.2, but of course that failed. Before I go through and port this stuff over to 1.2, does anybody know if this has already been done? Thanks much! eric
Re: support for compressed folders in 1.2?
I'm making the move from 0.95.5i to 1.2 to get all of the useful changes therein. However, I'd been using Alain Penders' support for compressed folders in 0.95.5i, and now can't live without it. :) I tried just patching the existing diffs into 1.2, but of course that failed. Before I go through and port this stuff over to 1.2, does anybody know if this has already been done? Thanks much! http://www.spinnaker.de/mutt/#compressed
Re: support for compressed folders in 1.2?
Eric -- ...and then Eric Osborne said... % Folks- % % I'm making the move from 0.95.5i to 1.2 to get all of the useful % changes therein. However, I'd been using Alain Penders' support for % compressed folders in 0.95.5i, and now can't live without it. :) I can imagine! That's pretty old, though. % % I tried just patching the existing diffs into 1.2, but of course % that failed. Before I go through and port this stuff over to 1.2, % does anybody know if this has already been done? Thanks much! See http://www.rhein.de/~roland/mutt/ for the rr.compressed patch. Have fun :-) % % eric :-D -- David T-G * It's easier to fight for one's principles (play) [EMAIL PROTECTED] * than to live up to them. -- fortune cookie (work) [EMAIL PROTECTED] http://www.bigfoot.com/~davidtg/Shpx gur Pbzzhavpngvbaf Qrprapl Npg! The "new millennium" starts at the beginning of 2001. There was no year 0. Note: If bigfoot.com gives you fits, try sector13.org in its place. *sigh* PGP signature