1

Topic: guide on installing SOGo after installing iredmail with PostgreSQL

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

Is there any guide on how to install SOGo after installing iredmail with PostgreSQL backend on CentOS 6/7 ?

----

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

2 (edited by neel.basu 2015-06-10 21:10:51)

Re: guide on installing SOGo after installing iredmail with PostgreSQL

I've created database sogo

> createdb sogo --encoding UTF8 --template=template0

created user sogo

> create user sogo password 'password';

granted privilege on sogo

> grant all privileges on database sogo to sogo; 

granted privilege on vmail.mailbox

> \c vmail
> grant select on table mailbox to sogo;

Now I am supposed to create a view `users` on sogo database. The mysql syntax is

CREATE VIEW sogo.users (c_uid, c_name, c_password, c_cn, mail, home) AS SELECT username, username, password, name, username, CONCAT(storagebasedirectory, '/', storagenode, '/', maildir) FROM vmail.mailbox WHERE active=1;

I am not well accustomed with PostgreSQL can anyone tell me the equivalent syntax of this query in PostgreSQL ?

I am following the Tutorial for SOGo installation on mysql backend on http://www.iredmail.org/docs/sogo-centos-6-mysql.html and translating the queries to PostgreSQL.

Thank You.

3

Re: guide on installing SOGo after installing iredmail with PostgreSQL

Check iRedMail source code for reference:
https://bitbucket.org/zhb/iredmail/src/ … at=default

4 (edited by neel.basu 2015-06-11 00:40:15)

Re: guide on installing SOGo after installing iredmail with PostgreSQL

So is this the correct conversion ? (based on replacing the variables on source)

CREATE VIEW users AS SELECT * FROM dblink('host=localhost port=5432 user=postgres password=<MYPASSWORD> dbname=vmail', 'SELECT username AS c_uid, username AS c_name, password AS c_password, name AS c_cn, username AS mail, storagebasedirectory || ''/'' || storagenode || ''/'' || maildir AS home FROM mailbox WHERE active=1') AS users (c_uid VARCHAR(255), c_name VARCHAR(255), c_password VARCHAR(255), c_cn VARCHAR(255), mail VARCHAR(255), home VARCHAR(255));
ALTER TABLE users OWNER TO sogo;

What I see with \l is owner of vmail database is postgres. So I've replaced ${VMAIL_DB_ADMIN_USER} with postgres,

Is that correct ?

sogo=# \l
                               List of databases
     Name      |  Owner   | Encoding  | Collate | Ctype |   Access privileges   
---------------+----------+-----------+---------+-------+-----------------------
 amavisd       | postgres | UTF8      | C       | C     | 
 cluebringer   | postgres | UTF8      | C       | C     | 
 iredadmin     | postgres | UTF8      | C       | C     | 
 postgres      | postgres | SQL_ASCII | C       | C     | 
 roundcubemail | postgres | UTF8      | C       | C     | 
 sogo          | sogo     | UTF8      | C       | C     | 
 template0     | postgres | SQL_ASCII | C       | C     | =c/postgres          +
               |          |           |         |       | postgres=CTc/postgres
 template1     | postgres | SQL_ASCII | C       | C     | =c/postgres          +
               |          |           |         |       | postgres=CTc/postgres
 vmail         | postgres | UTF8      | C       | C     | 
(9 rows)

5

Re: guide on installing SOGo after installing iredmail with PostgreSQL

Edited the sogo.conf file. sogod service not running

[root@mx ~]# /etc/init.d/sogod status
/etc/init.d/sogod: line 73: /etc/GNUstep/GNUstep.conf: No such file or directory
/etc/init.d/sogod: line 74: /GNUstep.sh: No such file or directory
sogod.service - SYSV: SOGo is a groupware server
   Loaded: loaded (/etc/rc.d/init.d/sogod)
   Active: failed (Result: exit-code) since Wed 2015-06-10 13:05:23 EDT; 1min 46s ago
  Process: 21762 ExecStart=/etc/rc.d/init.d/sogod start (code=exited, status=1/FAILURE)

Jun 10 13:05:23 mx sogod[21762]: /etc/rc.d/init.d/sogod: line 73: /etc/GNUst...ry
Jun 10 13:05:23 mx sogod[21762]: /etc/rc.d/init.d/sogod: line 74: /GNUstep.s...ry
Jun 10 13:05:23 mx sogod[21762]: Starting SOGo:
Jun 10 13:05:23 mx runuser[21768]: pam_unix(runuser:session): session opened...0)
Jun 10 13:05:23 mx sogod[21762]: /usr/sbin/sogod: error while loading shared...ry
Jun 10 13:05:23 mx sogod[21762]: [15B blob data]
Jun 10 13:05:23 mx systemd[1]: sogod.service: control process exited, code=e...=1
Jun 10 13:05:23 mx systemd[1]: Failed to start SYSV: SOGo is a groupware server.
Jun 10 13:05:23 mx systemd[1]: Unit sogod.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.

6

Re: guide on installing SOGo after installing iredmail with PostgreSQL

Did you compile and install SOGo manually?

SOGo uses /etc/sogo/sogo.conf, not /etc/GNUstep/GNUstep.conf.

7

Re: guide on installing SOGo after installing iredmail with PostgreSQL

installed with yum

yum install sogo sope49-gdl1-mysql sogo-activesync sogo-ealarms-notify sogo-tool

8

Re: guide on installing SOGo after installing iredmail with PostgreSQL

neel.basu wrote:

/etc/init.d/sogod: line 73: /etc/GNUstep/GNUstep.conf: No such file or directory

If you're running CentOS 7, please start/stop service with systemctl, there's no /etc/init.d/sogod.

9 (edited by neel.basu 2015-06-11 23:27:07)

Re: guide on installing SOGo after installing iredmail with PostgreSQL

Jun 11 11:00:31 mx sogod[9908]: /usr/sbin/sogod: error while loading shared libraries: libgnustep-base.so.1.23: cannot open shared object file: No such file or directory

[root@mx ~]# systemctl stop sogod.service
[root@mx ~]# systemctl start sogod.service
Job for sogod.service failed. See 'systemctl status sogod.service' and 'journalctl -xn' for details.

[root@mx ~]# systemctl status sogod.service -l
sogod.service - SYSV: SOGo is a groupware server
   Loaded: loaded (/etc/rc.d/init.d/sogod)
   Active: failed (Result: exit-code) since Thu 2015-06-11 11:00:31 EDT; 1min 2s ago
  Process: 9908 ExecStart=/etc/rc.d/init.d/sogod start (code=exited, status=1/FAILURE)

Jun 11 11:00:22 mx sogod[9908]: /etc/rc.d/init.d/sogod: line 73: /etc/GNUstep/GNUstep.conf: No such file or directory
Jun 11 11:00:22 mx sogod[9908]: /etc/rc.d/init.d/sogod: line 74: /GNUstep.sh: No such file or directory
Jun 11 11:00:22 mx sogod[9908]: Starting SOGo:
Jun 11 11:00:24 mx runuser[9919]: pam_unix(runuser:session): session opened for user sogo by (uid=0)
Jun 11 11:00:31 mx sogod[9908]: /usr/sbin/sogod: error while loading shared libraries: libgnustep-base.so.1.23: cannot open shared object file: No such file or directory
Jun 11 11:00:31 mx runuser[9919]: pam_unix(runuser:session): session closed for user sogo
Jun 11 11:00:31 mx sogod[9908]: [15B blob data]
Jun 11 11:00:31 mx systemd[1]: sogod.service: control process exited, code=exited status=1
Jun 11 11:00:32 mx systemd[1]: Failed to start SYSV: SOGo is a groupware server.
Jun 11 11:00:32 mx systemd[1]: Unit sogod.service entered failed state.

Do I need to compile and make gnustep manually ? or there is a better way ?

10

Re: guide on installing SOGo after installing iredmail with PostgreSQL

bump

11

Re: guide on installing SOGo after installing iredmail with PostgreSQL

hi @neel.basu,

What's the new issue with SOGo + PGSQL? Still cannot find libgnustep-base.so.1.23?