procmail
[Top] [All Lists]

Re: Duplicates sent from lists

2004-02-17 11:57:23
At 09:47 2004-02-17 -0700, LuKreme wrote:

the recipes in it are completely transparent. I should cache the list-post/reply addresses of the lists somewhere and then grep on ^TO_ ?

I had considered suggesting that, but it seems like a lot of work. Plus, there's that nasty gotcha: you uns*bscribe from a list, and receive a message from someone who cc:'s you on that list. What happens? The cache (unless periodically flushed) identifies the listaddr, and the offlist copy gets trashed.

Of course, the same thing would happen with someone using a hardcoded recipe for the list who doesn't remove the recipe when they uns*bscribe.

Once LISTNAME is generated I do have a INCLUDERC on my list subscription address (this one) to do things like add Reply-To: LIST headers to lists that don't have them, or mark messages to a list I archive as already read (unless my domain appears in the References)

Or In-Reply-To:. This is a good technique - Dallman could probably utilize it for replicating "offlistable" copies. There's still the matter of braindead mailers that don't provide such tracking info, or where the user composes a new message rather than a Reply.

, but this is OK because I am willing to take special action for those very few lists since they are lists I read the most (this one, for example). In short, I don't mind having specific recipes for specific lists, but trying to write a generic recipe that affects all my lists and yet has to refer to each list specifically... well, that seems wrong.

List-Post:, where present, could be used to discern the list address associated with a given list. The $LISTNAME variable could itself probably be used in a MATCH construct to isolate the list address in 98% or more of the cases (its those remaining 2% that pose a problem), allowing you to construct a flat greppable LISTNAME:listaddress file for a cache of sorts.

If you identify a list message, then determine you don't have an address for that list in the cache file, you'd do the additional operations to grab that address from the message (assuming it appears), then tack that LISTNAME and the list address onto the end of your cache file (using the lockfile utility which is included with the procmail distribution). A little bit of shell scripting, and you could churn out a conversion to a procmail includeable expression, which means you eliminate grepping or any external processes excepting when you actually discern a list that needs adding to the file.

I recall one or more people have considered using a script-built rcfile for greenlists or blacklists (to avoid the grep overhead).

I think the only solution I see without a COMMON_LISTS_OF_MINE sort of solution is something like this:

[ LISTNAME stuff up here ]

:0
* LISTNAME ?? ^^^^
* -1
* 1^1 ^TO@
{
  :0 fw
  | formail -I"Status: RO"

  :0:
  dupemail
}

Hmm, this looks like it'd catch everything addressed to two or more addresses, such as personal correspondance between small groups of people (or heck, even where the sender copies themselves). It'd work passably well if you're using a list-specific address (which would need to have been conditioned prior to this individual recipe, since there's no condition listed here for a given address).

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>