[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: OT: Multiple Lists - Filtering multiple mails

From: Loïc Minier <lool+tigris_at_via.ecp.fr>
Date: 2005-07-05 18:16:52 CEST

        Hi,

On Tue, Jul 05, 2005, Christopher Ness wrote:
> I would like to parse out the duplicates with a procmail recipe. Does
> anyone have one out there that checks the FROM: TO: && CC: headers for
> the three possible email's (personal, users@, dev@) and drops in that
> order from left to right.
>
> If mail went to all 3, I'd only get the one from dev@
> If mail went to personal and users@ receive message from the users@ list
> discard the personal message.

 The "preference" you describe is non-trivial to implement, but
 filtering out dupes is, as explained in procmailex(5):

 <<
 If you are subscribed to several mailinglists and people cross-post to
 some of them, you usually receive several duplicate mails (one from
 every list). The following simple recipe eliminates duplicate mails.
 It tells formail to keep an 8KB cache file in which it will store the
 Message-IDs of the most recent mails you received. Since Message-IDs
 are guaranteed to be unique for every new mail, they are ideally suited
 to weed out duplicate mails. Simply put the following recipe at the
 top of your rcfile, and no duplicate mail will get past it.

        :0 Wh: msgid.lock
        | formail -D 8192 msgid.cache
>>

 For the preference part, it's tricky since you can receive the emails
 in a random order.

 You're probably using something like this:
 if list-post header matches subversion users
    put in subversion users mailbox

 if list-post header matches subversion developers
    put in subversion developers mailbox

 I think you might be able to use something like this:
 if a recipient is subversion users
     if a recipient is subversion developers
         if the message has already been seen
             discard it
         else
             put in developers mailbox
     else
         put in developers mailbox

 Not sure this scales well.

   Bye,

-- 
Loïc Minier <lool@dooz.org>
"Neutral President: I have no strong feelings one way or the other."
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Jul 5 19:04:58 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.