<<< Date Index >>>     <<< Thread Index >>>

Re: delete duplicate mails



* Chris <atstake@xxxxxxxxx> [08-25-07 07:00]:
> I read the previous posts and tried in my inbox - press D, use ~= as
> the search pattern, press $ to save. 

D   ~=   <enter>

problem is probably "press $ to save" s/b  press enter to complete
action.

...

> I use fetchmail(1) to get mails, procmail(1) filters them before they
> land on my inbox or in their specific mboxes. I'm using Mutt v1.5.12
> on OpenBSD4.1

To remove duplicate mails w/procmail:

# -------------------------------------------------------
# remove duplicates ## from man procmailex examples ##
# 12-13-2002
# -------------------------------------------------------
LOCKFILE = msgid.cache.lock

:0 Whc: msgid.lock
| $FORMAIL -D 16384 msgid.cache

LOCKFILE

### save duplicates in another folder in case of error
:0 a:
$MAILDIR/duplicates
# -------------------------------------------------------


since you use procmail, another handy recipe:


# -------------------------------------------------------
# maintain backup of a number of most recent emails
# -------------------------------------------------------
:0 c
$MAILDIR/backup

:0 ic
| rm dummy `ls -t msg.* | tail +[number of msgs]`
# -------------------------------------------------------
  
or substitute following for last line above to retain a number of days
of recent posts:

| `find ~/mail/backup -maxdepth 1 -type f -name 'msg.*' \
  -mtime +31 -delete`


gud luk,
-- 
Patrick Shanahan         Plainfield, Indiana, USA        HOG # US1244711
http://wahoo.no-ip.org     Photo Album:  http://wahoo.no-ip.org/gallery2
Registered Linux User #207535                    @ http://counter.li.org