Mel_Flynn
March 20th, 2009, 00:45
I'm migrating our personal mail from postfix+qpopper in mbox and local system users, to postfix+dovecot+virtual users. While doing that, I also wanted reorganize some mailing list subscriptions. Yet, all "mbox2md" kinda scripts are based on local to local conversion.
So I wrote a little C program that can present an mbox file (meant to be the ones in /var/mail) to dovecot's deliver program. Prerequisite: you already must have dovecot's deliver setup correctly and it's outside the scope of this howto.
NOTE: addresses extensions are delivered with -m, meaning:
foo+bar@example.com will file into the bar folder for the foo@example.com user.
Steps:
Extract the source tarball
cd mbox2dovecot
make obj; make depend; make
As root, make install
Move the target mbox file to /tmp or rename it to something no mail would be delivered to.
If moving to a different machine, chown it to your ssh user and scp
On the target machine, run mbox2dovecot as per manpage
You may want to start with a small test mailbox and test account, to make sure deliver is configured correctly.
So I wrote a little C program that can present an mbox file (meant to be the ones in /var/mail) to dovecot's deliver program. Prerequisite: you already must have dovecot's deliver setup correctly and it's outside the scope of this howto.
NOTE: addresses extensions are delivered with -m, meaning:
foo+bar@example.com will file into the bar folder for the foo@example.com user.
Steps:
Extract the source tarball
cd mbox2dovecot
make obj; make depend; make
As root, make install
Move the target mbox file to /tmp or rename it to something no mail would be delivered to.
If moving to a different machine, chown it to your ssh user and scp
On the target machine, run mbox2dovecot as per manpage
You may want to start with a small test mailbox and test account, to make sure deliver is configured correctly.