From: Michiel D. <mi...@ti...> - 2005-08-12 19:39:15
|
Ah, but that still doesn't handle my intent. I want to erase duplicate *Mantis* messages, not duplicate messages. When an issue is created in Mantis, I (as administrator) receive an email. Then I receive one when it is assigned and I receive one for every single note that is added to the issue. I receive one when it's re-assigned to someone else, and so on and so on. I end up with at least 4 messages from Mantis in my inbox about the same issue. I go and work my way through my inbox and click delete for every one but the last for every issue. That is very tedious and something I can automate. That's what the script does. Michiel David A. Desrosiers wrote: >>You have procmail to expunge duplicate emails? I've only used it for >>processing incoming messages into folders. I've be interested in >>your rules to remove duplicates. >> >> > > I misunderstood your intent. > > No, I use a little Perl I wrote for that: > >undef $/; >my @para = split /(\n\n+)/, <>; > >while (defined ($_ = shift @para)) >{ > die "No From line!\n" unless /^From /; > my ($id) = map /^Message-ID:\s(\S.*)/im, split /\n(?! )/; > warn "No Message-ID! [[$_]]\n" unless defined $id; > $_ .= shift @para while @para and $para[0] !~ /^From /; > print unless defined $id and $seen{$id}++; >} > > >David A. Desrosiers >de...@gn... >http://gnu-designs.com > > >------------------------------------------------------- >SF.Net email is Sponsored by the Better Software Conference & EXPO >September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices >Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA >Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf >_______________________________________________ >Mantisbt-dev mailing list >Man...@li... >https://lists.sourceforge.net/lists/listinfo/mantisbt-dev > > -- least likely to say "it can't be done" most likely to say "if it's not in mantis, it won't be done" t | i | n | c | a | n || l | t | d Buenos Aires | London | Machynlleth t | i | n | c | a | n || l | t | d |