Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Paul Johnson <baloo@ursine.ca>
Subject: Re: Mailing list split
Date: Fri, 04 Jun 2004 23:47:14 -0700	[thread overview]
Message-ID: <87vfi6ijrh.fsf@ursine.ca> (raw)
In-Reply-To: <874qpqet2m.fsf@mega.ist.utl.pt>

[-- Attachment #1: Type: text/plain, Size: 2135 bytes --]

pocm@mega.ist.utl.pt (Paulo Jorge O. C. Matos) writes:

> I'm subscribed to dozens of mailing lists and I have an email
> account through which I receive all my mailing list mails. Is
> there a way to split the mail from that account automatically
> based on the mailing list headers?

I solved this one with procmail myself (I grok procmail more than I do
lisp[1]).

A portion of ~/.procmailrc follows...
*start*
############################## 
#
# Dynamic Mail filters The following set of rules use the matching
# ability of procmail to dynamically filter mail based on parsing one
# of the possible mailing list headers.  This means you can subscribe
# to new mailing lists without having to add lines to your procmail
# filters.  Very Good Thing (tm).  When I first found this list, I
# think there were 4 entries.  I add a new entry every time some new
# mailing list ends up in my inbox (i.e. it is not covered by the
# current ruleset.)  Comments appear where I can remember them.

#  Used by the perl6-all list to break out into seperate mailboxes
:0:
* ^X-Mailing-List-Name: \/[^@]+
`echo $MATCH | sed -e 's/[\/]/_/g'`

#  Majordomo uses Sender header to tell when it is coming from
:0:
* ^Sender: owner-\/[^@]+
`echo $MATCH | sed -e 's/[\/]/_/g'`

:0:
* ^Delivered-To: mailing list \/[^@]+
`echo $MATCH | sed -e 's/[\/]/_/g'`

:0:
* ^X-Mailing-List: <\/[^@]+
`echo $MATCH | sed -e 's/[\/]/_/g'`

:0:
* ^X-Loop: \/[^@]+
`echo $MATCH | sed -e 's/[\/]/_/g'`

:0:
* ^X-List-ID: <\/[^@\.]+
`echo $MATCH | sed -e 's/[\/]/_/g'`

:0:
* ^X-list: \/[^@\.]+
`echo $MATCH | sed -e 's/[\/]/_/g'`

:0:
* ^X-BeenThere: \/[^@]+
`echo $MATCH | sed -e 's/[\/]/_/g'`

*end*

Hope this helps...




[1] If I futz around with lisp for too long, I start getting the same
sort of frustrated, pissed off mood I get when some idiot beeps my
headset two minutes before the system stop taking any more incoming
calls, meaning I'm going to be the last out of the office just because
the putz couldn't sleep on it a few hours for the early-bird shift to come
in...

-- 
Paul Johnson
<baloo@ursine.ca>
Linux.  You can find a worse OS, but it costs more.

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

       reply	other threads:[~2004-06-05  6:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <874qpqet2m.fsf@mega.ist.utl.pt>
2004-06-05  6:47 ` Paul Johnson [this message]
     [not found]   ` <8765a4h70c.fsf@lizard.king>
2004-06-06 21:55     ` Xavier Maillard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vfi6ijrh.fsf@ursine.ca \
    --to=baloo@ursine.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).