> Does anyone know of a script / program that will delete duplicates from
> an mbox ?

I use the following rule in my procmailrc, which does it as mails are
delivered. You could redeliver the mbox, or you could mutate this and create
an independent script (run with formail -s, most likely). I've included the
comments:

# DUPLICATE REMOVAL
# This rule uses formail to remove emails that have a message-id that has
# already passed through the system. It keeps an 8K log.  "W" waits until it
# gets the exit code from formail and filters if appropriate. the 'h' means
# pipe the headers only. it uses a user-defined lockfile for this task.
:0 Wh: msgid.lock
| $FORMAIL -D 8192 $HOME/.msgid.cache

- Jeff


-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to