1

Topic: option to specify hostname or IP for installation?

==== Provide required information ====
- iRedMail version and backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Any related log? Log is helpful for troubleshooting.
==== ==== Provide required information ====
- iRedMail version and backend (LDAP/MySQL/PGSQL): 0.8.1
- Linux/BSD distribution name and version: FreeBSD 9.0 with jails
- Any related log? Log is helpful for troubleshooting.
====

FreeBSD jails (http://www.freebsd.org/doc/en_US.ISO885 … jails.html) enables admin to segment services running on a host. Jail is usually limited to one IP which is NOT 127.0.0.1. iredmail installer is using 127.0.0.1 everywhere. Best option would be to stick with using hostname which is properly set to IP in /etc/hosts. With jails you NEVER get connection from 127.0.0.1, but always from configured jail ip address. System is translating 127.0.0.1 to actual jail ip, but servers receiving the connection inside jail never see 127.0.0.1 as client address. This usually causes problems with any host-based limits like mysql!

So in short - best option would be to use proper hostname which should point to proper address in /etc/hosts. Your docs already state at the beginning about importance of working hostname.

----

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

2

Re: option to specify hostname or IP for installation?

How about configure file iRedMail-x.y.z/conf/global to set correct IP of jail before installation? e.g.

# For distribute deployment.                                                    
# MySQL server                                                                                                          
export MYSQL_SERVER='127.0.0.1'                                                 
export MYSQL_SERVER_PORT='3306'                                                 
# PGSQL server                                                                  
export PGSQL_SERVER='127.0.0.1'                                                 
export PGSQL_SERVER_PORT='5432'                                                 
# POP3/IMAP server (Dovecot)                                                    
export IMAP_SERVER='127.0.0.1'                                                  
# SMTP server (Postfix)                                                         
export SMTP_SERVER='127.0.0.1'                                                  
# Amavisd                                                                       
export AMAVISD_SERVER='127.0.0.1'

3

Re: option to specify hostname or IP for installation?

Well, with last commit, what you need to do is just set 'LOCAL_ADDRESS' to the IP address of Jail in next release of iRedMail:

# For better distributed deployment
# IP address of localhost. usually it's 127.0.0.1, but not in FreeBSD Jail.
export LOCAL_ADDRESS='127.0.0.1'
# OpenLDAP
export LDAP_SERVER_HOST="${LOCAL_ADDRESS}"
# MySQL server
export MYSQL_SERVER="${LOCAL_ADDRESS}"
export MYSQL_SERVER_PORT='3306'
# PGSQL server
export PGSQL_SERVER="${LOCAL_ADDRESS}"
export PGSQL_SERVER_PORT='5432'
# Dovecot: POP3, IMAP, managesieve
export IMAP_SERVER="${LOCAL_ADDRESS}"
export MANAGESIEVE_BIND_HOST="${LOCAL_ADDRESS}"
# SMTP server (Postfix)
export SMTP_SERVER="${LOCAL_ADDRESS}"
# Amavisd
export AMAVISD_SERVER="${LOCAL_ADDRESS}"
# Policyd or Cluebringer
export POLICYD_BIND_HOST="${LOCAL_ADDRESS}"
export CLUEBRINGER_BIND_HOST="${LOCAL_ADDRESS}"
# ClamAV
export CLAMD_BIND_HOST="${LOCAL_ADDRESS}"
# iRedAPD
export IREDAPD_BIND_HOST="${LOCAL_ADDRESS}"