Re: [Exim] Hi. moving to maildir. looking for suggestions

Pàgina inicial
Delete this message
Reply to this message
Autor: Michael J. Tubby B.Sc \(Hons\) G8TIC
Data:  
A: exim-users, Greg Ward
Assumpte: Re: [Exim] Hi. moving to maildir. looking for suggestions
Greg,

Assuming that the machine that the mail is already on has a POP
server (even if its the same machine) then you could use 'gatmail'
which you'll find on freshmeat.

I've used it several times to convert/upgrade customer sites from
sendmail/wu-imap/pop to Exim/Maildir/Courier-IMAP and it works
fine.

Mike




----- Original Message -----
From: "Greg Ward" <gward@???>
To: <exim-users@???>
Sent: Wednesday, January 23, 2002 2:14 AM
Subject: Re: [Exim] Hi. moving to maildir. looking for suggestions


> --
> On 22 January 2002, Derrick said:
> > what would you people suggest as a way to move the files from one server
> > to another? Should I tar the /var/mail contents, then ftp, then find a
> > script to convert the format and drop them into the
> > /home/username/Maildir?
>
> Personally, I would use scp for the transfer, but that's a side issue.
> (What? You mean there are *still* people using ftp for this sort of
> thing?)
>
> Also, I can share a bit of knowledge I learned the hard way today: if
> you use one of the mbox-to-maildir Perl scripts, floating around the
> net, *you will lose*. I found two of these with Google today, and
> they're both based on five-year-old code, and they both fail silently on
> messages that look like this:
>
> Blah blah blah.
>
> Blah blah
> From blah blah blah
> blah blah.
>
> That is, both of these tools (called mbox2maildir and mb2md) treat
> "\nFrom " as the delimiter between messages, when the correct delimiter
> is "\n\nFrom ". Sigh.
>
> Luckily, I found a working solution at
> http://www.nb.net/~lbudney/linux/software/safecat/one-liners.html
>
> I'll attach my shell script; note that it requires formail (included
> with procmail) and safecat
> (http://www.nb.net/~lbudney/linux/software/safecat.html).
>
>         Greg
> --
> Greg Ward - software developer                gward@???
> MEMS Exchange                            http://www.mems-exchange.org
> --
> #!/bin/sh

>
> # Convert an mbox mail file to a maildir.
> # Requires formail and safecat.
> # Idea stolen from
> # http://www.nb.net/~lbudney/linux/software/safecat/one-liners.html
> #
> # by Greg Ward, 2002/01/22
> #
> # Usage:
> # mb2md mbox maildir
> # where mbox must exist, and maildir must not exist.
>
> if [ "$#" -ne 2 ] ; then
> echo "usage: $0 mbox maildir" >&2
> exit 1
> fi
>
> mbox=$1
> maildir=$2
>
> if [ -e "$maildir" ] ; then
> echo "$maildir already exists" >&2
> exit 1
> fi
>
> if [ ! -e "$mbox" ] ; then
> echo "$mbox does not exist" >&2
> exit 1
> fi
>
> mkdir -p $maildir/{cur,new,tmp}
> formail -I"From " -s safecat $maildir/tmp $maildir/new < $mbox
> --
>
> --
>
> ## List details at http://www.exim.org/mailman/listinfo/exim-users Exim

details at http://www.exim.org/ ##
>
>