1

Topic: Install iRedMail with a remote MySQL server

Hi,
I'm trying to install iRedMail with a remote MySQL server, it doesn't create the databases in remote server.
Database Server Ip: 10.168.222.8
Iredmail Server Ip: 10.168.222.14

I created user in remote server with:
GRANT ALL PRIVILEGES ON *.* TO 'admin_iredmail'@'10.168.222.14' IDENTIFIED BY 'admin_password' WITH GRANT OPTION;
I checked connection to the db server and it works from iredmail server

MYSQL_SERVER_ADDRESS='10.168.222.8' MYSQL_SERVER_PORT='3306' MYSQL_ROOT_USER='admin_iredmail' MYSQL_ROOT_PASSWD='admin_password' MYSQL_GRANT_HOST='10.168.222.14' bash iRedMail.sh

Where is my error?
Thsnks in advance,
Ssoc

----

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

2

Re: Install iRedMail with a remote MySQL server

Any error in file "runtime/install.log" under your iRedMail directory (iRedMail-0.9.4/runtime/install.log)?

3

Re: Install iRedMail with a remote MySQL server

ChangeLog  Documentations  README.md  addons  conf  config  dialog  functions  iRedMail.sh  iRedMail.tips  pkgs  runtime  samples  tools
ags@mail:~/iRedMail-0.9.4$ cd runtime
ags@mail:~/iRedMail-0.9.4/runtime$ ls
install.log  install.status  mysql_init.sql  mysql_vmail.sql  pkg.install.log
ags@mail:~/iRedMail-0.9.4/runtime$ cat install.log
[ INFO ] Checking new version of iRedMail ...
+ < DEBUG > Creating necessary directories ...
[ INFO ] Resynchronizing the package index files (apt-get update) ...
[ INFO ] Fetching source tarballs ...
[ INFO ] + 1 of 3: http://iredmail.org/yum/misc/iRedAPD-1.8.0.tar.bz2
[ INFO ] + 2 of 3: http://iredmail.org/yum/misc/iRedAdmin-0.5.tar.bz2
[ INFO ] + 3 of 3: http://iredmail.org/yum/misc/roundcubem … ete.tar.gz
[ INFO ] Validate packages ...
[ INFO ] Install package: dialog
[ INFO ] Installing package(s): dialog
[ INFO ] Checking configuration file: /home/ags/iRedMail-0.9.4/config ...
[ INFO ] [NOT FOUND]
[ INFO ] Installing package(s): postfix postfix-pcre mysql-server mysql-client postfix-mysql libdbd-mysql-perl php5-imap php5-json php5-gd php5-mcrypt php5-curl mcrypt php-apc php5-intl php5-mysql nginx-full php5-fpm dovecot-imapd dovecot-pop3d dovecot-lmtpd dovecot-managesieved dovecot-sieve dovecot-mysql amavisd-new libcrypt-openssl-rsa-perl libmail-dkim-perl clamav-freshclam clamav-daemon spamassassin altermime arj zoo nomarch cpio lzop cabextract p7zip rpm ripole libmail-spf-perl unrar-free php-pear php5-intl python-sqlalchemy python-dnspython python-mysqldb python-jinja2 python-netifaces python-webpy python-beautifulsoup python-lxml uwsgi uwsgi-plugin-python python-bcrypt fail2ban bzip2 acl patch cron tofrodos logwatch unzip bsdutils
+ < DEBUG > Service control: enable rsyslog.
+ < DEBUG > Service control: enable postfix.
+ < DEBUG > Service control: enable mysql.
+ < DEBUG > Service control: enable nginx.
+ < DEBUG > Service control: enable php5_fpm.
update-rc.d: error: initscript does not exist: /etc/init.d/php5_fpm
+ < DEBUG > Service control: enable uwsgi.
+ < DEBUG > Service control: enable dovecot.
+ < DEBUG > Service control: enable clamav-daemon.
+ < DEBUG > Service control: enable amavis.
+ < DEBUG > Service control: enable clamav-freshclam.
+ < DEBUG > Service control: enable fail2ban.
+ < DEBUG > Service control: enable cron.
+ < DEBUG > Service control: disable spamassassin.
[ INFO ] Create self-signed SSL certification files (2048 bits).
[ INFO ] Generate a strong, unique Diffie Hellman Group with openssl, please wait.
[ INFO ] Create required system account: vmail, iredadmin, iredapd.
+ < DEBUG > Create HOME folder for vmail user.
+ < DEBUG > Create system account: vmail:vmail (2000:2000).
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
rm: cannot remove '/var/vmail/.': Is a directory
rm: cannot remove '/var/vmail/..': Is a directory
+ < DEBUG > Create directory to store user sieve rule files: /var/vmail/sieve.
+ < DEBUG > Create system account: iredadmin:iredadmin (2001:2001)
+ < DEBUG > Create system account: iredapd:iredapd (2002:2002).
[ INFO ] Configure Nginx web server and uWSGI.
[ INFO ] Configure PHP.
+ < DEBUG > Hide PHP Version in Apache from remote users requests: /etc/php5/fpm/php.ini.
+ < DEBUG > Increase 'memory_limit' to 256M: /etc/php5/fpm/php.ini.
+ < DEBUG > Increase 'upload_max_filesize', 'post_max_size' to 10/12M: /etc/php5/fpm/php.ini.
+ < DEBUG > Disable php extension: suhosin. /etc/php5/fpm/php.ini.
[ INFO ] Configure MySQL database server.
+ < DEBUG > Generate temporary defauts file for MySQL client option --defaults-file: /home/ags/iRedMail-0.9.4/.mysql-root-defaults-file.
+ < DEBUG > Initialize MySQL server.
+ < DEBUG > Make sure MySQL server binds to local address: 127.0.0.1.
+ < DEBUG > Stop MySQL service before updating my.cnf.
+ < DEBUG > Service control: stop mysql.
Stopping MySQL database server: mysqld.
+ < DEBUG > Disable 'skip-networking' in my.cnf.
+ < DEBUG > Enable 'innodb_file_per_table' in my.cnf.
+ < DEBUG > Service control: restart mysql.
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld ..
Checking for tables which need an upgrade, are corrupt or were
not closed cleanly..
+ < DEBUG > Sleep 10 seconds for MySQL daemon initialization ...
Database
information_schema
mysql
performance_schema
+ < DEBUG > Disable plugin 'unix_socket' to force all users to login with a password.
+ < DEBUG > Setting password for MySQL admin (root).
+ < DEBUG > Initialize MySQL database.
+ < DEBUG > Generating SQL template for postfix virtual hosts: /home/ags/iRedMail-0.9.4/runtime/mysql_vmail.sql.
+ < DEBUG > Import postfix virtual hosts/users: /home/ags/iRedMail-0.9.4/runtime/mysql_vmail.sql.
[ INFO ] Setup daily cron job to backup SQL databases with /var/vmail/backup/backup_mysql.sh
[ INFO ] Configure Postfix (Message Transfer Agent).
+ < DEBUG > Enable chroot.
+ < DEBUG > Enable submission and additional transports required by Amavisd and Dovecot.
+ < DEBUG > Copy: /etc/{hosts,resolv.conf,localtime,services} -> /var/spool/postfix/etc/
+ < DEBUG > Disable duplicate log entries (mail.{info,warn,err}) in syslog config file.
+ < DEBUG > Configure Postfix for SQL/LDAP lookup.
+ < DEBUG > Enable postscreen service.
* [BACKUP] /etc/postfix/main.cf -> /etc/postfix/main.cf.2016.04.06.22.56.23.
* [BACKUP] /etc/postfix/master.cf -> /etc/postfix/master.cf.2016.04.06.22.56.23.
* Comment out 'smtp inet ... smtpd' service in /etc/postfix/master.cf.
* Uncomment the new 'smtpd pass ... smtpd' service in /etc/postfix/master.cf.
* Uncomment the new smtp inet ... postscreen service in /etc/postfix/master.cf.
* Uncomment the new 'tlsproxy unix ... tlsproxy' service in /etc/postfix/master.cf.
* Uncomment the new 'dnsblog unix ... dnsblog' service in /etc/postfix/master.cf.
* Update /etc/postfix/main.cf to enable postscreen.
* Create /var/spool/postfix//var/lib/postfix/postscreen_cache.db.
* Reloading postfix service to read the new configuration.
* postscreen is now enabled.
[ INFO ] Configure Dovecot (pop3/imap/managesieve server).
+ < DEBUG > Configure dovecot: /etc/dovecot/dovecot.conf.
+ < DEBUG > Copy global sieve filter rule file: /var/vmail/sieve/dovecot.sieve.
+ < DEBUG > Create dovecot log file: /var/log/dovecot.log.
+ < DEBUG > Create dovecot log file: /var/log/dovecot-sieve.log.
+ < DEBUG > Create dovecot log file: /var/log/dovecot-lmtp.log.
+ < DEBUG > Enable dovecot SASL support in postfix: /etc/postfix/main.cf.
+ < DEBUG > Create directory for Dovecot plugin: Expire.
+ < DEBUG > Setting logrotate for dovecot log file.
[ INFO ] Configure ClamAV (anti-virus toolkit).
+ < DEBUG > Configure ClamAV: /etc/clamav/clamd.conf.
+ < DEBUG > Configure freshclam: /etc/clamav/freshclam.conf.
[ INFO ] Configure Amavisd-new (interface between MTA and content checkers).
+ < DEBUG > Configure amavisd-new: /etc/amavis/conf.d/50-user.
Adding user clamav to group amavis
+ < DEBUG > Generate DKIM pem files: /var/lib/dkim/dgcall.net.pem.
head: cannot open '/etc/mailname' for reading: No such file or directory
+ < DEBUG > Setting cron job for vmail user to delete virus mail per month.
+ < DEBUG > Import Amavisd database and privileges.
[ INFO ] Configure SpamAssassin (content-based spam filter).
+ < DEBUG > Copy sample SpamAssassin config file: /home/ags/iRedMail-0.9.4/samples/spamassassin/local.cf -> /etc/mail/spamassassin/local.cf.
+ < DEBUG > Enable crontabs for SpamAssassin update.
[ INFO ] Configure iRedAPD (postfix policy daemon).
+ < DEBUG > Extracting: iRedAPD-1.8.0.tar.bz2 -> /opt
+ < DEBUG > Configure iRedAPD.
+ < DEBUG > Make iredapd start after system startup.
+ < DEBUG > Service control: enable iredapd.
+ < DEBUG > Import iRedAPD database template.
+ < DEBUG > Updating greylisting whitelists based on whitelist domain names.
[ INFO ] Configure iRedAdmin (official web-based admin panel).
+ < DEBUG > Extracting: iRedAdmin-0.5.tar.bz2 -> /opt/www
+ < DEBUG > Set correct permission for iRedAdmin: /opt/www/iRedAdmin-0.5.
+ < DEBUG > Import iRedAdmin database template.
+ < DEBUG > Configure iRedAdmin.
+ < DEBUG > Configure general settings.
+ < DEBUG > Configure iredadmin database related settings.
+ < DEBUG > Configure SQL mail accounts related settings.
+ < DEBUG > Configure Amavisd related settings.
+ < DEBUG > Configure iRedAPD related settings.
[ INFO ] Configure Fail2ban (authentication failure monitor).
+ < DEBUG > Log into syslog instead of log file.
+ < DEBUG > Disable all default filters in /etc/fail2ban/jail.conf.
+ < DEBUG > Create Fail2ban config file: /etc/fail2ban/jail.local.
+ < DEBUG > Copy sample Fail2ban filter config files.
[ INFO ] Configure Roundcube webmail.
+ < DEBUG > Extracting: roundcubemail-1.1.4-complete.tar.gz -> /opt/www
+ < DEBUG > Set correct permission for Roundcubemail: /opt/www/roundcubemail-1.1.4.
+ < DEBUG > Import SQL database and privileges for Roundcubemail.
+ < DEBUG > Configure database for Roundcubemail: /opt/www/roundcubemail-1.1.4/config/*.
+ < DEBUG > Setup daily cron job to keep SQL database clean.
+ < DEBUG > Config plugin: managesieve.
+ < DEBUG > Enable and config plugin: password.
+ < DEBUG > Mail sensitive administration info to .
+ < DEBUG > Set file permission to 0600: /var/spool/cron/crontabs/root.
+ < DEBUG > Set file permission to 0600: /var/spool/cron/crontabs/amavis.
[ INFO ] Copy firewall sample rules: /etc/default/iptables.
+ < DEBUG > Service control: enable iptables.
[ INFO ] Updating ClamAV database (freshclam), please wait ...
+ < DEBUG > Send info of chosed packages to iRedMail team to help improve iRedMail:
+ < DEBUG >
+ < DEBUG >    MYSQL=YES
+ < DEBUG >    NGINX=YES
+ < DEBUG >    APACHE=NO
+ < DEBUG >    ROUNDCUBE=YES
+ < DEBUG >    SOGO=
+ < DEBUG >    AWSTATS=YES
+ < DEBUG >    FAIL2BAN=YES
+ < DEBUG >    IREDADMIN=YES

4

Re: Install iRedMail with a remote MySQL server

Hi,
I think Iredmail has a bug, if you install a remote database.
I did install mysql-client before install.

It works!
Ssoc