procmail
[Top] [All Lists]

RE: handling cross-posters

2001-11-29 23:43:52


Shawn wrote:
At 10:53 2001-11-29 -0800, Dave Robbins did say:
I ditch carbon copies using a method whereby I first filter the message
_coming_from_ the mailing list (delivering it to it's mailbox), then
immediatley after that, I say "if this message addressed such-and-such
list, toss it".

You could use similar logic.  Let's say procmail is the list you want
unique messages to, I'd prune my ruleset down to something like:

:0:
* ^Sender: procmail-admin(_at_)lists\(_dot_)rwth-aachen\(_dot_)de
$DEFAULT

# Then ditch copies (cleartexed crossposts and cc's to me).
:0
* 
^TOprocmail(-users(_at_)procmail\(_dot_)org|@(lists|informatik)\.rwth-aachen\.de)
/dev/null

This is fine.  Another idea to try, that may be more general, and require no
per-list fiddling, is to use the duplicate id cache.

Add this rule at the beginning of the .procmailrc file:

#
# Discard incoming duplicates, but only if addressed to a mail list
#
:0:
* ^(List-Id|Mailing-List|X-Mailing-List|Sender|Resent-Sender):
* ?formail -D 10000 $HOME/.dup_id_cache
dup-mail

The "^(List-Id|Mailing-List|X-Mailing-List|Sender|Resent-Sender):" pattern
is a heuristic to pick off mailing list oriented mail.  This, I think, would
for example, let a direct reply to you go through to your inbox, and ensure
that the mail sent via the list manager is filed under the list's box.

If you use this approach, the mbox where one and only one copy of the list's
mail is filed is unpredictable, because it will be based upon first arrival.
If you want to enforce an ordering based upon the order of a filter rule as
given in the .procmailrc, then add this dup-id line to each filter rule,
*after* the rule that filters for the particular list. For example,

#
# Procmail mailing list
#
:0:
* ^Sender:.*procmail-admin
* ?formail -D 10000 $HOME/.dup_id_cache
procmail-mail



_______________________________________________
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>