This is very monkey, but it worked for me (it really just a rehash of
something on www.qmail.org
#!/usr/bin/perl
# usage: convertbox [mbox] [dir for maildir to placed]
#
# ie: convertbox /home/alex/mail/mbox /var/qmail/mailhome/a/al/alex/Maildir
#
# or
# convertbox /home/alex/mail/some-box
/var/qmail/mailhome/a/al/alex/Maildir/.some-box
#
require 'stat.pl';
($mbox, $maildir) = @ARGV;
$test = substr($mbox,-4);
if ( $test ne "mbox" )
{
qx "/bin/mkdir -p $maildir";
};
chdir($maildir) || die("fatal: unable to chdir to $maildir.\n");
# make sure dir exists
-d "tmp" || mkdir("tmp",0700) || die("fatal: unable to make tmp/ subdir\n");
-d "new" || mkdir("new",0700) || die("fatal: unable to make new/ subdir\n");
-d "cur" || mkdir("cur",0700) || die("fatal: unable to make cur/ subdir\n");
open(BOX, "<$mbox") || die ("fatal: unable to open $mbox");
while(<BOX>)
{
if (/^From /)
{
$fn = sprintf("new/%d.$$.mbox", $i);
open(MDIR, ">$maildir/$fn") || die("fatal: unable to
create new message");;
chown ($uid,$gid,$fn);
$i++;
};
s/^>From /From /;
print MDIR || die("fatal: unable to write to new message");
};
close(SPOOL);
close(BOX);
qx "/usr/sbin/chown -R popuser.popuser $maildir";
On Wed, 12 Jul 2000, jca wrote:
> Is there some kind of delimiter I am not able to see? I used the script that Ivan
>Kohler produced and if I download the messages, the header is part of the body of the
>message. It looks like Outlook is only able to discern the From <> Line and then it
>bails. But, however, if I open up the mailbox file, cut the lines past the message I
>am interested in and dump it into the maildir, it reads perfectly.
>
> Any ideas?
>
> J
>
> ---------- Original Message ------------------------
> From: Peter Green <[EMAIL PROTECTED]>
>
> Date: Wed, 12 Jul 2000 11:29:06 -0400
>
> also sprach john_van_v:
> >
> > Source Forge is using Majordomo and GNU/MailMan they dont have these user
> > problems.
>
> FWIW, <http://www.debian.org/security/1999/19990623> describes a predictable
> cookie problem Mailman had in the recent past whereby the admin pages were
> accessible w/o a password. (It's a Debian alert, but it's unclear from the
> Mailman page how many versions were actually affected.) I doubt this kind of
> this happens in ezmlm... :)
>
> That said, Mailman looks to be a really nice program.
>
> > Has anybody looked at converting MailMan ?? Fact is, it works pretty well...
>
> It looks, at a glance, to support qmail out-of-the-box. See README.QMAIL in
> the distro.
>
> /pg
> --
> Peter Green : Gospel Communications Network, SysAdmin : [EMAIL PROTECTED]
> ---
> Instead of trying to build newer and bigger weapons of destruction, we should
> be thinking about getting more use out of the ones we already have.
> (Jack Handey)
>
>