Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Sep 2005 09:12:03 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Brian Josefsen <josefsen@wasd.dk>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: using procmail rules to handle old maildir
Message-ID:  <20050927061203.GB895@flame.pc>
In-Reply-To: <20050927044348.GA56726@wasd.dk>
References:  <20050927044348.GA56726@wasd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2005-09-27 06:43, Brian Josefsen <josefsen@wasd.dk> wrote:
> Hello all
>
> I don't know if it's appropriate to ask this question here, but now i'll
> give it a try.
>
> I've set up postfix on a new box with maildir support, and i've been
> using procmail to deliver all my mail, so i now have the rules i've always
> missed.
>
> Then i've taken a tarball from the vhosting environment from the old
> server, so i have now a Maildir that i use, with all my new mail in it,
> and another Maildir with all the old mail.
>
> Now i would like to sort all my old mail using the procmail rules i have
> now, it could be as easy as:
> cd oldmaildir
> procmail < find . -type f -exec echo {} \;
>
> but procmail don't delete the mail from the old maildir, and since there
> is ~9k mail, i would hate to first filter all of it, and then go
> manually through all of it again.
>
> Anyone out there with any idea to solve this would be highly appreciated
> as i depend on "quick" access to old mail.
>
> FreeBSD 5.4, latest procmail, mutt zsh.

AFAIK, procmail cannot filter Maildir/ files.  You'll have to convert
the old Maildir/ to UNIX mbox format.  Then you can use formail and
procmail to filter it all through your current .procmailrc rules:

	$ formail -s procmail < oldmail.mbox

That should take care of it all :)  Then you can delete oldmail.mbox




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050927061203.GB895>