1 (edited by Thierry 2015-08-30 16:32:56)

Topic: [SOLVED]No access to email with Sogo

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

Hi,

I have bought and installed an ssl certificate, and I have followed your instruction on your wiki, and this is working.
My problem is the following one:

I have already a web server who is running on port 443, to be able to have access from outside to Sogo, I am using NAT on my adsl router to forward port 444 to 443 ip mail server ....
I have access to the login page of Sogo .... But when trying to login on it:

 root@mail:/var/log# tail -f nginx/access.log
xxx.xxx.xxx.xxx - - [28/Aug/2015:09:55:28 +0200] "GET /SOGo.woa/WebServerResources/generic.css?lm=1439265451 HTTP/1.1" 200 27517 "https://mail.domain.tld:444/SOGo/" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
xxx.xxx.xxx.xxx - - [28/Aug/2015:09:55:29 +0200] "GET /SOGo.woa/WebServerResources/btn_span_bg.png HTTP/1.1" 200 3939 "https://mail.domain.tld:444/SOGo/" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
xxx.xxx.xxx.xxx - - [28/Aug/2015:09:55:29 +0200] "GET /SOGo.woa/WebServerResources/input_bg.gif HTTP/1.1" 200 2492 "https://mail.domain.tld:444/SOGo/" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
xxx.xxx.xxx.xxx - - [28/Aug/2015:09:55:29 +0200] "GET /SOGo.woa/WebServerResources/btn_a_bg.png HTTP/1.1" 200 1019 "https://mail.domain.tld:444/SOGo/" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
xxx.xxx.xxx.xxx - - [28/Aug/2015:09:55:31 +0200] "GET /SOGo.woa/WebServerResources/prototype.js?lm=1439265454 HTTP/1.1" 200 197777 "https://mail.domain.tld:444/SOGo/" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
xxx.xxx.xxx.xxx - - [28/Aug/2015:09:55:32 +0200] "GET /SOGo.woa/WebServerResources/sogo.ico?lm=1439265451 HTTP/1.1" 200 4887 "-" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
xxx.xxx.xxx.xxx - - [28/Aug/2015:09:56:34 +0200] "GET /SOGo.woa/WebServerResources/busy.gif HTTP/1.1" 200 825 "https://mail.domain.tld:444/SOGo/" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
xxx.xxx.xxx.xxx - - [28/Aug/2015:09:56:34 +0200] "POST /SOGo/connect HTTP/1.1" 200 27 "https://mail.domain.tld:444/SOGo/" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
xxx.xxx.xxx.xxx - - [28/Aug/2015:09:56:34 +0200] "GET /SOGo/user.domain.tld HTTP/1.1" 302 0 "https://mail.domain.tld:444/SOGo/" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"
xxx.xxx.xxx.xxx - - [28/Aug/2015:09:56:34 +0200] "GET /SOGo/user.domain.tld/view HTTP/1.1" 302 0 "https://mail.domain.tld:444/SOGo/" "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)"

Error HTTP 404

https://mail.domain.ltd:444/Sogo/user%40domain.ltd

The webpage cannot be found

I have done a simple test .... If I change the NAT config, instead of "444 to 443" I use "443 to 443"  .... Things is working well, I do have access to my emails ....
There is a pb with the port other than 443 ....

Thx

----

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

2

Re: [SOLVED]No access to email with Sogo

When somebody from outside is trying to login :

Aug 28 15:26:12 sogod [7062]: |SOGo| starting method 'GET' on uri '/SOGo'
Aug 28 15:26:12 sogod [7062]: |SOGo| request took 0.002658 seconds to execute
Aug 28 15:26:12 sogod [7062]: localhost "GET /SOGo HTTP/1.0" 302 0/0 0.010 - - 0
Aug 28 15:26:12 sogod [7062]: |SOGo| starting method 'GET' on uri '/SOGo/'
2015-08-28 15:26:12.960 sogod[7062] <MySQL4Channel[0x0x7fb14624dd10] connection=0x0x7fb146188400> SQL: SELECT c_defaults FROM sogo_user_profile WHERE c_uid = 'user@domain.ltd';
2015-08-28 15:26:12.961 sogod[7062] <MySQL4Channel[0x0x7fb14624dd10] connection=0x0x7fb146188400>   query has results, entering fetch-mode.
Aug 28 15:26:12 sogod [7062]: |SOGo| request took 0.005455 seconds to execute
Aug 28 15:26:12 sogod [7062]: localhost "GET /SOGo/ HTTP/1.0" 302 0/0 0.010 - - 0
Aug 28 15:26:12 sogod [7062]: |SOGo| starting method 'GET' on uri '/SOGo/user@domain.ltd'
Aug 28 15:26:12 sogod [7062]: |SOGo| request took 0.001757 seconds to execute
Aug 28 15:26:12 sogod [7062]: localhost "GET /SOGo/user@domain.ltd HTTP/1.0" 302 0/0 0.006 - - 0
Aug 28 15:26:13 sogod [7062]: |SOGo| starting method 'GET' on uri '/SOGo/user@domain.ltd/view'
2015-08-28 15:26:13.015 sogod[7062] <MySQL4Channel[0x0x7fb14631fcf0] connection=0x0x7fb1460c53e0> SQL: SELECT c_defaults FROM sogo_user_profile WHERE c_uid = 'user@domain.ltd';
2015-08-28 15:26:13.015 sogod[7062] <MySQL4Channel[0x0x7fb14631fcf0] connection=0x0x7fb1460c53e0>   query has results, entering fetch-mode.
Aug 28 15:26:13 sogod [7062]: |SOGo| request took 0.003643 seconds to execute
Aug 28 15:26:13 sogod [7062]: localhost "GET /SOGo/user@domain.ltd/view HTTP/1.0" 302 0/0 0.007 - - 0

3

Re: [SOLVED]No access to email with Sogo

Why not just use port 443 (HTTPS)?

4

Re: [SOLVED]No access to email with Sogo

As I said previously, I am using NAT on my router for my mail server and for my web server ....
443 is already used for the web server  (443 -> 443) ....
Is there any special Sogo config (that I didn't find yet) to change ? Why is this port 444 is a problem ?
Do you have any ideas on how to resolve this situation ?
Thx anyway for your support.

5

Re: [SOLVED]No access to email with Sogo

Salut Thierry,

D'après tes logs, Sogo a l'air d'utiliser ton serveur web pour ses requêtes, donc le port 443 a l'air correct! Quel est le problème si tu l'utilise sur ce port ? Cela t'empèche de faire autre chose ? D'ailleurs perso j'utilise owncloud plutôt que sogo, l'interface est plus sympa wink Bon courage

-----------------------------------------------

Hello Thierry, Sogo seems to be using your web server so 443 seems correct. Do you have problems with other apps if you use this port with sogo? Good luck smile

6

Re: [SOLVED]No access to email with Sogo

*) I agree with @Neutro, try port 443 first. if other apps work fine, then just use 443.
*) If port 443 is not ok for you, try this:

1) Create a new virtual web host in Apache/Nginx, make it listen on port 444.
2) Copy existing SOGo settings in Apache/Nginx to this new web host.

Then it should be fine.

7

Re: [SOLVED]No access to email with Sogo

@Neutron: Je ne peux pas utiliser deux fois le port 443 lorsque j'utilise le NAT au niveau de mon router adsl .... C'est la raison de mon pb ... Je vais aussi regardé Owncloud
@ZhangHuangbin: good idea, going to try it

Thx

8

Re: [SOLVED]No access to email with Sogo

So ....
From the file default.conf (/etc/nginx/conf.d) I have removed the port 80 and replace it by 444.
On my router, I have modified my NAT, now it is:  From ANY port 444 to ip_email_server  port 444.

When trying with my phone to get access to Sogo (so from outside) :

[29/Aug/2015:16:10:05 +0200] "GET /mail/ HTTP/1.1" 302 154 "http://mail.domain.ltd:444/" "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 5 Build) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.133 Mobile Safari/537.36"

From my phone 's browser (green ssl locker):

Not found
The requested URL /mail/ was not found on this server 

Can this problem  be directly linked to these codes (redirect):

 location ~ ^/mail { rewrite ^ https://$host$request_uri?; }
 location ~* ^/sogo { rewrite ^ https://$host/SOGo; }
 location ~ ^/iredadmin { rewrite ^ https://$host$request_uri?; }

or

location ~ ^/sogo { rewrite ^ https://$host/SOGo; }
location ~ ^/SOGO { rewrite ^ https://$host/SOGo; }

Still debugging smile

9

Re: [SOLVED]No access to email with Sogo

You should make port 444 a HTTPS service.

10

Re: [SOLVED]No access to email with Sogo

Heu ... How to do this ?

11

Re: [SOLVED]No access to email with Sogo

I have found ...
Replacing 443 by 444 in con.d/default.conf