1

Topic: FreeBSD

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

Dear developers! when fix errors with freebsd? I really need iReadMail !!!!!!!!!!!!

----

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

2

Re: FreeBSD

Working on it, almost done. Please be patient.
Would you like to help test it when i got it working?

3

Re: FreeBSD

Just want to let you know, i committed several fixes for FreeBSD, it should be ok now on FreeBSD (tested on FreeBSD 9.1, with ezjail and latest ports tree). You can check out the latest source code and try it on FreeBSD with the latest ports tree.

Check out the latest source code of iRedMail here:
https://bitbucket.org/zhb/iredmail/overview

If it works for you, i'm willing to repack iRedMail-0.8.6.

4

Re: FreeBSD

Hi! I'm trying. I will inform you about the results. thank you!

5

Re: FreeBSD

Hi @3m,

I fixed another issue. All ports have to be compiled and installed with command command line option 'DISABLE_MAKE_JOBS=yes'. You can replace line 'make install clean' by below one:

make DISABLE_MAKE_JOBS=yes install clean

6

Re: FreeBSD

I've got about the same issues as 3m.
Trying to install by bah command.
Is this issue already solved?
Or how can i reinstall by another command?

7

Re: FreeBSD

Trying to install by bah command. https://bitbucket.org/zhb/iredmail/overview

===>  Installing for py27-MySQLdb-1.2.3_2
===>   py27-MySQLdb-1.2.3_2 depends on file: /usr/local/bin/easy_install-2.7 - found
===>   py27-MySQLdb-1.2.3_2 depends on file: /usr/local/bin/python2.7 - found
===>   Generating temporary packing list
===>  Checking if databases/py-MySQLdb already installed
===>   py27-MySQLdb-1.2.3_2 is already installed
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of databases/py-MySQLdb
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** [check-already-installed] Error code 1

REINSTALL
Stop in /usr/ports/databases/py-MySQLdb.
< ERROR > Port was not success installed, please fix it manually and then re-execute this script.
root@test:~/iRedMail #

/root/iRedMail/functions/packages_freebsd.sh: line 903: cd: /usr/ports/www/mod_wsgi: No such file or directory
make: don't know how to make clean. Stop
make: don't know how to make install. Stop
< ERROR > Port was not success installed, please fix it manually and then re-execute this script.
root@test:~/iRedMail

RENAMED port /usr/ports/www/mod_wsgi2 to /usr/ports/www/mod_wsgi and try agen

RESULT!!!
********************************************************************
* Start iRedMail Configurations
********************************************************************
< INFO > Create self-signed SSL certification files.
< INFO > Create required system accounts: vmail, iredapd, iredadmin.
< INFO > Configure Apache web server and PHP.
< INFO > Configure MySQL database server.
Can't open /var/db/mysql/my.cnf: No such file or directory.
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (61)
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (61)
< INFO > Configure Postfix (Message Transfer Agent).
< INFO > Configure Cluebringer (postfix policy server).
ERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1' (61)
< INFO > Configure Dovecot-2 (pop3/imap/managesieve server).
< INFO > Configure ClamAV (anti-virus toolkit).
< INFO > Configure Amavisd-new (interface between MTA and content checkers).
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
< INFO > Configure SpamAssassin (content-based spam filter).
< INFO > Configure iRedAPD (postfix policy daemon).
< INFO > Configure iRedAdmin (official web-based admin panel).
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
< INFO > Configure Awstats (logfile analyzer for mail and web server).
< INFO > Configure Roundcube webmail.
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
< INFO > Configure phpMyAdmin (web-based MySQL management tool).

*************************************************************************
* iRedMail-0.8.6 installation and configuration complete.
*************************************************************************

< INFO > Mail sensitive administration info to postmaster@test.ua.
< INFO > Updating SpamAssassin rules (sa-update), please wait ...
< INFO > Compiling SpamAssassin rulesets (sa-compile), please wait ...
< INFO > Updating ClamAV database (freshclam), please wait ...
ClamAV update process started at Thu Dec 26 15:21:36 2013

8

Re: FreeBSD

I'm testing, again.

Tested so many times these days, it takes several hours each time. I really don't like installing packages this way. sad

9

Re: FreeBSD

P.S. installation done without replacement on make DISABLE_MAKE_JOBS=yes install clean

10

Re: FreeBSD

with the function make DISABLE_MAKE_JOBS=yes install clean  works???

11

Re: FreeBSD

Dear Zhang! road I followed your recommendations, in the file / root / iRedMail / functions / packages_freebsd.sh corrected with "make install clean" to "make DISABLE_MAKE_JOBS = yes install clean" installation logs, boot log FreeBSD 9.2 and mail.log

********************************************************************
* Start iRedMail Configurations
********************************************************************
< INFO > Create self-signed SSL certification files.
< INFO > Create required system accounts: vmail, iredapd, iredadmin.
< INFO > Configure Apache web server and PHP.
< INFO > Configure MySQL database server.
Can't open /var/db/mysql/my.cnf: No such file or directory.
< INFO > Configure Postfix (Message Transfer Agent).
< INFO > Configure Cluebringer (postfix policy server).
< INFO > Configure Dovecot-2 (pop3/imap/managesieve server).
< INFO > Configure ClamAV (anti-virus toolkit).
< INFO > Configure Amavisd-new (interface between MTA and content checkers).
< INFO > Configure SpamAssassin (content-based spam filter).
< INFO > Configure iRedAPD (postfix policy daemon).
< INFO > Configure iRedAdmin (official web-based admin panel).
< INFO > Configure Awstats (logfile analyzer for mail and web server).
< INFO > Configure Roundcube webmail.
< INFO > Configure phpMyAdmin (web-based MySQL management tool).

*************************************************************************
* iRedMail-0.8.6 installation and configuration complete.
*************************************************************************

< INFO > Mail sensitive administration info to postmaster@test.ua.
< INFO > Updating SpamAssassin rules (sa-update), please wait ...
< INFO > Compiling SpamAssassin rulesets (sa-compile), please wait ...
< INFO > Updating ClamAV database (freshclam), please wait ...
ClamAV update process started at Fri Dec 27 13:02:38 2013
connect_error: getsockopt(SO_ERROR): fd=4 error=61: Connection refused
Can't connect to port 80 of host database.clamav.net (IP: 213.133.110.235)
Trying host database.clamav.net (212.227.138.145)...
Downloading main.cvd [100%]
main.cvd updated (version: 55, sigs: 2424225, f-level: 60, builder: neo)
Downloading daily.cvd [100%]
daily.cvd updated (version: 18292, sigs: 624744, f-level: 63, builder: neo)
Downloading bytecode.cvd [100%]
bytecode.cvd updated (version: 235, sigs: 44, f-level: 63, builder: dgoddard)
Database updated (3049013 signatures) from database.clamav.net (IP: 212.227.138.145)
WARNING: Clamd was NOT notified: Can't connect to clamd through /var/run/clamav/clamd.sock
connect(): No such file or directory
********************************************************************
* URLs of installed web applications:
*
* - Webmail: httpS://test.km/mail/
* - Admin Panel (iRedAdmin): httpS://test.km/iredadmin/
*   + Username: postmaster@test.ua, Password: 123
*

********************************************************************
* Congratulations, mail server setup completed successfully. Please
* read below file for more information:
*
*   - /root/iRedMail/iRedMail.tips
*
* And it's sent to your mail account .
*
* Please reboot your system to enable mail services.
*
********************************************************************
root@test:~/iRedMail #

boot log:
STARTING IREAPD... eval /usr/local/bin/python 2: not found

mail.log
Dec 27 14:03:45 test postfix/smtpd[1383]: disconnect from localhost[127.0.0.1]
Dec 27 14:05:49 test postfix/smtpd[1389]: connect from localhost[127.0.0.1]
Dec 27 14:05:49 test postfix/smtpd[1389]: warning: connect to 127.0.0.1:7777: Connection refused
Dec 27 14:05:49 test postfix/smtpd[1389]: warning: problem talking to server 127.0.0.1:7777: Connection refused
Dec 27 14:05:50 test postfix/smtpd[1389]: warning: connect to 127.0.0.1:7777: Connection refused
Dec 27 14:05:50 test postfix/smtpd[1389]: warning: problem talking to server 127.0.0.1:7777: Connection refused
Dec 27 14:05:50 test postfix/smtpd[1389]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 451 4.3.5 Server configuration problem; from=<post@ch3.com.ua> to=<master@ch3.com.ua> proto=ESMTP helo=<192.168.0.222>
Dec 27 14:05:50 test roundcube: SMTP Error: SMTP error: Failed to add recipient 'master@ch3.com.ua' in /usr/local/www/roundcube/program/include/rcmail.php on line 1035 (POST /mail/?_unlock=loading1388145949280&_lang=undefined?_task=mail&_action=send)
Dec 27 14:05:50 test postfix/smtpd[1389]: disconnect from localhost[127.0.0.1]

thanks!!!

12

Re: FreeBSD

Zhang! I want to help you and be a beta tester of iRedMail for FreeBSD.

13

Re: FreeBSD

===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** [do-build] Error code 1

Stop in /usr/ports/security/cyrus-sasl2.
*** [lib-depends] Error code 1


********************************************************************
* Start iRedMail Configurations
********************************************************************
< INFO > Create self-signed SSL certification files.
< INFO > Create required system accounts: vmail, iredapd, iredadmin.
< INFO > Configure Apache web server and PHP.
< INFO > Configure LDAP server: OpenLDAP.
ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)
ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)
< INFO > Configure Postfix (Message Transfer Agent).
< INFO > Configure Cluebringer (postfix policy server).
ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)
< INFO > Configure Dovecot-2 (pop3/imap/managesieve server).
< INFO > Configure ClamAV (anti-virus toolkit).
< INFO > Configure Amavisd-new (interface between MTA and content checkers).
ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)
< INFO > Configure SpamAssassin (content-based spam filter).
< INFO > Configure iRedAPD (postfix policy daemon).
< INFO > Configure iRedAdmin (official web-based admin panel).
ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)
ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)
< INFO > Configure Awstats (logfile analyzer for mail and web server).
< INFO > Configure Roundcube webmail.
ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)
< INFO > Configure phpLDAPadmin (web-based LDAP management tool).
< INFO > Configure phpMyAdmin (web-based MySQL management tool).

*************************************************************************
* iRedMail-0.8.6 installation and configuration complete.
*************************************************************************

< INFO > Mail sensitive administration info to postmaster@test.ua.
< INFO > Updating SpamAssassin rules (sa-update), please wait ...
< INFO > Compiling SpamAssassin rulesets (sa-compile), please wait ...
< INFO > Updating ClamAV database (freshclam), please wait ...
ClamAV update process started at Fri Dec 27 23:19:42 2013
nonblock_recv: recv timing out (30 secs)
WARNING: getfile: Error while reading database from database.clamav.net (IP: 88.198.17.100): Operation now in progress
WARNING: Can't download main.cvd from database.clamav.net
Trying again in 5 secs...
ClamAV update process started at Fri Dec 27 23:20:17 2013
Downloading main.cvd [100%]
main.cvd updated (version: 55, sigs: 2424225, f-level: 60, builder: neo)
Downloading daily.cvd [100%]
daily.cvd updated (version: 18294, sigs: 625814, f-level: 63, builder: neo)
Downloading bytecode.cvd [100%]
bytecode.cvd updated (version: 235, sigs: 44, f-level: 63, builder: dgoddard)
Database updated (3050083 signatures) from database.clamav.net (IP: 147.229.3.144)
WARNING: Clamd was NOT notified: Can't connect to clamd through /var/run/clamav/clamd.sock
connect(): No such file or directory
********************************************************************
* URLs of installed web applications:
*
* - Webmail: httpS://test.km/mail/
* - Admin Panel (iRedAdmin): httpS://test.km/iredadmin/
*   + Username: postmaster@test.ua, Password: 123
*

********************************************************************
* Congratulations, mail server setup completed successfully. Please
* read below file for more information:
*
*   - /root/iRedMail/iRedMail.tips
*
* And it's sent to your mail account .
*
* Please reboot your system to enable mail services.
*
********************************************************************
root@test:~/iRedMail #

14

Re: FreeBSD

hello

sorry with a nutritional but also am interested in testing iredmail on freebsd, if you will need to let in remotely to the server test - no problem.

I greet

Daniel

15

Re: FreeBSD

I agree!

16

Re: FreeBSD

Dear all,

The latest development edition works on FreeBSD now, both MySQL and PostgreSQL backends are working. But unfortunately, OpenLDAP backend doesn't work since OpenLDAP service cannot be started ("bus error: 10"). I have no idea what the problem is.

So if you want to give it a try, please check out the source code of latest development edition.
https://bitbucket.org/zhb/iredmail/src/ … at=default

17

Re: FreeBSD

Please give me a direct link to download the finished files

18 (edited by src386 2013-12-31 20:25:13)

Re: FreeBSD

Hi everyone.

Thank you ZhangHuangbin, it works with devel version. I use mysql backend, I hope OpenLDAP will be back soon... smile I use FreeBSD 9.2 amd64.
@3m : https://bitbucket.org/zhb/iredmail/src/ … at=default Select "download", "branches", then select zip version wink

Note : if you tried to build iredmail 0.8.6 (stable) it's better to dot it again from scratch using devel version (In my case I use a virtual machine and took a snapshot before doing the install so it was simple to revert to a clean state).

19

Re: FreeBSD

src386 wrote:

it works with devel version. I use mysql backend, I hope OpenLDAP will be back soon... smile I use FreeBSD 9.2 amd64.

I have no idea about OpenLDAP issue, cannot start it, and the error log is useless. Didn't find useful resource with Google, i'm afraid that i'm totally lost.

Do you guys want to me repack iRedMail with this FreeBSD fix?

20 (edited by src386 2013-12-31 23:13:31)

Re: FreeBSD

ZhangHuangbin wrote:

Do you guys want to me repack iRedMail with this FreeBSD fix?

Because FreeBSD is listed in supported OS, looks like you do not have choice wink.

Sorry but new issue, I'm currently trying to run iredmail with postgresql backend, but it does not work.

root@mail:~ # /usr/local/etc/rc.d/postgresql start
postgres cannot access the server configuration file "/usr/local/pgsql/data/postgresql.conf": No such file or directory
pg_ctl: could not start server
Examine the log output.

I'll have a look to the log and try to find this postgresql.conf wink

It's in a jail.

EDIT : Is it possible to use pkgng istead of ports ? It could save you a lot of time with tests.

EDIT : Aw, it's simply because postgresql have issues with jails...
The problem is not with iredmail !

21

Re: FreeBSD

src386 wrote:

Sorry but new issue, I'm currently trying to run iredmail with postgresql backend, but it does not work.

I solved this, it's mentioned in our wiki tutorial:
http://www.iredmail.org/wiki/index.php? … eeBSD.Jail

# File: /etc/rc.conf.
# NOTE: 'mx_example_com' is hostname of the server inside Jail. The format is:
# jail_[HOST]_parameters='...'
jail_mx_example_com_parameters='allow.sysvipc=1'

Without this setting, we cannot successfully execute "/usr/local/etc/rc.d/postgresql initdb" to initialize PostgreSQL database inside Jail (it's ok without jail), it will populate files/data under /usr/local/pgsql/data/.

FreeBSD 9.1 uses 'jail_sysvipc_allow="YES"' in /etc/rc.conf, but FreeBSD 9.2 uses above one. You can try it, please let me know whether it works for you or not.

src386 wrote:

EDIT : Aw, it's simply because postgresql have issues with jails...

I always tested FreeBSD with Jail (ezjail).

src386 wrote:

EDIT : Is it possible to use pkgng istead of ports ? It could save you a lot of time with tests.

Will give it a try, i'm not yet familiar with pkgng. sad

22 (edited by src386 2014-01-02 19:02:36)

Re: FreeBSD

Thank you ZhangHuangbin.
Indeed "jail_sysvipc_allow="YES"" does not work, I will try with "jail_mx_example_com_parameters".
You can use jail -m jid=3 allow.sysvipc=1 (jid is the id you get with jls) and iredmail+postgresql will work. But you have to do it each time you start the jail...

pkgng is pretty simple, the problem is with the flags. For example php55 binary package does not support php-fpm. If you can have all packages + requirements with pkgng, just forget the ports, it will save you many hours...

Anyway mysql backend in a jail does not work. mysql-server is running, I can connect, but it seems there are no iredmail tables. I will try without jail.

EDIT : well there is a problem with p7zip_9.20.1, sometimes it fails to build. If I run iredmail install again, it works. That's weird.

23

Re: FreeBSD

src386 wrote:

Anyway mysql backend in a jail does not work. mysql-server is running, I can connect, but it seems there are no iredmail tables. I will try without jail.

EDIT : well there is a problem with p7zip_9.20.1, sometimes it fails to build. If I run iredmail install again, it works. That's weird.

Which version of iRedMail do you use? You have to check out the latest development version for FreeBSD.