1

Topic: Installation poblem on FreeBSD 10.3

==== Required information ====
- iRedMail version (check /etc/iredmail-release):  0.9.6
- Linux/BSD distribution name and version:  Freebsd 10.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx/Apache
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
[ INFO ] Configure MySQL database server.
ERROR 1130 (HY000): Host 'jail2.freebsd.mynet' is not allowed to connect to this MySQL server
ERROR 1130 (HY000): Host 'jail2.freebsd.mynet' is not allowed to connect to this MySQL server
ERROR 1130 (HY000): Host 'jail2.freebsd.mynet' is not allowed to connect to this MySQL server
ERROR 1130 (HY000): Host 'jail2.freebsd.mynet' is not allowed to connect to this MySQL server
ERROR 1130 (HY000): Host 'jail2.freebsd.mynet' is not allowed to connect to this MySQL server
ERROR 1130 (HY000): Host 'jail2.freebsd.mynet' is not allowed to connect to this MySQL server
ERROR 1130 (HY000): Host 'jail2.freebsd.mynet' is not allowed to connect to this MySQL server
ls

[ INFO ] Configure MySQL database server.
+ < DEBUG > Initialize MySQL server.
+ < DEBUG > Stop MySQL service before updating my.cnf.
mysql_enable:  -> YES
mysql_optfile:  -> /usr/local/etc/mysql/my.cnf
+ < DEBUG > Disable 'skip-networking' in my.cnf.
+ < DEBUG > Enable 'innodb_file_per_table' in my.cnf.
mysql not running? (check /var/db/mysql/jail2.freebsd.mynet.pid).
+ < DEBUG > Sleep 10 seconds for MySQL daemon initialization ...
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
^Gmysqladmin: connect to server at '10.1.2.202' failed
error: 'Host 'jail2.freebsd.mynet' is not allowed to connect to this MySQL server'
+ < DEBUG > Generate defauts file for MySQL client option --defaults-file: /root/.my.cnf.
+ < DEBUG > Delete anonymous database user.
+ < DEBUG > Generate sample SQL templates.
+ < DEBUG > Create database: vmail.
+ < DEBUG > Initialize database: vmail.
+ < DEBUG > Add first domain and postmaster@ user.
[ INFO ] Setup daily cron job to backup SQL databases with /var/vmail/backup/backup_mysql.sh
====

Hello,
I am facing strange problem while installing iRedMail on FreeBSD 10.3 server. I tried the installation process on two different servers but it's the same on both.

Installation fails in two moments:
1.
7 warnings and 6 errors generated.
gmake[3]: *** [GNUmakefile:132: freebsd10.3/C/rs/arj/decode.o] Error 1
gmake[3]: Leaving directory '/var/ports/basejail/usr/ports/archivers/arj/work/arj-3.10.22'
gmake[2]: *** [GNUmakefile:169: all] Error 2
gmake[2]: Leaving directory '/var/ports/basejail/usr/ports/archivers/arj/work/arj-3.10.22'
*** Error code 1

Stop.
make[1]: stopped in /basejail/usr/ports/archivers/arj
*** Error code 1

Stop.
make: stopped in /basejail/usr/ports/security/amavisd-new
<< ERROR >> Port was not successfully installed, please fix it manually and then re-execute this script.

This looks more like some problem with Freebsd ports but it happens on both machines.

2.
Second error is at the end of installation process while initializing MySQL database.
It look like setup cannot connect to the server.

Of course, I used LOCAL_ADDRESS parameter

Could you please tell me what's going on? Last time I installed iRedMail, it was on FreeBSD 10.2 without any problem.
Is there any logfile I should send?

Thanks a lot in advance.

----

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

2

Re: Installation poblem on FreeBSD 10.3

javon wrote:

Stop.
make[1]: stopped in /basejail/usr/ports/archivers/arj
*** Error code 1

This is a port tree issue, installing archives/arj manually is ok, then re-run iRedMail installer. No idea what the difference between installing it from a script.

javon wrote:

Of course, I used LOCAL_ADDRESS parameter

Any error in file iRedMail-0.9.6/runtime/install.log?

3

Re: Installation poblem on FreeBSD 10.3

ZhangHuangbin wrote:
javon wrote:

Stop.
make[1]: stopped in /basejail/usr/ports/archivers/arj
*** Error code 1

This is a port tree issue, installing archives/arj manually is ok, then re-run iRedMail installer. No idea what the difference between installing it from a script.

javon wrote:

Of course, I used LOCAL_ADDRESS parameter

Any error in file iRedMail-0.9.6/runtime/install.log?

Yes, I installed arj manualy and it worked.

Here is install.log but there is nothing obvious. Only mysql errrors and arj error while installing amavis package.

[ INFO ] Checking new version of iRedMail ...
+ < DEBUG > Creating necessary directories ...
[ INFO ] Fetching source tarballs ...
[ INFO ] + 1 of 2: http://iredmail.org/yum/misc/iRedAPD-2.0.tar.bz2
[ INFO ] + 2 of 2: http://iredmail.org/yum/misc/iRedAdmin-0.7.tar.bz2
[ INFO ] Validate packages ...
[ INFO ] Checking configuration file: /root/iRedMail-0.9.6/config ...
[ INFO ] NOT FOUND. Launching installation wizard to generate one.
+ < DEBUG > Update /etc/make.conf: WANT_OPENLDAP_VER=24
+ < DEBUG > Update /etc/make.conf: WANT_MYSQL=57
+ < DEBUG > Update /etc/make.conf: WANT_PGSQL_VER=95
+ < DEBUG > Update /etc/make.conf: APACHE_PORT=www/apache24
+ < DEBUG > Update /etc/make.conf: WANT_BDB_VER=5
+ < DEBUG > Update /etc/make.conf: DEFAULT_VERSIONS=ssl=libressl python=2.7 python2=2.7 apache=2.4 pgsql=9.5 php=7.0
+ < DEBUG > Update /etc/make.conf: OPTIONS_SET+=SASL
+ < DEBUG > Update /etc/make.conf: OPTIONS_UNSET+=X11
+ < DEBUG > Update /etc/make.conf: LICENSES_ACCEPTED+=NONE
[ INFO ] Ports tree: /usr/ports
[ INFO ] Fetching all distfiles for required ports (make fetch-recursive)
[ INFO ] Fetching all distfiles for port: devel/py-Jinja2
[ INFO ] Fetching all distfiles for port: devel/py-lxml
[ INFO ] Fetching all distfiles for port: net/py-netifaces
[ INFO ] Fetching all distfiles for port: www/py-beautifulsoup
[ INFO ] Fetching all distfiles for port: security/py-bcrypt
[ INFO ] Fetching all distfiles for port: databases/mysql57-client
[ INFO ] Fetching all distfiles for port: databases/mysql57-server
[ INFO ] Fetching all distfiles for port: mail/dovecot2
[ INFO ] Fetching all distfiles for port: mail/dovecot2-pigeonhole
[ INFO ] Fetching all distfiles for port: mail/spamassassin
[ INFO ] Fetching all distfiles for port: security/amavisd-new
[ INFO ] Fetching all distfiles for port: mail/postfix
[ INFO ] Fetching all distfiles for port: www/nginx
[ INFO ] Fetching all distfiles for port: www/uwsgi
[ INFO ] Fetching all distfiles for port: lang/php70
[ INFO ] Fetching all distfiles for port: mail/php70-imap
[ INFO ] Fetching all distfiles for port: archivers/php70-zip
[ INFO ] Fetching all distfiles for port: archivers/php70-bz2
[ INFO ] Fetching all distfiles for port: archivers/php70-zlib
[ INFO ] Fetching all distfiles for port: devel/php70-gettext
[ INFO ] Fetching all distfiles for port: converters/php70-mbstring
[ INFO ] Fetching all distfiles for port: security/php70-mcrypt
[ INFO ] Fetching all distfiles for port: security/php70-openssl
[ INFO ] Fetching all distfiles for port: www/php70-session
[ INFO ] Fetching all distfiles for port: textproc/php70-ctype
[ INFO ] Fetching all distfiles for port: security/php70-hash
[ INFO ] Fetching all distfiles for port: converters/php70-iconv
[ INFO ] Fetching all distfiles for port: textproc/php70-pspell
[ INFO ] Fetching all distfiles for port: textproc/php70-dom
[ INFO ] Fetching all distfiles for port: databases/php70-mysqli
[ INFO ] Fetching all distfiles for port: devel/p5-Exporter-Tiny
[ INFO ] Fetching all distfiles for port: security/clamav
[ INFO ] Fetching all distfiles for port: mail/roundcube
[ INFO ] Fetching all distfiles for port: devel/sope3
[ INFO ] Fetching all distfiles for port: www/sogo3
[ INFO ] Fetching all distfiles for port: www/awstats
[ INFO ] Fetching all distfiles for port: databases/py-MySQLdb
[ INFO ] Fetching all distfiles for port: databases/py-sqlalchemy10
[ INFO ] Fetching all distfiles for port: dns/py-dnspython
[ INFO ] Fetching all distfiles for port: www/webpy
[ INFO ] Fetching all distfiles for port: ftp/py-pycurl
[ INFO ] Fetching all distfiles for port: sysutils/logwatch
[ INFO ] Install packages.
[ INFO ] Installing port: devel/py-Jinja2 (2017-02-19 13:55:02) ...
[ INFO ] Installing port: devel/py-lxml (2017-02-19 14:01:20) ...
[ INFO ] Installing port: net/py-netifaces (2017-02-19 14:03:40) ...
[ INFO ] Installing port: www/py-beautifulsoup (2017-02-19 14:03:42) ...
[ INFO ] Installing port: security/py-bcrypt (2017-02-19 14:03:44) ...
[ INFO ] Installing port: databases/mysql57-client (2017-02-19 14:03:46) ...
[ INFO ] Installing port: databases/mysql57-server (2017-02-19 14:22:45) ...
[ INFO ] Installing port: mail/dovecot2 (2017-02-19 14:50:19) ...
[ INFO ] Installing port: mail/dovecot2-pigeonhole (2017-02-19 14:53:54) ...
[ INFO ] Installing port: mail/spamassassin (2017-02-19 14:54:39) ...
[ INFO ] Installing port: security/amavisd-new (2017-02-19 15:07:29) ...
<< ERROR >> Port was not successfully installed, please fix it manually and then re-execute this script.
[ INFO ] Checking configuration file: /root/iRedMail-0.9.6/config ...
[ INFO ] Use config file: /root/iRedMail-0.9.6/config for mail server setting.
[ INFO ] Import installation process status from file: /root/iRedMail-0.9.6/runtime/install.status.
+ < DEBUG > Skip adding option in /etc/make.conf: WANT_OPENLDAP_VER=24
+ < DEBUG > Skip adding option in /etc/make.conf: WANT_MYSQL=57
+ < DEBUG > Skip adding option in /etc/make.conf: WANT_PGSQL_VER=95
+ < DEBUG > Skip adding option in /etc/make.conf: APACHE_PORT=www/apache24
+ < DEBUG > Skip adding option in /etc/make.conf: WANT_BDB_VER=5
+ < DEBUG > Skip adding option in /etc/make.conf: DEFAULT_VERSIONS=ssl=libressl python=2.7 python2=2.7 apache=2.4 pgsql=9.5 php=7.0
+ < DEBUG > Skip adding option in /etc/make.conf: OPTIONS_SET+=SASL
+ < DEBUG > Skip adding option in /etc/make.conf: OPTIONS_UNSET+=X11
+ < DEBUG > Skip adding option in /etc/make.conf: LICENSES_ACCEPTED+=NONE
< SKIP > Function: fetch_all_src_tarballs.
[ INFO ] Install packages.
< SKIP > Installing port: devel/py-Jinja2.
< SKIP > Installing port: devel/py-lxml.
< SKIP > Installing port: net/py-netifaces.
< SKIP > Installing port: www/py-beautifulsoup.
< SKIP > Installing port: security/py-bcrypt.
< SKIP > Installing port: databases/mysql57-client.
< SKIP > Installing port: databases/mysql57-server.
< SKIP > Installing port: mail/dovecot2.
< SKIP > Installing port: mail/dovecot2-pigeonhole.
< SKIP > Installing port: mail/spamassassin.
[ INFO ] Installing port: security/amavisd-new (2017-02-19 15:13:58) ...
[ INFO ] Installing port: mail/postfix (2017-02-19 15:16:23) ...
[ INFO ] Installing port: www/nginx (2017-02-19 15:23:29) ...
[ INFO ] Installing port: www/uwsgi (2017-02-19 15:26:54) ...
[ INFO ] Installing port: lang/php70 (2017-02-19 15:27:18) ...
[ INFO ] Installing port: mail/php70-imap (2017-02-19 15:29:11) ...
[ INFO ] Installing port: archivers/php70-zip (2017-02-19 15:29:37) ...
[ INFO ] Installing port: archivers/php70-bz2 (2017-02-19 15:29:58) ...
[ INFO ] Installing port: archivers/php70-zlib (2017-02-19 15:30:03) ...
[ INFO ] Installing port: devel/php70-gettext (2017-02-19 15:30:08) ...
[ INFO ] Installing port: converters/php70-mbstring (2017-02-19 15:30:14) ...
[ INFO ] Installing port: security/php70-mcrypt (2017-02-19 15:30:48) ...
[ INFO ] Installing port: security/php70-openssl (2017-02-19 15:31:16) ...
[ INFO ] Installing port: www/php70-session (2017-02-19 15:31:23) ...
[ INFO ] Installing port: textproc/php70-ctype (2017-02-19 15:31:29) ...
[ INFO ] Installing port: security/php70-hash (2017-02-19 15:31:35) ...
[ INFO ] Installing port: converters/php70-iconv (2017-02-19 15:31:44) ...
[ INFO ] Installing port: textproc/php70-pspell (2017-02-19 15:32:10) ...
[ INFO ] Installing port: textproc/php70-dom (2017-02-19 15:33:08) ...
[ INFO ] Installing port: databases/php70-mysqli (2017-02-19 15:33:21) ...
[ INFO ] Installing port: devel/p5-Exporter-Tiny (2017-02-19 15:33:29) ...
[ INFO ] Installing port: security/clamav (2017-02-19 15:33:31) ...
[ INFO ] Installing port: mail/roundcube (2017-02-19 15:35:55) ...
[ INFO ] Installing port: devel/sope3 (2017-02-19 15:37:49) ...
[ INFO ] Installing port: www/sogo3 (2017-02-19 15:51:55) ...
[ INFO ] Installing port: www/awstats (2017-02-19 15:53:15) ...
[ INFO ] Installing port: databases/py-MySQLdb (2017-02-19 15:53:22) ...
[ INFO ] Installing port: databases/py-sqlalchemy10 (2017-02-19 15:53:25) ...
[ INFO ] Installing port: dns/py-dnspython (2017-02-19 15:53:35) ...
[ INFO ] Installing port: www/webpy (2017-02-19 15:53:50) ...
[ INFO ] Installing port: ftp/py-pycurl (2017-02-19 15:53:57) ...
[ INFO ] Installing port: sysutils/logwatch (2017-02-19 15:54:03) ...
[ INFO ] Total time of ports compiling: 2409 seconds, ~= 40 minute(s)
+ < DEBUG > Post-install cleanup.
[ INFO ] Create self-signed SSL certification files (2048 bits).
[ INFO ] Generate Diffie Hellman Group with openssl, please wait.
[ INFO ] Create required system account: vmail, iredadmin, iredapd.
+ < DEBUG > Create system account: vmail:vmail (2000:2000).
+ < DEBUG > Create directory used to store global sieve filters: /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.
nginx_enable:  -> YES
php_fpm_enable:  -> YES
uwsgi_enable:  -> YES
uwsgi_profiles:  -> iredadmin
uwsgi_iredadmin_flags:  -> --ini /usr/local/etc/uwsgi/iredadmin.ini
[ INFO ] Configure PHP.
+ < DEBUG > Hide PHP Version in Apache from remote users requests: /usr/local/etc/php.ini.
+ < DEBUG > Increase 'memory_limit' to 256M: /usr/local/etc/php.ini.
+ < DEBUG > Increase 'upload_max_filesize', 'post_max_size' to 10/12M: /usr/local/etc/php.ini.
+ < DEBUG > Disable php extension: suhosin. /usr/local/etc/php.ini.
[ INFO ] Configure MySQL database server.
+ < DEBUG > Initialize MySQL server.
+ < DEBUG > Stop MySQL service before updating my.cnf.
mysql_enable:  -> YES
mysql_optfile:  -> /usr/local/etc/mysql/my.cnf
+ < DEBUG > Disable 'skip-networking' in my.cnf.
+ < DEBUG > Enable 'innodb_file_per_table' in my.cnf.
mysql not running? (check /var/db/mysql/jail2.freebsd.mynet.pid).
+ < DEBUG > Sleep 10 seconds for MySQL daemon initialization ...
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
^Gmysqladmin: connect to server at '10.1.2.202' failed
error: 'Host 'jail2.freebsd.mynet' is not allowed to connect to this MySQL server'
+ < DEBUG > Generate defauts file for MySQL client option --defaults-file: /root/.my.cnf.
+ < DEBUG > Delete anonymous database user.
+ < DEBUG > Generate sample SQL templates.
+ < DEBUG > Create database: vmail.
+ < DEBUG > Initialize database: vmail.
+ < DEBUG > Add first domain and postmaster@ user.
[ INFO ] Setup daily cron job to backup SQL databases with /var/vmail/backup/backup_mysql.sh
[ INFO ] Configure Postfix (MTA).
+ < 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/
postfix_enable:  -> YES
sendmail_enable: NO -> NO
sendmail_submit_enable: YES -> NO
sendmail_outbound_enable: YES -> NO
sendmail_msp_queue_enable: YES -> NO
daily_clean_hoststat_enable:  -> NO
daily_status_mail_rejects_enable:  -> NO
daily_status_include_submit_mailq:  -> NO
daily_submit_queuerun:  -> NO
+ < DEBUG > Configure Postfix for SQL/LDAP lookup.
+ < DEBUG > Enable postscreen service.
+ < DEBUG > Comment out 'smtp inet ... smtpd' service in /usr/local/etc/postfix/master.cf.
+ < DEBUG > Uncomment the new 'smtpd pass ... smtpd' service in /usr/local/etc/postfix/master.cf.
+ < DEBUG > Uncomment the new smtp inet ... postscreen service in /usr/local/etc/postfix/master.cf.
+ < DEBUG > Uncomment the new 'tlsproxy unix ... tlsproxy' service in /usr/local/etc/postfix/master.cf.
+ < DEBUG > Uncomment the new 'dnsblog unix ... dnsblog' service in /usr/local/etc/postfix/master.cf.
+ < DEBUG > Update /usr/local/etc/postfix/main.cf to enable postscreen.
+ < DEBUG > Create /var/spool/postfix//var/db/postfix/postscreen_cache.db.
[ INFO ] Configure Dovecot (POP3/IMAP/Managesieve/LMTP/LDA).
+ < DEBUG > Copy sample Dovecot config file: /root/iRedMail-0.9.6/samples/dovecot/dovecot22.conf -> /usr/local/etc/dovecot/dovecot.conf
+ < DEBUG > Configure dovecot: /usr/local/etc/dovecot/dovecot.conf.
+ < DEBUG > Copy global sieve filter rule file: /var/vmail/sieve/dovecot.sieve.
+ < DEBUG > Enable dovecot SASL support in postfix: /usr/local/etc/postfix/main.cf.
+ < DEBUG > Create directory for Dovecot plugin: Expire.
+ < DEBUG > Configure Dovecot logging.
+ < 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 > Setting logrotate for dovecot log file.
ln: /usr/lib/sendmail: Read-only file system
dovecot_enable:  -> YES
[ INFO ] Configure ClamAV (anti-virus toolkit).
+ < DEBUG > Configure ClamAV: /usr/local/etc/clamd.conf.
+ < DEBUG > Configure freshclam: /usr/local/etc/freshclam.conf.
+ < DEBUG > Add clamav user to amavid group.
clamav_clamd_enable:  -> YES
clamav_freshclam_enable:  -> YES
[ INFO ] Configure Amavisd-new (interface between MTA and content checkers).
+ < DEBUG > Configure amavisd-new: /usr/local/etc/amavisd.conf.
+ < DEBUG > Generate DKIM pem files: /var/lib/dkim/freebsd.mynet.pem.
+ < DEBUG > Setting cron job for vmail user to delete virus mail per month.
+ < DEBUG > Import Amavisd database and privileges.
amavisd_enable:  -> YES
amavisd_pidfile:  -> /var/amavis/amavisd.pid
amavis_milter_enable:  -> NO
amavis_p0fanalyzer_enable:  -> NO
[ INFO ] Configure SpamAssassin (content-based spam filter).
+ < DEBUG > Copy sample SpamAssassin config file: /root/iRedMail-0.9.6/samples/spamassassin/local.cf -> /usr/local/etc/mail/spamassassin/local.cf.
+ < DEBUG > Enable crontabs for SpamAssassin update.
+ < DEBUG > Compile SpamAssassin ruleset into native code.
Feb 19 15:54:57.420 [87124] info: generic: base extraction starting. this can take a while...
cd /
rm -rf /tmp/.spamassassin87124RtjjObtmp
[ INFO ] Configure iRedAPD (postfix policy daemon).
+ < DEBUG > Extracting: iRedAPD-2.0.tar.bz2 -> /opt
+ < DEBUG > Configure iRedAPD.
+ < DEBUG > Make iredapd start after system startup.
+ < DEBUG > Import iRedAPD database template.
iredapd_enable:  -> YES
[ INFO ] Configure iRedAdmin (official web-based admin panel).
+ < DEBUG > Extracting: iRedAdmin-0.7.tar.bz2 -> /usr/local/www
+ < DEBUG > Set correct permission for iRedAdmin: /usr/local/www/iRedAdmin-0.7.
+ < 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 Roundcube webmail.
+ < DEBUG > Import SQL database and privileges for Roundcubemail.
+ < DEBUG > Configure database for Roundcubemail: /usr/local/www/roundcube/config/*.
+ < DEBUG > Setup daily cron job to keep SQL database clean.
+ < DEBUG > Config plugin: managesieve.
+ < DEBUG > Config plugin: password.
+ < DEBUG > Config plugin: enigma.
[ INFO ] Configure SOGo Groupware (Webmail, Calendar, Address Book, ActiveSync).
+ < DEBUG > Initialize SOGo database.
memcached_enable:  -> YES
memcached_flags:  -> -l 10.1.2.202
sogod_enable:  -> YES
sogod not running? (check /var/run/sogo/sogo.pid).
[ INFO ] Configure Awstats (logfile analyzer for mail and web server).
+ < DEBUG > Generate apache config file for awstats: /usr/local/etc/nginx/conf.d/awstats.conf.
+ < DEBUG > Create directory used to store static statistics web pages: /usr/local/www/awstats-statistics
+ < DEBUG > Generate htpasswd file: /usr/local/etc/nginx/awstats.users.
+ < DEBUG > Config awstats to analyze apache web access log: /usr/local/www/awstats/cgi-bin/awstats.web.conf.
+ < DEBUG > Config awstats to analyze postfix mail log: /usr/local/www/awstats/cgi-bin/awstats.smtp.conf.
+ < DEBUG > Setup crontab jobs for awstats.
+ < DEBUG > Mail sensitive administration info to postmaster@freebsd.mynet.
+ < DEBUG > Set file permission to 0600: /var/cron/tabs/root.
+ < DEBUG > Set file permission to 0600: /var/cron/tabs/amavis.
+ < DEBUG > Set file permission to 0600: /var/cron/tabs/sogod.
[ INFO ] Updating SpamAssassin rules (sa-update), please wait ...
gpg: Warning: using insecure memory!
[ INFO ] Compiling SpamAssassin rulesets (sa-compile), please wait ...
Feb 19 15:55:10.610 [87741] info: generic: base extraction starting. this can take a while...
Feb 19 15:55:10.621 [87741] info: generic: extracting from rules of type body_0
^M  0% [                                           ]   0.00 rules/sec --m--s LEFT
zoom: rule __FOR_SALE_PRC_100K will loop on SpamAssassin older than 3.3.2 running under Perl 5.12 or older, Bug 6558
^M  4% [=                                          ]  45.50 rules/sec 00m10s LEFT
zoom: rule __FOR_SALE_PRC_10K will loop on SpamAssassin older than 3.3.2 running under Perl 5.12 or older, Bug 6558

zoom: rule __PILL_PRICE_02 will loop on SpamAssassin older than 3.3.2 running under Perl 5.12 or older, Bug 6558
^M  9% [====                                       ]  49.70 rules/sec 00m09s LEFT
zoom: rule __PILL_PRICE_01 will loop on SpamAssassin older than 3.3.2 running under Perl 5.12 or older, Bug 6558

zoom: rule __FOR_SALE_OBO will loop on SpamAssassin older than 3.3.2 running under Perl 5.12 or older, Bug 6558
^M 15% [======                                     ]  55.71 rules/sec 00m08s LEFT^M 21% [=========                                  ]  54.84 rules/sec 00m07s LEFT^M 26% [===========                                ]  54.98 rules/sec 00m06s LEFT^M 31% [=============                              ]  52.88 rules/sec 00m06s LEFT^M 37% [================                           ]  57.14 rules/sec 00m05s LEFT^M 42% [==================                         ]  52.33 rules/sec 00m05s LEFT
zoom: rule __FOR_SALE_NET will loop on SpamAssassin older than 3.3.2 running under Perl 5.12 or older, Bug 6558

zoom: rule __LARGE_PERCENT_AFTER will loop on SpamAssassin older than 3.3.2 running under Perl 5.12 or older, Bug 6558
^M 48% [====================                       ]  56.16 rules/sec 00m04s LEFT^M 51% [======================                     ]  45.91 rules/sec 00m04s LEFT^M 57% [========================                   ]  52.90 rules/sec 00m04s LEFT^M 63% [===========================                ]  53.21 rules/sec 00m03s LEFT^M 68% [=============================              ]  55.49 rules/sec 00m02s LEFT
zoom: rule __FOR_SALE_PRC_1K will loop on SpamAssassin older than 3.3.2 running under Perl 5.12 or older, Bug 6558
^M 74% [===============================            ]  55.65 rules/sec 00m02s LEFT^M 79% [==================================         ]  56.71 rules/sec 00m01s LEFT^M 85% [====================================       ]  57.86 rules/sec 00m01s LEFT
zoom: rule __FOR_SALE_LTP will loop on SpamAssassin older than 3.3.2 running under Perl 5.12 or older, Bug 6558
^M 91% [=======================================    ]  55.31 rules/sec 00m00s LEFT^M 97% [=========================================  ]  52.54 rules/sec 00m00s LEFT^M100% [===========================================]  54.11 rules/sec 00m09s DONE
^M  0% [                                           ]   0.00 bases/sec --m--s LEFT^M  6% [==                                         ] 313.67 bases/sec 00m07s LEFT^M 12% [=====                                      ] 304.85 bases/sec 00m06s LEFT^M 17% [=======                                    ] 264.24 bases/sec 00m06s LEFT^M 22% [=========                                  ] 245.99 bases/sec 00m06s LEFT^M 36% [===============                            ] 443.46 bases/sec 00m04s LEFT^M 48% [====================                       ] 493.26 bases/sec 00m03s LEFT^M 56% [========================                   ] 431.41 bases/sec 00m02s LEFT^M 63% [===========================                ] 382.69 bases/sec 00m02s LEFT^M 68% [=============================              ] 318.32 bases/sec 00m02s LEFT^M 76% [=================================          ] 353.78 bases/sec 00m01s LEFT^M 82% [===================================        ] 297.71 bases/sec 00m01s LEFT^M 92% [=======================================    ] 380.51 bases/sec 00m00s LEFT^M 96% [=========================================  ] 280.88 bases/sec 00m00s LEFT^M100% [===========================================] 344.33 bases/sec 00m06s DONE
Feb 19 15:55:27.082 [87741] info: body_0: 1140 base strings extracted in 17 seconds
cd /tmp/.spamassassin87741ogMfhotmp
reading bases_body_0.in
cd Mail-SpamAssassin-CompiledRegexps-body_0
re2c -i -b -o scanner1.c scanner1.re
re2c -i -b -o scanner2.c scanner2.re
re2c -i -b -o scanner3.c scanner3.re
re2c -i -b -o scanner4.c scanner4.re
re2c -i -b -o scanner5.c scanner5.re
re2c -i -b -o scanner6.c scanner6.re
/usr/local/bin/perl5 Makefile.PL PREFIX=/tmp/.spamassassin87741ogMfhotmp/ignored INSTALLSITEARCH=/var/db/spamassassin/compiled/5.024/3.004001
Generating a Unix-style Makefile
Writing Makefile for Mail::SpamAssassin::CompiledRegexps::body_0
Writing MYMETA.yml and MYMETA.json
make
cp body_0.pm blib/lib/Mail/SpamAssassin/CompiledRegexps/body_0.pm
Running Mkbootstrap for Mail::SpamAssassin::CompiledRegexps::body_0 ()
chmod 644 "body_0.bs"
"/usr/local/bin/perl5" "/usr/local/lib/perl5/5.24/ExtUtils/xsubpp"  -typemap "/usr/local/lib/perl5/5.24/ExtUtils/typemap"  body_0.xs > body_0.xsc && mv body_0.xsc body_0.c
cc -c    -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_FORTIFY_SOURCE=2 -O2 -pipe -fstack-protector -fno-strict-aliasing    -DVERSION=\"1.0\"  -DXS_VERSION=\"1.0\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.24/mach/CORE"   body_0.c
cc -c    -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_FORTIFY_SOURCE=2 -O2 -pipe -fstack-protector -fno-strict-aliasing    -DVERSION=\"1.0\"  -DXS_VERSION=\"1.0\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.24/mach/CORE"   scanner1.c
cc -c    -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_FORTIFY_SOURCE=2 -O2 -pipe -fstack-protector -fno-strict-aliasing    -DVERSION=\"1.0\"  -DXS_VERSION=\"1.0\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.24/mach/CORE"   scanner2.c
cc -c    -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_FORTIFY_SOURCE=2 -O2 -pipe -fstack-protector -fno-strict-aliasing    -DVERSION=\"1.0\"  -DXS_VERSION=\"1.0\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.24/mach/CORE"   scanner3.c
cc -c    -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_FORTIFY_SOURCE=2 -O2 -pipe -fstack-protector -fno-strict-aliasing    -DVERSION=\"1.0\"  -DXS_VERSION=\"1.0\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.24/mach/CORE"   scanner4.c
cc -c    -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_FORTIFY_SOURCE=2 -O2 -pipe -fstack-protector -fno-strict-aliasing    -DVERSION=\"1.0\"  -DXS_VERSION=\"1.0\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.24/mach/CORE"   scanner5.c
cc -c    -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_FORTIFY_SOURCE=2 -O2 -pipe -fstack-protector -fno-strict-aliasing    -DVERSION=\"1.0\"  -DXS_VERSION=\"1.0\" -DPIC -fPIC "-I/usr/local/lib/perl5/5.24/mach/CORE"   scanner6.c
rm -f blib/arch/auto/Mail/SpamAssassin/CompiledRegexps/body_0/body_0.so
cc  -shared  -L/usr/local/lib/perl5/5.24/mach/CORE -lperl -L/usr/local/lib -fstack-protector body_0.o  scanner1.o  scanner2.o  scanner3.o  scanner4.o  scanner5.o  scanner6.o  -o blib/arch/auto/Mail/SpamAssassin/CompiledRegexps/body_0/body_0.so     
    chmod 755 blib/arch/auto/Mail/SpamAssassin/CompiledRegexps/body_0/body_0.so
"/usr/local/bin/perl5" -MExtUtils::Command::MM -e 'cp_nonempty' -- body_0.bs blib/arch/auto/Mail/SpamAssassin/CompiledRegexps/body_0/body_0.bs 644
Manifying 1 pod document
make install
Running Mkbootstrap for Mail::SpamAssassin::CompiledRegexps::body_0 ()
chmod 644 "body_0.bs"
Manifying 1 pod document
Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
Installing /var/db/spamassassin/compiled/5.024/3.004001/auto/Mail/SpamAssassin/CompiledRegexps/body_0/body_0.so
Installing /var/db/spamassassin/compiled/5.024/3.004001/Mail/SpamAssassin/CompiledRegexps/body_0.pm
Installing /tmp/.spamassassin87741ogMfhotmp/ignored/lib/perl5/site_perl/man/man3/Mail::SpamAssassin::CompiledRegexps::body_0.3
Appending installation info to /tmp/.spamassassin87741ogMfhotmp/ignored/lib/perl5/5.24/mach/perllocal.pod
cp /tmp/.spamassassin87741ogMfhotmp/bases_body_0.pl /var/db/spamassassin/compiled/5.024/3.004001/bases_body_0.pl
cd /
rm -rf /tmp/.spamassassin87741ogMfhotmp
[ 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 >    WEB_SERVER=NGINX
+ < DEBUG >    ROUNDCUBE=YES
+ < DEBUG >    SOGO=YES
+ < DEBUG >    AWSTATS=YES
+ < DEBUG >    FAIL2BAN=
+ < DEBUG >    IREDADMIN=YES
+ < DEBUG >

4

Re: Installation poblem on FreeBSD 10.3

javon wrote:

+ < DEBUG > Sleep 10 seconds for MySQL daemon initialization ...
mysqladmin: [Warning] Using a password on the command line interface can be insecure.
^Gmysqladmin: connect to server at '10.1.2.202' failed

This is the root cause.

Is it possible to restore this Jail to a fresh/clean OS, and give me direct ssh access with root privilege to install iRedMail? i'd like to reproduce this issue and figure it out.

5

Re: Installation poblem on FreeBSD 10.3

It should not be a problem to give you an access to this jail. It's testing system.
But if you want new clean jail on the same host, it's not a problem as well.

6

Re: Installation poblem on FreeBSD 10.3

I need a fresh new jail like this one. So, please show me the command you used to install iRedMail inside jail, hope I can reproduce this issue myself, then hopefully we can figure out the cause and fix it.

7 (edited by DaveQB 2017-02-27 07:48:19)

Re: Installation poblem on FreeBSD 10.3

I have the exact same issue trying to install on a clean jail on a 11.0 FreeBSD server.

When running:

 

mysql -h 127.0.0.1 -p

I get the error that:

   

Host 'iredmail.rizal' is not allowed to connect to this MySQL server

I have this in my hosts files:

 

10.10.10.10              iredmail.rizal

And mysqld is listening on 10.10.10.10

 

mysql    mysqld     86914 32 tcp4   10.10.10.10:3306        *:*

So I tried commenting out my the line in my hosts file and adding my hostname to the 127.0.0.1 line:

 

127.0.0.1               iredmail.rizal localhost

Now trying to connect I get the same error but this time referring to the host name of my IP from a reverse DNS look up.

So then I tried:

 

mysql -h localhost -p

And get:

 

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

I have triple checked the password.
Starting mysql without grant tables I am able to get basic access.
Looking at the users, I get:

+-----------+------------------+----------------+
| User      | password_expired | account_locked |
+-----------+------------------+----------------+
| root      | Y                | N              |
| mysql.sys | N                | Y              |
+-----------+------------------+----------------+

8

Re: Installation poblem on FreeBSD 10.3

Hi @DaveQB,

is it possible to give me a fresh/new jail system for testing? I'd like to reproduce this issue and (hopefully) fix it. Or, could you please try this patch before running iRedMail installer?

diff -r 2fe12d9e3b2e iRedMail/samples/mysql/sql/remote_grant_permission.sql
--- a/samples/mysql/sql/remote_grant_permission.sql    Sat Feb 25 23:27:24 2017 +0800
+++ b/samples/mysql/sql/remote_grant_permission.sql    Mon Feb 27 17:26:37 2017 +0800
@@ -4,7 +4,7 @@
 
 -- Allow access from MYSQL_GRANT_HOST with password
 GRANT ALL PRIVILEGES ON *.* TO 'PH_MYSQL_ROOT_USER'@'PH_MYSQL_GRANT_HOST';
--- GRANT ALL PRIVILEGES ON *.* TO 'PH_MYSQL_ROOT_USER'@'PH_HOSTNAME';
+GRANT ALL PRIVILEGES ON *.* TO 'PH_MYSQL_ROOT_USER'@'PH_HOSTNAME';
 
 -- Allow GRANT privilege
 UPDATE user SET Grant_priv='Y' WHERE User='PH_MYSQL_ROOT_USER' AND Host='PH_MYSQL_GRANT_HOST';

9 (edited by DaveQB 2017-03-05 09:19:38)

Re: Installation poblem on FreeBSD 10.3

Thanks ZhangHuangbin for your prompt response.
Sorry for my slow response.

I thought I would try you patch first and then setup a jail for you if the patch doesn't succeed. So I setup a clean jail, unpacked the install files and applied your patch. I then started to install and hit this straight away (which I did last time and I remember now commenting out this check in the installer script, maybe the root of my problems).

<< ERROR >> Please configure a fully qualified domain name (FQDN) in /etc/hosts before we go further.

Example:

127.0.0.1   mail.iredmail.org mail localhost

I had this in my hosts file (of course with my servers hostname). But I did find that 'hostname -f' still didn't return a FQDN. I found that jails need to have their FQDN set in their config file:

/usr/local/etc/ezjail/iredmail

With this line:

export jail_iredmail_hostname="iredmail.rizal"

The installer stopped mid way with the error about arj. So I installed that (pkg install arj) then continued. It all finished and I found there was an error line near the end saying "can't connect to clamd". Also nginx and php-fpm were not running. I hadn't restarted the jail yet, but started nginx and php-fpm and got a connection, but a 502 gateway error.

So I restarted the jail and tried to connect over https to the admin page and got the "internal server error" message. Checked /var/log/uwsgi-iredadmin.log and found this:

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/web/application.py", line 237, in process
    return p(lambda: process(processors))
  File "/usr/local/lib/python2.7/site-packages/web/session.py", line 84, in _processor
    self._cleanup()
  File "/usr/local/lib/python2.7/site-packages/web/session.py", line 172, in _cleanup
    self.store.cleanup(timeout)
  File "/usr/local/lib/python2.7/site-packages/web/session.py", line 319, in cleanup
    self.db.delete(self.table, where="$last_allowed_time > atime", vars=locals())
  File "/usr/local/lib/python2.7/site-packages/web/db.py", line 916, in delete
    db_cursor = self._db_cursor()
  File "/usr/local/lib/python2.7/site-packages/web/db.py", line 570, in _db_cursor
    return self.ctx.db.cursor()
  File "/usr/local/lib/python2.7/site-packages/web/db.py", line 511, in _getctx
    self._load_context(self._ctx)
  File "/usr/local/lib/python2.7/site-packages/web/db.py", line 522, in _load_context
    ctx.db = self._connect(self.keywords)
  File "/usr/local/lib/python2.7/site-packages/web/db.py", line 550, in _connect
    return self.db_module.connect(**keywords)
  File "/usr/local/lib/python2.7/site-packages/MySQLdb/__init__.py", line 81, in Connect
    return Connection(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 193, in __init__
    super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (1130, "Host 'mail.dward.us' is not allowed to connect to this MySQL server")

iredmail.rizal [pid: 341|app: 0|req: 2/2] 10.3.3.14 () {50 vars in 767 bytes} [Sun Mar  5 11:27:14 2017] GET /iredadmin/ => generated 21 bytes in 1 msecs (HTTP/1.1 500) 1 headers in 63 bytes (2 switches on core 0)

mail.dward.us is the domain I added in the installer. I restarted mysql with --skip-grant-tables and --skip-networking and looked up the configured users and hosts:

echo 'select User,Host from user\G' |mysql -u root mysql -h localhost
*************************** 1. row ***************************
User: mysql.sys
Host: localhost
*************************** 2. row ***************************
User: root
Host: localhost

So there is no mention of a particular host that the root user is only allowed to connect from. Just localhost.

I then looked in hosts file and found that mail.dward.us has been inserted inplace of this servers FQDN. Changed that and restarted the jail.

Still no luck, now just the same error but different hostname:

mysql -u root mysql             
ERROR 1130 (HY000): Host 'iredmail.rizal' is not allowed to connect to this MySQL server

So I changed 127.0.0.1 to just localhost in the hosts file, restarted and no better:

mysql -u root mysql -p
Enter password:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

I can't even see the grans for user root as the only way I can access the mysql service is with --skip-grant-tables

root@localhost [mysql]> show grants for  'root'@'localhost';
ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

I am not sure how you have setup the permissions for the root user. From what I can see, root from 'localhost' should be allowed.

I'll setup a clean jail for you. PM me please.

Thank you again for your help.

10

Re: Installation poblem on FreeBSD 10.3

Dear javon, DaveQB,

This issue has been fixed in iRedMail, and we repacked iRedMail-0.9.6 with this fix. You can download iRedMail-0.9.6 and try again:
http://www.iredmail.org/download.html

Thanks for the feedback and patience.

11

Re: Installation poblem on FreeBSD 10.3

Hi,
thanks, I confirm it works now.