Re: Mbox2MailDir [was]Re: moving from stock IMAP server to Cyrus IMAP.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2004-12-28 at 18:27, Alexander Dalloz wrote:
> Am Di, den 28.12.2004 schrieb Ow Mun Heng um 3:36:
> 
> > > > Then how do you suggest moving the mbox mails to maildir?
> > > > Currently am Using a formail script I found which delivers it to cyrus's
> > > > deliver program.
> > > > 
> > > > It works but it ain't "nice"
> > > 
> > > A "formail | deliver" pipe instruction is proper. Why isn't that "nice"?
> > Because I feel that it's Clunky? It's OK for migrating my 3 users with <
> > 5 mails/mbox but what about for larger sites? Will it work? Will it
> > overwhelm cyrus? Perhaps I can throttle it using sleep?
> 
> I must confess that I don't understand that in any way. Aren't we
> speaking about a one time migration of existing mbox based mails from an
> old system over to Cyrus-IMAPd Maildir storage on the new system?

Yes.

> And to use "formail" to read
> in the mboxes is nothing "clunky". What do you think the tool is for?
> What do you mean with the idea "to throttle using sleep"? 
This is the script I use.

USER=$1
MAILBOX=$2
CYRUSFOLDER=$3
CYRDELIVER=/usr/lib/cyrus-imapd/deliver
FORMAIL=/usr/bin/formail

if ! [ -x "$FORMAIL" ]; then
    echo ""
    echo "formail (from procmail) is required to run this script"
    echo ""
    exit 1
fi

if [ "$USER" = "" ]; then
    echo ""
    echo "syntax: $0 user [mbox] [cyrus folder]"
    echo ""
    echo "If no mbox is specified, the user and mbox name are taken to
be the same"
    echo "If no cyrus folder is specified, the INBOX is used"
    echo ""
    exit 2
fi

if [ "$MAILBOX" == "" ]; then
    MAILBOX=$USER
fi

if [ "$CYRUSFOLDER" == "" ]; then
    echo "Adding mailbox '$MAILBOX' to Cyrus INBOX of user '$USER'..."
    $FORMAIL -I "From " < $MAILBOX -s $CYRDELIVER $USER
else
    echo "Adding mailbox '$MAILBOX' to Cyrus folder '$CYRUSFOLDER' of
user '$USER'..."
    $FORMAIL -I "From " < $MAILBOX -s $CYRDELIVER -m $CYRUSFOLDER $USER
fi


> I am reallyconfused.
Sorry.
> 
> > > Or what about using the solution described on
> > > 
> > > http://www.oreilly.com/catalog/mimap/chapter/ch09.html#92594
> > > 
> > > (user2cyrus requires the NetxAP Perl module, which is freely available
> > > from CPAN.).
> > 
> > I did try that and I couldn't locate a RPM for the NetxAP module. (Note:
> > I said RPM as opposed to using CPAN to install it) and thus it didn't
> > work for me.
> 
> I am using cpan2rpm to instantly build RPMs from CPAN Perl modules.
> cpanflute is another tool for this.
Interesting. I just looked at the site and it looks _real_ cool
actually. Saves the hassle. And it even can build right from the
web-site!!

(unfortunately, the module I wanted, there was a MD5 sum error)

I just installed CPAN2RPM and tried to get it to make a RPM out of NetxAP. 
Guess what, I don't have a compiler in my FC3 Box. DUH!!

(if anyone has this as a RPM, can I trouble you to send it to me?? 
Offlist of course)

> 
> > SInce we're talking about CPAN, once it's installed via CPAN, how does
> > one remove it? 1 benefit of a packaging system is you can see what's
> > installed and remove it when it's not wanted. How does this go for CPAN
> > stuffs?
> 
> Perl modules installed using CPAN aren't registered. You could locate
> and manually delete the files an additional Perl module is coming with.

Yeah.. That's what I don't like. Not knowing whether this file is safe
to delete or otherwise
> 
> > Ow Mun Heng
> 
> Alexander

-- 
Ow Mun Heng
Gentoo/Linux on DELL D600 1.4Ghz 
98% Microsoft(tm) Free!! 
Neuromancer 19:25:38 up 1:35, 3 users, 
load average: 1.00, 0.92, 0.85 


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux