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 07-05-2012, 07:59 AM
lee
 
Default procmail filtering

Hi.

probably not the best list to ask, but i've been trying and searching
for awhile now, with not much success. I'm looking for a way to run
my procmail filters on a directory containing emails I would like to
filter. I'm using a Maildir email directory setup.

I've looked at formail + procmail , but formail forces it into mailbox
format which I dont want.


anyone know any tutorial/howto out there? the procmail home page is no
help, and most of tutorials are for mailbox format.


Regards
Lee


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4FF54951.4050407@tlabs.ac.za">http://lists.debian.org/4FF54951.4050407@tlabs.ac.za
 
Old 07-05-2012, 09:14 AM
Jochen Spieker
 
Default procmail filtering

lee:
>
> I've looked at formail + procmail , but formail forces it into mailbox
> format which I dont want.

Formail doesn't actually save the mailboxes anywhere, procmail does
that. And if you append a slash to the mailbox name, procmail generates
maildirs. Example:

MAILDIR=$HOME/Maildir/
LOGFILE=$HOME/.procmail.log
DEFAULT=$MAILDIR

:0:
* ^X-Mailing-List: <debian-.+@lists.debian.org>
* ^X-Mailing-List: <debian-/[-a-zA-Z0-9]+
.lists.debian.$MATCH/

J.
--
My medicine shelf is my altar.
[Agree] [Disagree]
<http://www.slowlydownward.com/NODATA/data_enter2.html>
 
Old 07-05-2012, 12:41 PM
Jon Dowland
 
Default procmail filtering

You can run procmail in "filter mode" and pipe it each mail that you wish to
filter individually, but you must keep track of which mails have been piped to
procmail and remove them/mark them 'processed' yourself, via shell scripts etc.

Make sure your procmail recipe(s) deliver to a sensible location.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120705124158.GC32553@debian
 
Old 07-05-2012, 07:59 PM
Bob Proulx
 
Default procmail filtering

lee wrote:
> I've looked at formail + procmail , but formail forces it into mailbox
> format which I dont want.

With Maildir format you don't need formail. Just pipe each individual
message to procmail.

Of the top of my head and untested:

for m in Maildir/new/* Maildir/cur/*; do
procmail myprocmailrcfile < $m
done

Best to test it with one message first to make sure it all works
before trying to run on a large mailbox.

Bob
 
Old 07-06-2012, 08:19 AM
lee
 
Default procmail filtering

On 07/05/2012 02:41 PM, Jon Dowland wrote:
> You can run procmail in "filter mode" and pipe it each mail that you wish to
> filter individually, but you must keep track of which mails have been piped to
> procmail and remove them/mark them 'processed' yourself, via shell scripts etc.
>
> Make sure your procmail recipe(s) deliver to a sensible location.
>
>
Hi

thanks for the response.

L


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4FF69F76.3080209@tlabs.ac.za">http://lists.debian.org/4FF69F76.3080209@tlabs.ac.za
 
Old 07-06-2012, 08:20 AM
lee
 
Default procmail filtering

On 07/05/2012 09:59 PM, Bob Proulx wrote:
> lee wrote:
>> I've looked at formail + procmail , but formail forces it into mailbox
>> format which I dont want.
> With Maildir format you don't need formail. Just pipe each individual
> message to procmail.
>
> Of the top of my head and untested:
>
> for m in Maildir/new/* Maildir/cur/*; do
> procmail myprocmailrcfile < $m
> done
>
> Best to test it with one message first to make sure it all works
> before trying to run on a large mailbox.
>
> Bob
Hi

I did something similar but ended up creating alot of 'copies' which I
didn't want. but thanks. now I at least know
I was on the right track.

Regards
Lee


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4FF69FBA.5090704@tlabs.ac.za">http://lists.debian.org/4FF69FBA.5090704@tlabs.ac.za
 
Old 07-11-2012, 03:30 AM
Chris Bannister
 
Default procmail filtering

On Thu, Jul 05, 2012 at 11:14:57AM +0200, Jochen Spieker wrote:
> lee:
> >
> > I've looked at formail + procmail , but formail forces it into mailbox
> > format which I dont want.
>
> Formail doesn't actually save the mailboxes anywhere, procmail does
> that. And if you append a slash to the mailbox name, procmail generates
> maildirs. Example:
>
> MAILDIR=$HOME/Maildir/
> LOGFILE=$HOME/.procmail.log
> DEFAULT=$MAILDIR
>
> :0:
^
In that case you don't need the colon. That colon is for locking and
maildir doesn't require locking.
e.g.

:0
* ^X-Mailing-List: <debian-.+@lists.debian.org>
* ^X-Mailing-List: <debian-/[-a-zA-Z0-9]+
.lists.debian.$MATCH/



--
"If you're not careful, the newspapers will have you hating the people
who are being oppressed, and loving the people who are doing the
oppressing." --- Malcolm X


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120711033037.GU3873@tal
 

Thread Tools




All times are GMT. The time now is 03:08 PM.

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