1

Topic: Hosts file before installation. (Jail and Without Jail)

Hello,

I've tried two installation types (Jail and Without Jail) on FreeBSD. I've read documents. First documents says (Without Jail) we must change in /etc/hosts files. Like this;

# Part of file: /etc/hosts
127.0.0.1   mx.example.com mx localhost localhost.localdomain

And other documents (in Jail) not refer this steps. But refer different steps for start iRed installations. Like this;

Without Jail ;
# bash iRedMail.sh

In Jail ;
# LOCAL_ADDRESS='xx.xx.xx.xx' bash iRedMail.sh

xx.xx.xx.xx => jail IP (10.0.0.5 for me) (Not 127.0.0.1)

When i was finished installation in jail, i've received this error.

"ERROR 1130 (00000): Host '10.0.0.5' is not allowed to connect to this MySQL server"

Question 1:

How should it be /etc/hosts file for iRedMail installation in Jail?

127.0.0.1   mx.example.com mx localhost localhost.localdomain
   OR
10.0.0.5   mx.example.com mx localhost localhost.localdomain

Question 2:

How do i start iRedMail installation in Jail?

jail#  LOCAL_ADDRESS='10.0.0.5' bash iRedMail.sh
  OR
jail#  LOCAL_ADDRESS='127.0.0.1' bash iRedMail.sh

Question 3: (And Last)

Which one is healty?

Firstly ; change LOCAL_ADDRESS line in /iRedMail/conf/global

export LOCAL_ADDRESS='10.0.0.5'  #Here 10.0.0.5 is local adress my Jail.

and after run installation;

# bash iRedMail.sh


OR

Directly;

#LOCAL_ADDRESS='10.0.0.5' bash iRedMail.sh

Already thanks for answers.


==== Required information ====
- iRedMail version: iRedMail-0.8.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: FreeBSD 9.1-RELEASE #0 r243825
- Related log if you're reporting an issue:
====

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Hosts file before installation. (Jail and Without Jail)

kuranist wrote:

Question 1:

How should it be /etc/hosts file for iRedMail installation in Jail?

127.0.0.1   mx.example.com mx localhost localhost.localdomain
   OR
10.0.0.5   mx.example.com mx localhost localhost.localdomain

Hi kuranist,

As you can see in our tutorial, we didn't update /etc/hosts in Jailed server. Instead, we set it in /etc/hosts on host server (not the Jailed one): http://www.iredmail.org/wiki/index.php? … ail_server (Section "Set a proper hostname and IP address for Jail server").

kuranist wrote:

Question 2:

How do i start iRedMail installation in Jail?

jail#  LOCAL_ADDRESS='10.0.0.5' bash iRedMail.sh
  OR
jail#  LOCAL_ADDRESS='127.0.0.1' bash iRedMail.sh

of course the first one, use the IP address of your Jailed server:

jail# LOCAL_ADDRESS='10.0.0.5' bash iRedMail.sh
kuranist wrote:

Question 3: (And Last)

Which one is healty?

Firstly ; change LOCAL_ADDRESS line in /iRedMail/conf/global
...
OR Directly;

#LOCAL_ADDRESS='10.0.0.5' bash iRedMail.sh

The second one is the best.
We try our best to not to make your hands dirty, you can know specify the IP address of Jailed server on command line directly instead of modifying iRedMail source file.

Again, this one is the best:

# LOCAL_ADDRESS='10.0.0.5' bash iRedMail.sh