I found temporary workaround - i have to write public host name directly in 
sogo.tmpl of nginx.
For unknow reason the $host variable is not correctly set.

# proxy_set_header x-webobjects-server-name $host;
    proxy_set_header x-webobjects-server-name www.mms-softec.sk;

    # proxy_set_header x-webobjects-server-url  https://$host:443;
    proxy_set_header x-webobjects-server-url  https://www.mms-softec.sk;


-- 
With greetings

Daniel Petrik
MMS Softec, s.r.o.
[email protected]
tel: +421335340522

Pondelok, Apríl 25, 2022 15:38 CEST, Daniel Petrík ([email protected]) 
<[email protected]> napísal:
  
Hello,

strange it was working, than I did upgrade of SOGo and it stops (yes, I broke 
rule do not fix what is working).

the working version was 5.5.1.20220408

now with broken pictures is 5.5.1.20220423

(upgrade sogo:amd64 5.5.1.20220408-1 5.5.1.20220423-1)


 
So something must changed in version 5.5.1.20220423 comparing to 5.5.1.20220408.


 
My configuration is little bit strange, I have web server (IIS 10) which is 
mapped to public internet address using NAT, on this server is running reverse 
proxy too,

pointing to internal mail server where nginx server with iRedmail +SOGo is 
running (ubuntu 20).


 
on nginx is in sogo template 


 
location ^~ /SOGo {

    include /etc/nginx/templates/hsts.tmpl;


 
    proxy_pass http://127.0.0.1:20000;


 
    # 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;


 
    # always use https

    proxy_set_header x-webobjects-server-port $server_port;

    proxy_set_header x-webobjects-server-name $host;

    proxy_set_header x-webobjects-server-url  https://$host:443;

    proxy_set_header x-webobjects-server-protocol HTTP/1.0;


 
    proxy_busy_buffers_size   64k;

    proxy_buffers             8 64k;

    proxy_buffer_size         64k;

}


 
with greetings


 
Daniel


 

 
From: [email protected] [mailto:[email protected]] On Behalf Of Francis 
Lachapelle
Sent: Monday, April 25, 2022 2:08 PM
To: [email protected]
Subject: Re: [SOGo] SOGo - after update not showing png-pictures in emaI body - 
when behind reverse proxy


 
Hi Daniel





On Apr 24, 2022, at 03:16, Daniel Petrik <[email protected]> wrote:


 
I have do some investigation, and I have found that pictures in response 
contains internal server ip, not the $host address, and because I use reverse 
proxy, the picture address is wrong as visible from firefox network 
comunication.


<D598-6264F900-3-687CD480.png>
I see it also in source of mail
<D598-6264F900-5-687CD480.png>
Somethink must change in SOGo, which probably ignores $host value in response 
when setting img src url.


 
Make sure you properly add all the x-webobjects-server-* headers before passing 
the requests to sogod. If you use Apache, check the recommended config:


 
https://github.com/inverse-inc/sogo/blob/master/Apache/SOGo.conf#L79-L91





-------- Pôvodná správa --------
Predmet: SOGo - after update not showing png-pictures in emaI body
Dátum: Sobota, Apríl 23, 2022 17:48 CEST
Od: "Daniel Petrik" <[email protected]>
Komu: [email protected]


After SOGo update with night build, it stops showing png -pictures in e-mail 
body, instead it shows them as downloadable attachments at the page footer.

-- 
With greetings

Daniel Petrik
MMS Softec, s.r.o.
[email protected]
tel: +421335340522


 
--
[email protected]
https://inverse.ca/sogo/lists
--
[email protected]
https://inverse.ca/sogo/lists
-- 
[email protected]
https://inverse.ca/sogo/lists

Reply via email to