Procmail filtering an mbox file into Maildir

Hi, I'm trying to get the last of my 'old' mail filtered into an existing Maildir setup. It currently exists in two formats: 24 mbox files, 2004/january-december, 2005/january-december equivalent Maildir folders for the above. What I'd like to do is write a simple procmail file and gradually filter it all into existing maildir format, for example: :0 * ^List-Id:.*<luv-main.luv.asn.au> $HOME/Maildir/.mailing-lists.luv/ Run procmail over all of the mbox or maildir folders, whatever is easiest, putting all the matching messages into .mailing-lists.luv, and leaving the rest, for me to investigate and add another filter for some more mail, re-running until I just have a handful left that I can move manually to the right places. However, I can't seem to get procmail to work, for memory or google. It seems to just continually process the first email in the mbox files, a 'dummy' message added by pine. Any suggestions or hints? cheers, / Brett

On Wed, Dec 21, 2011 at 12:07:34PM +1100, Brett Pemberton wrote:
However, I can't seem to get procmail to work, for memory or google. It seems to just continually process the first email in the mbox files, a 'dummy' message added by pine.
Any suggestions or hints?
use formail (included with procmail) to iterate over the messages in an mbox file. craig -- craig sanders <cas@taz.net.au> BOFH excuse #27: radiosity depletion

On 21/12/2011, at 12:07, Brett Pemberton <brett.pemberton@gmail.com> wrote:
However, I can't seem to get procmail to work, for memory or google. It seems to just continually process the first email in the mbox files, a 'dummy' message added by pine.
Any suggestions or hints?
"formail" in the procmail package can split an mbox and feed each message individually to procmail. I don't recall the syntax for doing this, though.

On 21 December 2011 12:07, Brett Pemberton <brett.pemberton@gmail.com> wrote:
However, I can't seem to get procmail to work, for memory or google. It seems to just continually process the first email in the mbox files, a 'dummy' message added by pine.
Any suggestions or hints?
From memory, procmail only processes one message at a time.
Hint; formail -s procmail experiments.rc < test.mbox Ref; http://partmaps.org/era/procmail/mini-faq.html#split -- Joel Shea <jwshea@gmail.com>

On Wed, Dec 21, 2011 at 12:07 PM, Brett Pemberton <brett.pemberton@gmail.com
wrote:
Hi,
I'm trying to get the last of my 'old' mail filtered into an existing Maildir setup. It currently exists in two formats:
[snip] However, I can't seem to get procmail to work, for memory or google. It seems to just continually process the first email in the mbox files, a 'dummy' message added by pine.
Any suggestions or hints?
What's your procmail commandline? IIRC, procmail can't use mbox as input file, it expected one email at a time. Maybe you should look here http://www.uq.edu.au/~suter/software/reprocess-mbox-via-procmail/reprocess-m... for more idea. Cheers, -- simple is good http://brucewang.net http://twitter.com/number5
participants (5)
-
Brett Pemberton
-
Bruce Wang
-
Craig Sanders
-
hannah commodore
-
Joel W Shea