1 (edited by nicolasfo 2015-07-15 15:44:08)

Topic: SOGo on external server

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: Debian 8.1 x64
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Mysql
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue: None
====

Hello,
I have to install SOGo on another server than the one where iRedMail runs on.
I set SOGo server, authentication working fine and linsting via IMAP working too.
But I can't get sending mail to work.
It work only if I set "smtpd_tls_auth_only" to "no" (in real, I comment it out) in /etc/postfix/main.cf.

So, to check, I installed another iRedMail server with SOGo choice checked and I saw that "smtpd_tls_auth_only" is still active.

What must I modify to keep TLS auth active and make it work with SOGo ?
Or does it work because SOGo and iRedMail are on the same server ?

Thanks

Nicolas

----

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

2

Re: SOGo on external server

nicolasfo wrote:

Or does it work because SOGo and iRedMail are on the same server ?

Running on same server matters. Because Postfix uses Dovecot as SASL auth server, and Dovecot treats connections from localhost as secure.

I suggest you asking in SOGo mailing list instead. I asked about smtp authentication method in mailing list before, but it didn't work at that time. Not sure whether SOGo team has improved this.

3

Re: SOGo on external server

Ok, I'll ask
Thanks
Nicolas

4

Re: SOGo on external server

Another question concerning SOGo on another server :
If I install SOGo with iRedMail, each user created under iRedAdmin is created in the vmail MySQL database and in the SOGo MySQL database too.
For the moment, I authenticate my SOGo users using LDAP (AD) database and users who don't exist in LDAP databse don't have access to SOGo.
What is the difference between an installation with or without SOGo during iRedMail install ?
I use both methods to authenticate my users in Postfix and Dovecot : MySQL and LDAP.
To be clear : I'd like to create users in my vmail and SOGo MySQL databases without installing SOGo when I install iRedMail (because I'll not use it on the iRedMail server but on a separate server)

Hope you'll understand me hmm

Thanks

Nicolas

5

Re: SOGo on external server

Seems I had to create a database called SOGo on the iRedMail server, allow remote connections from SOGo server on it and create a MySQL "view" for the "users" table from vmail.mailbox table.

Easy... lol

Nicolas

6

Re: SOGo on external server

nicolasfo wrote:

If I install SOGo with iRedMail, each user created under iRedAdmin is created in the vmail MySQL database and in the SOGo MySQL database too.

Wrong. The table in SOGo SQL database is just a VIEW (search 'mysql view' in google), it gets data from `vmail.mailbox` table.

7 (edited by nicolasfo 2015-07-15 17:41:24)

Re: SOGo on external server

Created a view called 'users' using phpmyadmin in the database vmail (found in the iRedMail + SOGo installation) :

select 
`vmail`.`mailbox`.`username` AS `c_uid`,
`vmail`.`mailbox`.`username` AS `c_name`,
`vmail`.`mailbox`.`password` AS `c_password`,
`vmail`.`mailbox`.`name` AS `c_cn`,
`vmail`.`mailbox`.`username` AS `mail`,
concat(`vmail`.`mailbox`.`storagebasedirectory`,'/',`vmail`.`mailbox`.`storagenode`,'/',`vmail`.`mailbox`.`maildir`) AS `home` from `vmail`.`mailbox` 
where (`vmail`.`mailbox`.`active` = 1)

Create and allow user (let's say 'sogo') to connect remotely to this database from a specified local IP (SOGo server).
Don't forget to make SQL server to listen on all IPs via /etc/mysql/my.cfg :

bind-address = 0.0.0.0

Then, add the SQL source in /etc/sogo/SOGo.conf :

    {
        type = sql;
        id = iRedMail source;
        viewURL = "mysql://sogo:sogo_passwd@IREDMAIL-SERVER_FQDN_OR_IP:3306/vmail/users";
        canAuthenticate = YES;
        userPasswordAlgorithm = ssha;
        prependPasswordScheme = YES;
        isAddressBook = YES;
        displayName = "SQL Source";
    }

Don't forget to add a comma between two sources (after the closing bracket of the first source) otherwise, only the second source (from the top of the conf file) will works :

SOGoUserSources = (
{
type = ldap;
blablabla
...
},
{
type = sql;
blablabla
...
}
);

That's all.

But I have a question :
What's the use for SOGo of the concat field 'home' in the view ?! Plus, this field is not declared as mandatory by SOGo documentation, so my question.

Thanks

Nicolas

8

Re: SOGo on external server

nicolasfo wrote:

What's the use for SOGo of the concat field 'home' in the view ?! Plus, this field is not declared as mandatory by SOGo documentation, so my question.

Checked SOGo installation guide, and you're right, we don't need this column. I will remove it in next iRedMail release.
Thanks for the feedback. smile

9

Re: SOGo on external server

ZhangHuangbin wrote:
nicolasfo wrote:

What's the use for SOGo of the concat field 'home' in the view ?! Plus, this field is not declared as mandatory by SOGo documentation, so my question.

Checked SOGo installation guide, and you're right, we don't need this column. I will remove it in next iRedMail release.
Thanks for the feedback. smile

You're welcome wink