Rainloop Windows 10 Apache Email Server

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Rainloop Windows 10 Apache Email Server

Postby Tardigrade » 25. August 2020 02:45

Hi,

I am a noob, but would like to learn how to install Rainloop Web Mail on a Windows 10 Apache Email Server. ( I don't want to run a separate linux PC just for email )

Please let me know if this is even possible - or too silly to try

Rainloop system requirements are : https://www.rainloop.net/docs/system-requirements/

Web server: Apache, NGINX, lighttpd or other with PHP support
PHP: 5.4 and above
PHP extensions: cURL, iconv, json, libxml, dom, openssl, DateTime, PCRE, SPL
Browser: Google Chrome, Firefox, Opera 10+, Safari 3+, Internet Explorer 11 or EDGE
Optional: PDO (MySQL/PostgreSQL/SQLite) PHP extension (for contacts)


Thank You !! :D
Tardigrade
 
Posts: 3
Joined: 25. August 2020 02:37
XAMPP version: 7.2.33
Operating System: Windows 10

Re: Rainloop Windows 10 Apache Email Server

Postby Altrea » 25. August 2020 05:57

Hi,

Sure it is possible. You can fit all requirements with XAMPP.
But of course we cannot give support for any Rainloop related topics like installation guidance.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11938
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Rainloop Windows 10 Apache Email Server

Postby Tardigrade » 26. August 2020 07:08

Hi Altrea,

Oh good, then there is some hope.

If anybody finds a link or has tried Rainloop with XAMPP and Windows 10, please let me know. :D

I can only find detailed install instructions with Ubuntu : (

Thank You
Tardigrade
 
Posts: 3
Joined: 25. August 2020 02:37
XAMPP version: 7.2.33
Operating System: Windows 10

Re: Rainloop Windows 10 Apache Email Server

Postby Nobbie » 26. August 2020 12:31

There is no Windows installation for Rainloop. Instead you must download the installer and run it manually in your Xampp environment.

I already did the download, please create a folder C:/xampp/htdocs/rainloop on your PC, copy the full contents of the following PHP script and paste into a new file C:/xampp/htdocs/rainloop/install.php:

Code: Select all
<?php

define('INSTALLER_ROOT_PATH', rtrim(dirname(__FILE__), '\\/').'/');
define('INSTALLER_REPO_CORE', 'http://repository.rainloop.net/v2/webmail/rainloop-latest.zip');
define('INSTALLER_REPO_SPEC', 'http://repository.rainloop.net/spec/');
define('INSTALLER_RND', md5(microtime(true)));

out('');
out('');
out('       [RainLoop Webmail Installer]');
out('');
out('');

if (is_dir(INSTALLER_ROOT_PATH.'rainloop') || is_dir(INSTALLER_ROOT_PATH.'data') || file_exists(INSTALLER_ROOT_PATH.'index.php'))
{
   out('[Error] Directory is not empty! Please re-install, specifying an empty (or new) directory.', true);
}

testPHP();
testCurrentFolder();

out('Connecting to repository ...');

// get latest RainLoop Webmail package file
if (!getPacker() || !getPackage() ||
   !file_exists(INSTALLER_ROOT_PATH.INSTALLER_RND.'/'.INSTALLER_RND.'.rlp') ||
   !file_exists(INSTALLER_ROOT_PATH.INSTALLER_RND.'/'.INSTALLER_RND.'.lib'))
{
   out('[Error] Cannot connect to repository', true);
}


include_once INSTALLER_ROOT_PATH.INSTALLER_RND.'/'.INSTALLER_RND.'.lib';

if (!class_exists('PclZip'))
{
   out('[Error] Cannot connect to repository', true);
}

out('Installing package ...');
$oArchive = new PclZip(INSTALLER_ROOT_PATH.INSTALLER_RND.'/'.INSTALLER_RND.'.rlp');
$bResult = 0 !== $oArchive->extract(PCLZIP_OPT_PATH, INSTALLER_ROOT_PATH);
if (
   !$bResult ||
   !file_exists(INSTALLER_ROOT_PATH.'index.php') ||
   !is_dir(INSTALLER_ROOT_PATH.'rainloop/')
)
{
   out('[Error] Cannot unzip package', true);
}

out('Complete installing!');

chmod_R(INSTALLER_ROOT_PATH.'data', 0666, 0777);
chmod_R(INSTALLER_ROOT_PATH.'rainloop', 0644, 0755);

@chmod(INSTALLER_ROOT_PATH.'rainloop/', 0777);
@chmod(INSTALLER_ROOT_PATH.'rainloop/v/', 0777);
@chmod(INSTALLER_ROOT_PATH.'index.php', 0666);

out('');
out('[Success] Installation is finished!');
out('');
endScript(0);

/* Functions */

function endScript($iErrorCode = 0)
{
   @unlink(INSTALLER_ROOT_PATH.INSTALLER_RND.'/'.INSTALLER_RND.'.lib');
   @unlink(INSTALLER_ROOT_PATH.INSTALLER_RND.'/'.INSTALLER_RND.'.rlp');
   @unlink(INSTALLER_ROOT_PATH.INSTALLER_RND.'/'.INSTALLER_RND.'.file');
   @rmdir(INSTALLER_ROOT_PATH.INSTALLER_RND);

   exit($iErrorCode);
}

function out($sDesc, $bExitWithErrorCode = false)
{
   if (0 < strlen($sDesc) && ' ' !== $sDesc{0} )
   {
      echo ' * ';
   }

   echo $sDesc;
   echo "\r\n";

   if ($bExitWithErrorCode)
   {
      endScript(1);
   }
}

function testPHP()
{
   if (0 > version_compare(PHP_VERSION, '5.4.0'))
   {
      out('[Error] Your PHP version ('.PHP_VERSION.') is lower than the minimal required 5.4.0!', true);
   }

   $aRequirements = array(
      'cURL' => function_exists('curl_init'),
      'iconv' => function_exists('iconv'),
      'json' => function_exists('json_decode'),
      'DateTime' => class_exists('DateTime') && class_exists('DateTimeZone'),
      'libxml' => function_exists('libxml_use_internal_errors'),
      'dom' => class_exists('DOMDocument'),
      'Zlib' => function_exists('gzopen') || function_exists('gzopen64'),
      'PCRE' => function_exists('preg_replace'),
      'SPL' => function_exists('spl_autoload_register')
   );

   if (in_array(false, $aRequirements))
   {
      out('[Error] The following PHP extensions are not available in your PHP configuration!');

      $aLine = array();
      foreach ($aRequirements as $sKey => $bValue)
      {
         if (!$bValue)
         {
            $aLine[] = $sKey;
         }
      }

      out(implode(', ', $aLine), true);
   }
}

function testCurrentFolder()
{
   $bResult = @mkdir(INSTALLER_ROOT_PATH.INSTALLER_RND);
   if ($bResult)
   {
      $bResult = false !== @file_put_contents(INSTALLER_ROOT_PATH.INSTALLER_RND.'/'.INSTALLER_RND.'.file', INSTALLER_RND);
      if (!$bResult)
      {
         out('[Error] Cannot save file', true);
      }
   }
   else
   {
      out('[Error] Cannot save folder', true);
   }
}

function getPackage()
{
   $bResult = false;

   out('Downloading package ...');

   $pSrc = @fopen(INSTALLER_REPO_CORE, 'rb');
   if ($pSrc)
   {
      $sTmp = INSTALLER_ROOT_PATH.INSTALLER_RND.'/'.INSTALLER_RND.'.rlp';
      $pDest = @fopen($sTmp, 'w+b');
      if ($pDest)
      {
         $iCopy = stream_copy_to_stream($pSrc, $pDest);

         $bResult = is_int($iCopy) && 0 < $iCopy;
         @fclose($pDest);
      }

      @fclose($pSrc);
   }

   out('Complete downloading!');

   return $bResult;
}

function getPacker()
{
   $bResult = false;

   $pSrc = @fopen(INSTALLER_REPO_SPEC.'pclzip/pclzip.lib.php', 'rb');
   if ($pSrc)
   {
      $sTmp = INSTALLER_ROOT_PATH.INSTALLER_RND.'/'.INSTALLER_RND.'.lib';
      $pDest = @fopen($sTmp, 'w+b');
      if ($pDest)
      {
         $iCopy = stream_copy_to_stream($pSrc, $pDest);

         $bResult = is_int($iCopy) && 0 < $iCopy;
         @fclose($pDest);
      }

      @fclose($pSrc);
   }

   return $bResult;
}

function chmod_R($path, $filemode, $dirmode)
{
   if (@is_dir($path))
   {
      @chmod($path, $dirmode);

      $dh = @opendir($path);
      if ($dh)
      {
         while (($file = readdir($dh)) !== false)
         {
            if ($file !== '.' && $file !== '..')
            {
               $fullpath = $path.'/'.$file;
               chmod_R($fullpath, $filemode, $dirmode);
            }
         }

         @closedir($dh);
      }
   }
   else
   {
      @chmod($path, $filemode);
   }
}
?>


At next open a terminal (DOS Command Box), cd into C:/xampp/htdocs/rainloop and enter this command:

Code: Select all
C:/xampp/bin/php install.php


This *should* start the installer. After a while, when the installation is finished, open a browser and proceed to this URL (you may simply click here on that link): http://localhost/rainloop/?admin

A login dialog should appear, enter "admin" and "12345" for UserID and Password. Then begin to configure your Rainloop installation to your needs.
Nobbie
 
Posts: 13178
Joined: 09. March 2008 13:04

Re: Rainloop Windows 10 Apache Email Server

Postby Nobbie » 26. August 2020 14:54

P.S.: There is a faulty pathname in the PHP command, please instead use this command:

Code: Select all
C:/xampp/php/php install.php
Nobbie
 
Posts: 13178
Joined: 09. March 2008 13:04

Re: Rainloop Windows 10 xammp Email Server

Postby Tardigrade » 01. July 2021 08:39

Did this guy setup a Rainloop email server on xammp Win 10?

https://www.youtube.com/watch?v=NhdvKwfa6BA
Tardigrade
 
Posts: 3
Joined: 25. August 2020 02:37
XAMPP version: 7.2.33
Operating System: Windows 10


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 283 guests