[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Filtering mail w/ procmail

On Mon, May 07, 2001 at 08:16:15PM +0600, V.Suresh wrote:
> Instead of the XMailingList Header,You may try the From:, To:, Cc: headers
> which will never fail,as I have found. My .procmailrc is managing three
> mailing lists without any probs. Look at the headers of the mails you
> get fromthe lists, see which header is the most common factor(Should be
> To, Cc) and put it in your .procmailrc. 
> Once upon a time, Cameron Matheson <cmatheson3@yahoo.com> found a keyboard. And typed:
> >Hey,
> >
> >I have a little problem.  I'm subscribed to three mailing lists (debian-user,
> >agenda-user, and sdl), and the mail is a little overwhelming.  Back in the day,
> >i used Mozilla to filter the mail into different folders, but now I use mutt.
> >It looks like the best way to filter would be to use procmail, so I set up my
> >.procmailrc like so:
> >
> ><procmailrc>
> >#debian-user mailing list
> >:0:
> >* ^X-Mailing-List: <debian-user@lists.debian.org>
> >Mail/debian-user
> >
> >#agenda-user mailing list
> >:0:
> >* ^X-Mailing-List: <agenda-user@lists.agendacomputing.com>
> >Mail/agenda-user
> >
> >#sdl programming list
> >:0:
> >* ^X-Mailing-List: <sdl@lokigames.com>
> >Mail/sdl
> ></procmailrc>
> >
> >Unfortunately, only the debian list is filtered.  I'm assuming this is because
> >my syntax is wrong, but the man page and examples didn't help me find my
> >problem.  Anyone know what's going on?

right. not all mailing lists subscribe to the same ideas.

check example message headers from each list, use the patterns
you discover there, to filter out items belonging to that list...

here are some samples from my own bloated ~/.procmailrc :


	# postgresql lists
	* ^Sender: pgsql-.+-owner@.*postgresql.org
	* ^Sender: pgsql-\/[^-]+
	{ DN=`echo $MATCH | tr '[A-Z]' '[a-z]'` }

	# modperl list
	* ^Mailing-List: .*modperl.*apache.org

	# sourceforge groups
	* ^X-BeenThere: .+@lists.sourceforge.net
	* ^X-BeenThere: \/[^@]+
	{ DN=`echo $MATCH | tr '[A-Z]' '[a-z]'` }

	* ^X-Loop: debian-.+@lists.debian.org
	* ^X-Loop: debian-\/[^@]+
	{ DN=`echo $MATCH | tr '[A-Z]' '[a-z]'` }

	* ^(X-Sender|Sender|From):.*@.*(internic|networksolutions)


DEBIAN NEWBIE TIP #21 from Will Trillich <will@serensoft.com> 
Looking to configure your Debian NETWORK SETTINGS? Look at the
file /etc/network/interfaces (try "man interfaces" for more
info). Then "ifup -a" to reload your settings, and "ifconfig" to
display them. (Also check out "apt-get install ipmasq"!)

Also see http://newbieDoc.sourceForge.net/ ...

Reply to: