On Tue, Jan 22, 2002 at 03:00:45PM -0500, cruciatuz wrote: > i fetched my mail and in the meanwhile my computer crashed during a > hd-error. now i fetched again and i got many dupes (in the mbox-file). > mutt is intelligent as usual and shows me the dupes with "=" in the > threads, but: > is there an integrated function for cleaning the mbox-file? > or has someone a clever macro for doing this?
You might be able to do this by piping the entire mailbox through formail. This is dangerous and may corrupt your mbox so I'd be sure to back it up somewhere. Then take the backup mbox which will be your test mbox and do something like like this: cat test-mbox | formail -Yfb -D 8192 ~/tmp/msgid.cache \ -s cat >> tested-mbox See 'man formail' to explain the options to formail. The tested mbox *should* contain the contents of the original mbox minus the dupes. You can mv the tested mbox to the location of the original mbox AFTER checking it by opening it in mutt to make sure it is not corrupted. I just tested this myself using the options I showed you above and it worked without corrupting the mbox. I'll remind you however, to use this at your own risk. Good luck and let me know if this works for you if you decide to try it. PS: don't use the -c option with formail when doing this. I tried that and it ended up truncating some of the headers but left the bodies intact. Also I'm assuming you use mbox for mail. If you use maildir this won't work as stated above but might work with different options to formail. -- Ken Wahl [EMAIL PROTECTED] http://www.kenwahl.org/mutt/ PGP/GPG Key C225AA5A: http://www.kenwahl.org/pubkey.gpg Mutt: All mail clients suck, this one just sucks less.. Weaponized Linux Kernel 2.4.9-12 Uptime: 44 days, 23:33
msg23561/pgp00000.pgp
Description: PGP signature