1

Topic: installation оn Free BSD

======== Required information ====
- iRedMail version: 0.8.7
- Store mail accounts in which backend MySQL
- Linux/BSD distribution name and version: Free BSD 9.3 clean, port update
- Related log if you're reporting an issue:

====Stop in /usr/ports/www/mod_php5.
*** [fetch-recursive] Error code 1

Stop in /usr/ports/www/mod_php5.
< ERROR > Tarballs were not downloaded correctly, please fix it manually and then re-execute iRedMail.sh.
root@test:~/iRedMail-0.8.7 #

Port changed please correct the script

----

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

2

Re: installation оn Free BSD

3m wrote:

====Stop in /usr/ports/www/mod_php5.
*** [fetch-recursive] Error code 1
Stop in /usr/ports/www/mod_php5.

Could you please always show me context log? Pasted log is useless.
Since FreeBSD ports tree changed every day, a tagged iRedMail release may not work with it.

Also, did you try the latest development edition of iRedMail?

3

Re: installation оn Free BSD

==>   nginx-1.6.2,2 depends on file: /usr/local/sbin/pkg - found
=> openresty-headers-more-nginx-module-v0.25-0-g0c6e05d.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch https://github.com/openresty/headers-mo … 05d.tar.gz
Initializing download: https://github.com/openresty/headers-mo … 05d.tar.gz
Too many redirects.

=> Attempting to fetch http://distcache.FreeBSD.org/ports-dist … 05d.tar.gz
Initializing download: http://distcache.FreeBSD.org/ports-dist … 05d.tar.gz
HTTP/1.1 404 Not Found
=> Couldn't fetch it - please try to retrieve this
=> port manually into /usr/ports/distfiles/ and try again.
*** [do-fetch] Error code 1
Stop in /usr/ports/www/nginx.
*** [fetch-recursive] Error code 1

Stop in /usr/ports/www/nginx.
< ERROR > Tarballs were not downloaded correctly, please fix it manually and then re-execute iRedMail.sh.
root@test:~/iRedMail-0.8.7 #

4

Re: installation оn Free BSD

This is a port issue, not iRedMail issue.
Maybe we should remove dependence of openresty-*.

5

Re: installation оn Free BSD

Remove this dependence Please!

6

Re: installation оn Free BSD

Removed.
If you want to apply this change, open file 'functions/packages_freebsd.sh' in iRedMail development version, find 'OPTIONS_FILE_SET+=HEADERS_MORE', update it to 'OPTIONS_FILE_UNSET+=HEADERS_MORE'. then try to install iRedMail again.

7 (edited by 3m 2014-09-23 13:57:03)

Re: installation оn Free BSD

Hi Zhang! a lot of mistakes nginx dependence please correct!

8

Re: installation оn Free BSD

3m wrote:

a lot of mistakes nginx dependence please correct!

Excuse me, could you please show me more details/evidence?

9 (edited by 3m 2014-09-23 21:11:30)

Re: installation оn Free BSD

OPTIONS_FILE_UNSET+=HEADERS_MORE' corrected

Enable http_ssl module to build upstream_fair with SSL support

===>   nginx-1.6.2,2 depends on file: /usr/local/sbin/pkg - found
=> masterzen-nginx-upload-progress-module-v0.9.0-0-ga788dea.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch https://github.com/masterzen/nginx-uplo … dea.tar.gz
Initializing download: https://github.com/masterzen/nginx-uplo … dea.tar.gz
Too many redirects.

=> Attempting to fetch http://distcache.FreeBSD.org/ports-dist … dea.tar.gz
Initializing download: http://distcache.FreeBSD.org/ports-dist … dea.tar.gz
HTTP/1.1 404 Not Found
=> Couldn't fetch it - please try to retrieve this
=> port manually into /usr/ports/distfiles/ and try again.
*** [do-fetch] Error code 1

Stop in /usr/ports/www/nginx.
*** [fetch-recursive] Error code 1

Stop in /usr/ports/www/nginx.
< ERROR > Tarballs were not downloaded correctly, please fix it manually and then re-execute iRedMail.sh.
root@test:~/iRedMail-0.8.7 #

10

Re: installation оn Free BSD

I see your point. How about below patch? it disables all third-party modules.

diff -r 2d42afeacc4f iRedMail/functions/packages_freebsd.sh
--- a/iRedMail/functions/packages_freebsd.sh    Mon Sep 22 06:19:06 2014 +0800
+++ b/iRedMail/functions/packages_freebsd.sh    Tue Sep 23 22:06:00 2014 +0800
@@ -611,8 +611,8 @@
     # Nginx
     cat > /var/db/ports/www_nginx/options <<EOF
 OPTIONS_FILE_SET+=DEBUG
-OPTIONS_FILE_UNSET+=DEBUGLOG
-OPTIONS_FILE_UNSET+=FILE_AIO
+OPTIONS_FILE_SET+=DEBUGLOG
+OPTIONS_FILE_SET+=FILE_AIO
 OPTIONS_FILE_SET+=IPV6
 OPTIONS_FILE_UNSET+=GOOGLE_PERFTOOLS
 OPTIONS_FILE_SET+=HTTP
@@ -643,11 +643,11 @@
 OPTIONS_FILE_UNSET+=CACHE_PURGE
 OPTIONS_FILE_UNSET+=CTPP2
 OPTIONS_FILE_UNSET+=ECHO
-OPTIONS_FILE_SET+=HEADERS_MORE
+OPTIONS_FILE_UNSET+=HEADERS_MORE
 OPTIONS_FILE_UNSET+=HTTP_ACCEPT_LANGUAGE
 OPTIONS_FILE_UNSET+=HTTP_ACCESSKEY
 OPTIONS_FILE_UNSET+=HTTP_AUTH_DIGEST
-OPTIONS_FILE_SET+=HTTP_AUTH_LDAP
+OPTIONS_FILE_UNSET+=HTTP_AUTH_LDAP
 OPTIONS_FILE_UNSET+=HTTP_AUTH_PAM
 OPTIONS_FILE_UNSET+=HTTP_AUTH_REQ
 OPTIONS_FILE_UNSET+=HTTP_DAV_EXT
@@ -661,22 +661,22 @@
 OPTIONS_FILE_UNSET+=HTTP_REDIS
 OPTIONS_FILE_UNSET+=HTTP_RESPONSE
 OPTIONS_FILE_UNSET+=HTTP_SUBS_FILTER
-OPTIONS_FILE_SET+=HTTP_UPLOAD
-OPTIONS_FILE_SET+=HTTP_UPLOAD_PROGRESS
-OPTIONS_FILE_SET+=HTTP_UPSTREAM_FAIR
-OPTIONS_FILE_SET+=HTTP_UPSTREAM_HASH
+OPTIONS_FILE_UNSET+=HTTP_UPLOAD
+OPTIONS_FILE_UNSET+=HTTP_UPLOAD_PROGRESS
+OPTIONS_FILE_UNSET+=HTTP_UPSTREAM_FAIR
+OPTIONS_FILE_UNSET+=HTTP_UPSTREAM_HASH
 OPTIONS_FILE_UNSET+=HTTP_UPSTREAM_STICKY
-OPTIONS_FILE_SET+=HTTP_ZIP
+OPTIONS_FILE_UNSET+=HTTP_ZIP
 OPTIONS_FILE_UNSET+=ARRAYVAR
 OPTIONS_FILE_UNSET+=DRIZZLE
 OPTIONS_FILE_UNSET+=ENCRYPTSESSION
 OPTIONS_FILE_UNSET+=FORMINPUT
 OPTIONS_FILE_UNSET+=GRIDFS
-OPTIONS_FILE_SET+=ICONV
-OPTIONS_FILE_SET+=LET
+OPTIONS_FILE_UNSET+=ICONV
+OPTIONS_FILE_UNSET+=LET
 OPTIONS_FILE_UNSET+=LUA
 OPTIONS_FILE_UNSET+=MEMC
-OPTIONS_FILE_SET+=MODSECURITY
+OPTIONS_FILE_UNSET+=MODSECURITY
 OPTIONS_FILE_UNSET+=NAXSI
 OPTIONS_FILE_UNSET+=PASSENGER
 OPTIONS_FILE_UNSET+=POSTGRES

11

Re: installation оn Free BSD

nginx was downloaded! But...?

< INFO > Fetching all distfiles for port www/mod_php5 and dependencies
===> Fetching all distfiles for mod_php5-5.4.33,1 and dependencies
===>  mod_php5-5.4.33,1 is marked as broken: : Error from bsd.apache.mk. apache22 is installed (or APACHE_PORT is defined) and port requires apache.
*** [fetch] Error code 1

Stop in /usr/ports/www/mod_php5.
*** [fetch-recursive] Error code 1

Stop in /usr/ports/www/mod_php5.
< ERROR > Tarballs were not downloaded correctly, please fix it manually and then re-execute iRedMail.sh.
root@test:~/iRedMail-0.8.7 #

12

Re: installation оn Free BSD

Are you using the latest ports tree? I didn't experience this issue.

13

Re: installation оn Free BSD

Give me a link to a working version for FreeBSD

14

Re: installation оn Free BSD

Check out the latest development edition:
https://bitbucket.org/zhb/iredmail/src

I did an installation moment ago (OpenLDAP backend), works fine for me.

Important note: please update your ports tree to the latest version (portsnap fetch extract update).

15 (edited by 3m 2014-09-26 15:35:57)

Re: installation оn Free BSD

Hi Zhang! Fresh install FreeBSD 9.3 and ports, iredmail https://bitbucket.org/zhb/iredmail/get/default.tar.bz2

Configuration completed.

*************************************************************************
***************************** WARNING ***********************************
*************************************************************************
*                                                                       *
* Below file contains sensitive infomation (username/password), please  *
* do remember to *MOVE* it to a safe place after installation.          *
*                                                                       *
*   * /root/iRedMail-0.8.7/config
*                                                                       *
*************************************************************************
< Question > Continue? [y|N]y
< INFO > Ports tree: /usr/ports
< INFO > Fetching all distfiles for required ports (make fetch-recursive)
< INFO > Fetching all distfiles for port net/openldap24-sasl-client and dependencies
===> Fetching all distfiles for openldap-sasl-client-2.4.39_2 and dependencies
===>   openldap-sasl-client-2.4.39_2 depends on file: /usr/local/sbin/pkg - not found
===>    Verifying install for /usr/local/sbin/pkg in /usr/ports/ports-mgmt/pkg
You are about to convert your system to pkg while you have ports/packages
installed with the old pkg_install tools.

To switch to pkg:
    1) Install ports-mgmt/pkg
       cd ports-mgmt/pkg && make UPGRADEPKG=1 install clean
    2) Convert your package database by running pkg2ng

*** [pre-everything] Error code 1

Stop in /usr/ports/ports-mgmt/pkg.
*** [pkg-depends] Error code 1

Stop in /usr/ports/net/openldap24-sasl-client.
*** [fetch-recursive] Error code 1

Stop in /usr/ports/net/openldap24-sasl-client.
< ERROR > Tarballs were not downloaded correctly, please fix it manually and then re-execute iRedMail.sh.
root@test:~/iRedMail-0.8.7 #

16

Re: installation оn Free BSD

cd /usr/ports/ports-mgmt/pkg && make UPGRADEPKG=1 install clean && rehash solved the problem!

17

Re: installation оn Free BSD

Hi Zhang! Installation successfully. Iredadmin login attempt "Error: Password of cn=vmailadmin is incorrect.". Username and password from a file /root/iRedMail-0.8.7/iRedMail.tips

18 (edited by 3m 2014-09-29 15:51:47)

Re: installation оn Free BSD

login attempt in phpldapadmin and phpmyadmin....404 Not Found nginx