Thank you. JFWIW, I found the attached snippet from some documention I
got a while ago from: ftp://cs.uta.fi/pub/ssjaaa/pm-tips.html

Incidentially, I see this documentation is actually maintained by J. Alto
but the recipes herein pertaining to duplicates seem simpler.



rfi from Rich Roth ([EMAIL PROTECTED]) wrote:
> Just a note:
> If you didn't have formail -D in your .procmailrc file
> 
> To clear the dups try:
>               ls -l mutt-l
>               formail -q- -D 8192 id-cache <mutt-l >mutt-fixed
>               mv mutt-fixed mutt-l
>                            # make sure to set the owners right
>               chown ..... mutt-l
>               chmod
> 
> Then put formail in your .procmailrc 


Regards,

Morten
15.14 Kill: duplicate messages [toc]

     [Lars Kellogg-Stedman [EMAIL PROTECTED]] Put this as a first entry in
     your .procmailrc and you won't see any duplicates as long as the 8K
     cache doesn't get full. The duplicates folder is cleaned out weekly
     via a cron job. While it may be tempting to simply sink duplicates
     to /dev/null, I have come across broken mail clients the stick the
     same value in the Message-id header of all outgoing mail.
      SUBJECT         = ${SUBJECT:-`$FORMAIL -xFrom:`}
      MID_CACHE_LEN   = 8192
      MID_CACHE_FILE  = $PMSRC/msgid.cache
      MID_CACHE_LOCK  = $PMSRC/msgid.cache$LOCKEXT

      LOCKFILE = $MID_CACHE_LOCK

      # IF  the message has a message-id header
      # AND formail -D is successful (exit status=0)
      # THEN
      #   log a message to the procmail log
      #   sink the message

      :0
      *  ^Message-Id:
      * ? $FORMAIL -D $MID_CACHE_LEN $MID_CACHE_FILE
      {
          LOG="dupecheck: discarded message, $SUBJECT $NL"

          :0              # Store duplicates, notice no lock!
          duplicate.mbox
      }

      LOCKFILE            # Release lock by killing variable

     And here is a bit simpler recipe, a slightly modified version from
     the [manual]. Procmail notices formail's success, considers the
     message delivered and does not stop processing the rcfile due to c
     flag, which let's a message to fall into safety copy inbox.
      :0 hWc: $PMSRC/pm-msgid.cache$LOCKEXT
      *  ^Message-id:
      | $FORMAIL -D 8192 $PMSRC/pm-msgid.cache

        :0 a:
        duplicate.mbox

Reply via email to