FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 09-24-2008, 03:58 AM
Bijan Soleymani
 
Default procmail rule to filter debian-user

Hey everyone,

I need a rule to filter debian-user into a seperate maildir. I know
there's the header:

X-Maling-List: <debian-user...

so I tried:
* ^X-Mailing-List: <debian-user.*
/home/bijan/Maildir/.lists.debian/

and several variations, but none of them worked.

Thank in advance,
Bijan


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 09-24-2008, 04:17 AM
Ron Johnson
 
Default procmail rule to filter debian-user

On 09/23/08 22:58, Bijan Soleymani wrote:

Hey everyone,

I need a rule to filter debian-user into a seperate maildir. I know
there's the header:

X-Maling-List: <debian-user...

so I tried:
* ^X-Mailing-List: <debian-user.*
/home/bijan/Maildir/.lists.debian/

and several variations, but none of them worked.


If you aren't wedded to procmail for some other reason, then maybe
maildrop would be more to your liking, since it has a much simpler
syntax. Here's my maildrop rule for filtering d-u mails:


if ( /^X-Mailing-List:.*<debian-user@lists.debian.org>*/ )
{
to "Maildir/.Lists.Debian.User.2008q3"
}



--
Ron Johnson, Jr.
Jefferson LA USA

"Do not bite at the bait of pleasure till you know there is no
hook beneath it." -- Thomas Jefferson


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 09-24-2008, 05:11 AM
 
Default procmail rule to filter debian-user

On Tue, 23 Sep 2008 23:58:12 -0400
Bijan Soleymani <bijan@psq.com> wrote:

> Hey everyone,
>
> I need a rule to filter debian-user into a seperate maildir. I know
> there's the header:
> X-Maling-List: <debian-user...
>
> so I tried:
> * ^X-Mailing-List: <debian-user.*
> /home/bijan/Maildir/.lists.debian/
>
> and several variations, but none of them worked.
>
> Thank in advance,
> Bijan
>
>

According to man procmailrc, if a "mailbox" name ends with a /, it is
taken as a maildir folder. Is that what you had in mind?


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 09-24-2008, 05:24 AM
Jaime Tarrant
 
Default procmail rule to filter debian-user

On Tue, 23 Sep 2008, Bijan Soleymani wrote:

> Hey everyone,
>
> I need a rule to filter debian-user into a seperate maildir. I know
> there's the header:
> X-Maling-List: <debian-user...
>
> so I tried:
> * ^X-Mailing-List: <debian-user.*
> /home/bijan/Maildir/.lists.debian/
>
> and several variations, but none of them worked.
>
> Thank in advance,
> Bijan
>

I use a rule like the following:

:0
* ^List-Id:.*debian-user
/home/bijan/Maildir/.lists.debian/

HTH
--
Jaime Tarrant


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 09-24-2008, 07:05 AM
Bob Cox
 
Default procmail rule to filter debian-user

On Tue, Sep 23, 2008 at 23:58:12 -0400, Bijan Soleymani (bijan@psq.com) wrote:

> Hey everyone,
>
> I need a rule to filter debian-user into a seperate maildir. I know
> there's the header:
> X-Maling-List: <debian-user...
>
> so I tried:
> * ^X-Mailing-List: <debian-user.*
> /home/bijan/Maildir/.lists.debian/

How about:

:0 :
* ^TO_debian-user@lists.debian.org
/home/bijan/Maildir/.lists.debian/

Something very similar works for me (but not using maildir format,
hence no trailing slash).

--
Bob Cox. Stoke Gifford, near Bristol, UK.
Registered user #445000 with the Linux Counter - http://counter.li.org/


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 09-24-2008, 09:31 AM
Steve Kemp
 
Default procmail rule to filter debian-user

On Tue Sep 23, 2008 at 23:58:12 -0400, Bijan Soleymani wrote:

> I need a rule to filter debian-user into a seperate maildir. I know
> there's the header:
> X-Maling-List: <debian-user...

You might find this general purpose solution for handling multiple
Debian lists useful:

http://www.debian-administration.org/articles/400

Steve
--


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 09-24-2008, 10:05 AM
Jamie Griffin
 
Default procmail rule to filter debian-user

> > I need a rule to filter debian-user into a seperate maildir. I know
> > there's the header:
> > X-Maling-List: <debian-user...

:0
*^List-Id:*lists.debian.org
/home/bijan/Maildir/.lists.debian/

should do it.

If you set some variables at the top of your .procmailrc you can easily avoid writing out the full path of the Maildir in each recipe; for example:

PATH=/usr/local/bin:/usr/bin:/bin:/usr/games
SHELL=/bin/bash
MAILDIR=/home/bijan/Maildir/
DEFAULT=$MAILDIR/inbox/

You may have done that already, but just in case you had not. It can help when writing the recipes.

So, with that in mind, the following should work equally as well:

:0
*^List-Id:*lists.debian.org
.lists.debian/

The lack of the second colon at the start of the recipe is important when using Maildir format - it prevents the locking feature of procmail which is generally used for mbox format. Also, as others have pointed, don't miss the trailing slash which tells procmail to create the mailbox in Maildir format.

But, as recipes go these are really basic. Procmail is complex so it's worth spending some time reading up on it.

HTH,

Jamie


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 09-24-2008, 07:51 PM
Andrei Popescu
 
Default procmail rule to filter debian-user

On Wed, 24 Sep 2008 08:05:02 +0100 Bob Cox wrote:

> How about:
>
> :0 :
> * ^TO_debian-user@lists.debian.org
> /home/bijan/Maildir/.lists.debian/
>
> Something very similar works for me (but not using maildir format,
> hence no trailing slash).

Isn't this going to miss all those posts that are Cc'd to debian-user?
(I have no idea of procmail rules, I prefer maildrop)

Regards,
Andrei
--
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)
 
Old 09-25-2008, 03:44 AM
"s. keeling"
 
Default procmail rule to filter debian-user

Ron Johnson <ron.l.johnson@cox.net>:
>
> If you aren't wedded to procmail for some other reason, then maybe
> maildrop would be more to your liking, since it has a much simpler
> syntax. Here's my maildrop rule for filtering d-u mails:
>
> if ( /^X-Mailing-List:.*<debian-user@lists.debian.org>*/ )
> {
> to "Maildir/.Lists.Debian.User.2008q3"
> }

For completeness, that's not much less complex (aka line noise) than
my procmail rule, and mine splits each debian list into its own mbox,
and handles newsfroup backscatter:

# ------------------------------------
# debian-${MATCH}
#
# The MATCH operator / matches whatever the regexp that follows
# it matches.
#
:0
* 1^0 ^X-Mailing-List:.*debian-/[a-z.-]*
* 1^0 ^Newsgroups:.*debian./[a-z.-]*
* 1^0 ^Cc: debian-user@lists.debian.org
{
LOG="debian-${MATCH} - "
:0:
00.debian
}

I've been recommending noobs try maildrop first for years. Procmail
may be a howitzer where a shiv is needed. :-)


--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://blinkynet.net/comp/uip5.html Linux Counter #80292
- - http://www.faqs.org/rfcs/rfc1855.html Please, don't Cc: me.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 09-25-2008, 03:51 AM
"s. keeling"
 
Default procmail rule to filter debian-user

Bijan Soleymani <bijan@psq.com>:
>
> I need a rule to filter debian-user into a seperate maildir. I know
> there's the header:
> X-Maling-List: <debian-user...
>
> so I tried:
> * ^X-Mailing-List: <debian-user.*
> /home/bijan/Maildir/.lists.debian/
>
> and several variations, but none of them worked.

Describe your understanding of "worked". Have you set VERBOSE=yes in
your .procmailrc? What's the log file say happened?

These may be useful:

PMDIR = $HOME/procmail
LOGFILE = $PMDIR/log
LOGABSTRACT = yes

See my other post for a working rule.


--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://blinkynet.net/comp/uip5.html Linux Counter #80292
- - http://www.faqs.org/rfcs/rfc1855.html Please, don't Cc: me.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 01:32 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org