Re: [Evolution] Duplicate Emails



Occasionally I find that Evolution will hang when trying to download
email from one of my POP mail accounts.  This usually results in my
having to kill and restart Evolution.  Unfortunately this often
results in Evolution re-downloading my entire POP mailbox rather than
just downloading those messages that haven't been retrieved.  I keep
my messages on the POP server for awhile, so when this happens
Evolution will often re-download 2000 messages or more(however many
happen to be in the mailbox at the time)..  Is there a way to prevent
this from happening?  Short of that, is there a way to prune my mail
folders from within Evolution to remove duplicate (or triplicate)
mails?

Back in April I wrote a custom script to remove duplicate emails in mbox
folders and posted it on this list. See my post (the script and
instructions/warnings) on the archives:

http://lists.ximian.com/archives/public/evolution/2003-April/028416.html

I tested that script in a very small environment. It did work for me.
You really should backup all your data before, though!

I never got a response back. But I will be glad if it may be useful for
you.


Another warning: This script will fail, if you have whitespace in your
folder names!

Simon McClenahan found my script on the archives and mentioned that.
Thanks to him. He corrected the script:

--- dedupe.sh ---
#!/bin/sh
[ -e dedupe.mbox ] && echo 'panic: dedupe.mbox exists, exiting' && exit

cat "$1" | formail -D 8192 .msgid -s >> dedupe.mbox

mv -f dedupe.mbox "$1"
--- snipp ---

Then the command to execute would be:
% find . -name 'mbox' -print0  | xargs -0 -n 1 ./dedupe.sh


Use this, if you use whitespace. Looks good -- however, I did not test
this particular script.

Anyway, be warned and again: back up your data!


And drop a note, if it was helpful... ;-)

...guenther


-- 
char *t="\10pse\0r\0dtu\0  ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4";
main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1:
(c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]