General discussion on installation and configuration of SOGo

Text archives Help


AW: [SOGo] ActiveSync + NGinx ReverseProxy: Doesn't work


Chronological Thread 
  • From: Thomas Führer ( ) < >
  • To: < >
  • Subject: AW: [SOGo] ActiveSync + NGinx ReverseProxy: Doesn't work
  • Date: Fri, 10 Aug 2018 05:43:31 +0000
  • Dmarc-filter: OpenDMARC Filter v1.2.0 mail.inverse.ca E26C31DE507E

Hi Floh,
you could try to get more info by using :

tcpdump -i lo -s 0 -w /tmp/dump.pcap tcp and port 20000

I assume you have the sogo-activesync package properly installed.

Regards, Thomas



---- schrieb ----

Hello everybody,

I'm new in SOGo. I just migrated from Zarafa + ZPush to SOGo. Almost everything is working (SOGo + openLDAP + mariaDB + dovecot + postfix). I also work with nginx-light as reverse proxy on separate machine, which is accesible from outside. With that I can use sogo-client without problem.

Now I need to get ActiveSync working and I'm out of luck. I don't know how to debug there.

On my Android it always tells (tranlated from german): "An invalid server address was entered or server needs a protocol version which is not supported over email." ("Eine ungültige Serveradresse wurde eingegeben oder Server benötigt eine Protokollversion, die nicht über E-Mail unterstützt wird."

On nginx-Servers (same on proxyserver with ext. IP and sogoserver with int. IP) they tell:
xx.xx.xx.xx - florian [08/Aug/2018:21:30:57 +0200] "OPTIONS /Microsoft-Server-ActiveSync?Cmd=OPTIONS&User=florian&DeviceId=XXXXXXXXXXXXXXX&DeviceType=SamsungDevice HTTP/1.1" 200 0 "-" "Android-SAMSUNG-SM-N950F/101.80000"

On SOGo-Server the sogo.log tellls:
Aug 08 21:30:57 sogod [5108]: xx.xx.xx.xx, yy.yy.yy.yy "OPTIONS /SOGo/Microsoft-Server-ActiveSync?Cmd=OPTIONS&User=florian&DeviceId=XXXXXXXXXXXXXXX&DeviceType=SamsungDevice HTTP/1.1" 200 0/0 0.003 - - 0

I tried to debug by using curl:
curl -X OPTIONS -H "MS-ASProtocolVersion: 2.5" -u florian:xxxxxxxx "https://mail.mydomain.de/Microsoft-Server-ActiveSync?User=florian&DeviceId=id&DeviceType=WP8"

There is no output on that terminal. And the logs on servers are the same:


sogo.log:
Aug 08 21:29:58 sogod [5108]: xx.xx.xx.xx, yy.yy.yy.yy "OPTIONS /SOGo/Microsoft-Server-ActiveSync?User=florian&DeviceId=id&DeviceType=WP8 HTTP/11" 200 0/0 0.003 - - 0

activesync.log (nginx logfile on both machines):
xx.xx.xx.xx - florian [08/Aug/2018:21:29:58 +0200] "OPTIONS /Microsoft-Server-ActiveSync?User=florian&DeviceId=id&DeviceType=WP8 HTTP/1.0" 200 0 "-" "curl/7.47.0"

Here are nginx-configurations.

Proxy:
################################################################
server
{
listen 80;
server_name mail.mydomain.de;
## redirect http to https ##
rewrite ^ https://$server_name$request_uri? permanent;
}

server
{
listen 443 ssl;
server_name mail.mydomain.de;

ssl on;
ssl_certificate /etc/letsencrypt/live/mail.mydomain.de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/mail.mydomain.de/privkey.pem;

location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Server $host;
proxy_pass http://mail;
proxy_redirect default;
client_max_body_size 10M;
}

location ^~ /Microsoft-Server-ActiveSync
{
access_log /var/log/nginx/activesync.log;
error_log /var/log/nginx/activesync-error.log;
resolver mail;

proxy_connect_timeout 75;
proxy_send_timeout 3600;
proxy_read_timeout 3600;
proxy_buffers 64 256k;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_pass http://mail/Microsoft-Server-ActiveSync;
proxy_redirect http://mail/Microsoft-Server-ActiveSync /;
}
}
################################################################

Sogo-Server called 'mail':
################################################################
server
{
listen 80;
server_name mail.mydomain.de;
root /usr/local/lib/GNUstep/SOGo/WebServerResources/;

## requirement to create new calendars in Thunderbird ##
proxy_http_version 1.1;

# Message size limit
client_max_body_size 50m;
client_body_buffer_size 128k;

location /
{
rewrite ^ 'https://$server_name/SOGo';
allow all;
}

# For iOS 7
location /principals/
{
rewrite ^ 'https://$server_name/SOGo/dav';
allow all;
}
location ^~/SOGo
{
proxy_pass http://127.0.0.1:20000;
proxy_redirect http://127.0.0.1:20000 default;
# forward user's IP address
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header x-webobjects-server-protocol HTTP/1.0;
proxy_set_header x-webobjects-remote-host 127.0.0.1;
proxy_set_header x-webobjects-server-name $server_name;
proxy_set_header x-webobjects-server-port $server_port;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
break;
}
location /SOGo.woa/WebServerResources/
{
alias /usr/local/lib/GNUstep/SOGo/WebServerResources/;
allow all;
expires max;
}

location /SOGo/WebServerResources/
{
alias /usr/local/lib/GNUstep/SOGo/WebServerResources/;
allow all;
expires max;
}

location (^/SOGo/so/ControlPanel/Products/([^/]*)/Resources/(.*)$)
{
alias /usr/local/lib/GNUstep/SOGo/$1.SOGo/Resources/$2;
expires max;
}

location (^/SOGo/so/ControlPanel/Products/[^/]*UI/Resources/.*.(jpg|png|gif|css|js)$)
{
alias /usr/local/lib/GNUstep/SOGo/$1.SOGo/Resources/$2;
expires max;
}
location ^~ /Microsoft-Server-ActiveSync
{
access_log /var/log/nginx/activesync.log;
error_log /var/log/nginx/activesync-error.log;
resolver 127.0.0.1;

proxy_connect_timeout 75;
proxy_send_timeout 3600;
proxy_read_timeout 3600;
proxy_buffers 64 256k;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_pass http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync;
proxy_redirect http://127.0.0.1:20000/SOGo/Microsoft-Server-ActiveSync /;
}
}
################################################################

I also tried to run curl directly on sogo-server:
floh@mail:~# curl -X OPTIONS -H "MS-ASProtocolVersion: 2.5" -u florian:xxxxxxxx "http://localhost:20000/SOGo/Microsoft-Server-ActiveSync?User=florian&DeviceId=id&DeviceType=WP8"

But there still no terminal output and sogo.log looks exactly same:
Aug 08 21:55:12 sogod [5108]: localhost "OPTIONS /SOGo/Microsoft-Server-ActiveSync?User=florian&DeviceId=id&DeviceType=WP8 HTTP/1.1" 200 0/0 0.002 - - 0

So, could you tell me how to debug? Or am I already debugging properly? Do you see my mistake? Idea? Hints?

Thank you!
Floh




--

https://inverse.ca/sogo/lists


Archive powered by MHonArc 2.6.18.

Top of page