Hello Thomas,
 
I downloaded the source and compiled with the configuration as following. 
(Sorry, I forgot to tell, which version I'm using)
 
SOGo-4.0.1.tar.gz
./configure --enable-debug --disable-strip

SOPE-4.0.1.tar.gz
./configure --with-gnustep --enable-debug --disable-strip --disable-postgresql
 
With that sogo-activesync should be included, or am I wrong?
 
Here is the result of tcpdump:
###############################
reading from file dump2.pcap, link-type EN10MB (Ethernet)
11:54:23.222281 IP6 ::1.41120 > ::1.20000: tcp 0
`.sd.(.@.................................N .L...........0.........
............
11:54:23.222296 IP6 ::1.20000 > ::1.41120: tcp 0
`......@...............................N .......L..P.......
11:54:23.222375 IP 127.0.0.1.41546 > 127.0.0.1.20000: tcp 0
E..<..@.@..".........JN .S...........0........
8|..........
11:54:23.222388 IP 127.0.0.1.20000 > 127.0.0.1.41546: tcp 0
E..<..@.@.<.........N .J.$...S.......0.........
8|..8|......
11:54:23.222403 IP 127.0.0.1.41546 > 127.0.0.1.20000: tcp 0
E..4..@.@..)........JN .S...$.....V.(.....
8|..8|..
11:54:23.222489 IP 127.0.0.1.41546 > 127.0.0.1.20000: tcp 229
E.....@.@..C.........JN .S...$.....V.......
8|..8|..OPTIONS 
/SOGo/Microsoft-Server-ActiveSync?User=florian&DeviceId=id&DeviceType=WP8 
HTTP/1.1
Host: localhost:20000
Authorization: Basic ZmxvcmlhbjoxMjM0NTY3OA==
User-Agent: curl/7.52.1
Accept: */*
MS-ASProtocolVersion: 2.5


11:54:23.222496 IP 127.0.0.1.20000 > 127.0.0.1.41546: tcp 0
E..4?.@.@...........N .J.$...S.....^.(.....
8|..8|..
11:54:23.234833 IP 127.0.0.1.20000 > 127.0.0.1.41546: tcp 17
E..E?.@.@..........N .J.$...S.....^.9.....
8|..8|..HTTP/1.1 200 OK

11:54:23.234836 IP 127.0.0.1.41546 > 127.0.0.1.20000: tcp 0
E..4..@.@..'.........JN .S...$.%...V.(.....
8|..8|..
11:54:23.235245 IP 127.0.0.1.20000 > 1270.0.1.41546: tcp 173
E...?.@.@...........N .J.$.%.S.....^.......
8|..8|..Content-Type: text/plain
Content-Length: 0
Allow: GET, HEAD, POST, OPTIONS, MKCOL, MKCALENDAR, DELETE, PUT, LOCK, UNLOCK, 
COPY, MOVE, REPORT, PROPFIND, SEARCH
DAV: 1, 2

11:54:23.235250 IP 127.0.0.1.41546 > 127.00.1.20000: tcp 0
E..4..@.@..&.........JN .S...$.....^.(.....
8|..8|..
11:54:23.235539 IP 127.0.0.1.20000 > 127.0.0.1.41546: tcp 2
E..6?.@.@..........N .J.$...S.....^.*.....
8|..8|..

11:54:23.235542 IP 127.0.0.1.41546 > 127.0.0.1.20000: tcp 0
E..4..@.@..%.........JN .S...$.....^.(....
8|..8|..
11:54:23.235589 IP 127.0.0.1.41546 > 127.0.0.1.20000: tcp 0
E..4..@.@..$.........JN .S...$.....^.(.....
8|..8|..
11:54:23.237134 IP 127.0.0.1.20000 > 127.0.0.1.41546: tcp 0
E..4?.@.@...........N .J.$...S.....^.(.....
8|..8|..
11:54:23.237142 IP 127.0.0.1.41546 > 127.0.0.1.20000: tcp 0
E..4..@.@..#.........JN .S...$.....^.(.....
8|..8|..
###############################
 
Does it look good?
 
Best regards
Floh
 
 
 
-----Ursprüngliche Nachricht-----
 Von: "Thomas Führer" [users@sogo.nu]
 Gesendet: Fr. 10.08.2018 07:43
 An: "floh-erfu...@freenet.de" [users@sogo.nu]
 Betreff: AW: [SOGo] ActiveSync + NGinx ReverseProxy: Doesn't work

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


---- floh-erfurth@freenetde 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




-- 
users@sogo.nu
https://inverse.ca/sogo/lists-- 
users@sogo.nu
https://inverse.ca/sogo/lists-----Ursprüngliche Nachricht Ende-----


-- 
users@sogo.nu
https://inverse.ca/sogo/lists

Reply via email to