X-Junk-Score: 0 [] X-Cloudmark-Score: 0 [] Return-Path: Received: from mail.virtuelle.no ([91.189.123.91] verified) by mail.stalker.com (CommuniGate Pro SMTP 5.2.7) with ESMTP id 47510535 for CGatePro@mail.stalker.com; Thu, 04 Sep 2008 17:13:18 -0700 Received-SPF: pass receiver=mail.stalker.com; client-ip=91.189.123.91; envelope-from=nicolas.hatier@niversoft.com X-CGP-ClamAV-Result: CLEAN X-VirusScanner: Niversoft's CGPClamav Helper v1.72 (ClamAV engine v0.91.2) Received: from dummy.name; Fri, 05 Sep 2008 02:11:22 +0200 X-CGP-ClamAV-Result: CLEAN X-VirusScanner: Niversoft's CGPClamav Helper v1.8.0 (ClamAV engine v0.94) X-ExtFilter: Niversoft's DomainKeys Helper DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; d=niversoft.com; s=default; h=Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: References:In-Reply-To:Content-Type; b=rKFMA6MpKEEgcW5LTU+XoDxCOSOVQfjaK8nvjN9/g81K1EhdGLX5caNX7P+vc/bgrT oRjL90mj1EinnbUXcNKKs2mus9rpRrVukCIOcUgalWazmtMCsDv8EGEcJOM3WWeLJm7L XS/tLtm/3NT/lVgl+HiffqejvJVCAHdKcAF7Q= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niversoft.com; s=default; l=11752; t=1220573479; x=1221178279; q=dns/txt; h=Message-ID:Date:From:User-Agent:MIME-Version:To: Subject:References:In-Reply-To:Content-Type; bh=SjpKspm5ykCqXeEM ZWZb25tBqoJJh7vJNipG3gZv5hU=; b=vaJjhMb30poVlcHa8RobKDWEF0eiPams rWDBANCDJfNX/DvduBj6poW3ZgIeWkQ7rphgetvdH56hQuSo9we7VLavJ9CSjDLk aLO3HlTXthwDGh0/mn+qS1PDq7eWJ1J7UfiG8FfwrSloCVx3JMC0iKsCnZzmmJSJ aC+ZxCXN+1A= Received: from dummy.name; Thu, 04 Sep 2008 20:11:19 -0400 Message-ID: <48C07927.5060608@niversoft.com> Date: Thu, 04 Sep 2008 20:11:19 -0400 From: Nicolas Hatier User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080708 Thunderbird/2.0.0.16 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: CommuniGate Pro Discussions Subject: Re: Moving from one server OS to another References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------030405070709080502090303" This is a multi-part message in MIME format. --------------030405070709080502090303 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Note using FTP will force you to transfer every single file individually = - a LOT of FTP commands will have to be issued, increasing a lot the=20 transfer time especially if you use the mdir format. Transferring a=20 tar(.gz) file is much more efficient. The following perl script, providing it is ran on the Windows platform,=20 will convert all mail files in-place from unix EOL to windows EOLs. Save the script as unix2dos.pl, run unix2dos.pl and all=20 files will be converted recursively. $| =3D 1; $directory =3D shift @ARGV; $directory =3D '.' unless $directory; conv($directory); sub conv { my $dir =3D shift; opendir DIRHANDLE, $dir; foreach my $file (readdir DIRHANDLE) { next if ($file =3D~ /^\./); next if ($file =3D~ /\.settings$/); #skipping settings, info, dst, = CGP can handle them. next if ($file =3D~ /\.info$/); #only mail files must be=20 converted, others are optional. next if ($file =3D~ /\.dst$/); $file =3D "$dir/$file"; if (-d $file) { conv($file); } else { print "Convert: $file"; open(INPUT, "<$file"); my @lines =3D ; close INPUT; open(OUTPUT, ">$file"); print OUTPUT $_ foreach(@lines); close OUTPUT; } } closedir DIRHANDLE; } Regards, Nicolas Hatier David Brookfield wrote: > Ahh coolio, then looks like I'll try FTP then :-) > > Wayne Gamble wrote: >> I've moved my CGatePro server from RH Linux to SuSE, and then from=20 >> SuSE Linux to OS X by just copying the files. However, Windows=20 >> doesn't handle files like everyone else. Windows uses a line feed=20 >> and carriage return, but Unix/OS X, etc. just uses a line feed. >> >> The only way I've ever moved files (not cgate) from Unix -> Windows=20 >> or Windows -> Unix is by using FTP, but I understand there=20 >> are utilities available that will also do the conversion for you. >> >> - Wayne >> >> >> >> >> On Sep 4, 2008, at 2:52 PM, Dave Pooser wrote: >> >>>> I'm led to believe that it's just a case of dropping the files over = >>>> from >>>> the server you are moving from, anyone know if this really is the ca= se? >>> >>> It's the case when moving from UNIX -> UNIX or Windows -> Windows; th= e >>> problem in your case is migrating the line endings to fit the new ser= ver >>> platform. I've seen people suggest that if you use FTP to transfer th= e >>> CommuniGate directory that will fix any line ending problems, but I=20 >>> don't >>> have any personal experience with that. >>> >> --=20 *Nicolas Hatier* /Niversoft id=E9es logicielles/ /http://www.niversoft.com/ --------------030405070709080502090303 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Note using FTP will force you to transfer every single file individually - a LOT of FTP commands will have to be issued, increasing a lot the transfer time especially if you use the mdir format. Transferring a tar(.gz) file is much more efficient.

The following perl script, providing it is ran on the Windows platform, will convert all mail files in-place from unix EOL to windows EOLs.
Save the script as unix2dos.pl, run unix2dos.pl <directory> and all files will be converted recursively.


$| = 1;
$directory = shift @ARGV;
$directory = '.' unless $directory;
conv($directory);
sub conv
{
   my $dir = shift;
   opendir DIRHANDLE, $dir;
   foreach my $file (readdir DIRHANDLE)
   {
      next if ($file =~ /^\./);
      next if ($file =~ /\.settings$/); #skipping settings, info, dst, CGP can handle them.
      next if ($file =~ /\.info$/);     #only mail files must be converted, others are optional.
      next if ($file =~ /\.dst$/);
      $file = "$dir/$file";
      if (-d $file)
      {
         conv($file);
      }
      else
      {
         print "Convert: $file";
         open(INPUT, "<$file");
         my @lines = <INPUT>;
         close INPUT;
         open(OUTPUT, ">$file");
         print OUTPUT $_ foreach(@lines);
         close OUTPUT;
      }
   }
   closedir DIRHANDLE;
}


Regards,
Nicolas Hatier

David Brookfield wrote:
Ahh coolio, then looks like I'll try FTP then :-)

Wayne Gamble wrote:
I've moved my CGatePro server from RH Linux to SuSE, and then from SuSE Linux to OS X by just copying the files.  However, Windows doesn't handle files like everyone else.   Windows uses a line feed and carriage return, but Unix/OS X, etc. just uses a line feed.

The only way I've ever moved files (not cgate) from Unix -> Windows or Windows -> Unix is by using FTP, but I understand there are utilities available that will also do the conversion for you.

 - Wayne




On Sep 4, 2008, at 2:52 PM, Dave Pooser wrote:

I'm led to believe that it's just a case of dropping the files over from
the server you are moving from, anyone know if this really is the case?

It's the case when moving from UNIX -> UNIX or Windows -> Windows; the
problem in your case is migrating the line endings to fit the new server
platform. I've seen people suggest that if you use FTP to transfer the
CommuniGate directory that will fix any line ending problems, but I don't
have any personal experience with that.



--

Nicolas Hatier
Niversoft idées logicielles
http://www.niversoft.com


--------------030405070709080502090303--