Logout

Alt-N Discussion Groups > MDaemon Discussion Groups > MDaemon WorldClient Issues > Archive > Issues using HAProxy to front-end Webmail

 [F] Alt-N Discussion Groups  / MDaemon Discussion Groups  / MDaemon WorldClient Issues  / Archive  /

Issues using HAProxy to front-end Webmail

[Vinan-Cano, Fernando]
Fernando Vinan-…
Jedi
Jedi
Posts: 816

MDaemon
SecurityPlus
WebAdmin
Fernando Vinan-Cano - 03:12am, Aug 12 2019

I'm having more and more issues trying to use Webmail behind my firewall's HAProxy service - it used to be that I would get randomly disconnected, then occasionally the logon would get stuck and clearing cookies resolved that, but now no matter what I tryI can't even log on. I get past the credentials then the 2FA code, and it just sits there with the whirling status.

I think the biggest issue is that MDaemon is not proxy aware and logs all my connections as coming from "192.168.1.1" i.e. the firewall - it doesn't look at the X-Forwarded-For header from the proxy to get the real IP. I reported this a very long time ago through the beta list but it's still not been implemented. This is what happens from the MDaemon side:

)Mon 2019-08-12 09:54:05.105: Remember Me token set for ferd@star-one.co.uk (IP 192.168.1.1)
)Mon 2019-08-12 09:54:05.105: Secure password set for ferd@star-one.co.uk (IP 192.168.1.1)
)Mon 2019-08-12 09:54:05.132: [O***********E] Expiring session OKBNI8964OMPE...
)Mon 2019-08-12 09:54:05.133: [O***********E] Session OKBNI8964OMPE expired.
)Mon 2019-08-12 09:54:05.147: [Z***********9] Session created for ferd@star-one.co.uk from 192.168.1.1.
)Mon 2019-08-12 09:54:05.257: [Z***********9] Unable to find last access IP 192.168.1.1 in the database | MMDB_error: Success (not an error)
)Mon 2019-08-12 09:54:05.258: [Z***********9] Updated login history for user ferd@star-one.co.uk. (IP 192.168.1.1)

Today I was checking the the logs for the session and I spotted this:

)Mon 2019-08-12 09:54:05.487: [Z***********9] Unable to expand: CALENDAR.

I also saw this when using the browser console to see what was happening:

)WorldClient.dll?View=Main:967 Uncaught TypeError: Cannot read property 'updateExternalCalendars' of undefined at WorldClient.dll?View=Main:967

Perhaps this is the reason for my current inability to get into webmail, perhaps you can advise how I can clear this error.

P.S. why this forum editor from the stone-age keeps changing my ")" to ")" above I have no clue and after 3 attempts I give up.
P.P.S. I give up, I can't even type a great-than sign without it changing to a bracket.

  (older msg: 6)All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items

Jonathan Ehman - Aug 15, 2019 1:55 pm (#7 Total: 9)  

 

Photo of Author
Jonathan Ehman
Novice
Novice
Posts: 215
Replying to: Fernando Vinan-Cano (Aug 14, 2019 3:13 am)
That's great news thanks - I look forward to testing it in beta, but let me know if you want...

Fernando,

We added a check for the X-Forwarded-For header for the next version of MDaemon. However, there does not appear to be any reason that the client's IP should impact your use of Webmail in the ways you have described.

Please email me directly at jonathan.ehman@mdaemon.com with the following information.

Are you using the built in web server for Webmail, or another web server?

Is your FQDN set correctly in MDaemon/App/MDaemon.ini?

Are you using a domain name or the IP to connect to the Webmail server?

[Last Editor: Jonathan Ehman, Aug 15, 2019 1:56 pm. Total Edits: 1]

Fernando Vinan-Cano - Aug 20, 2019 4:01 am (#8 Total: 9)  

 

Photo of Author
Fernando Vinan-…
Jedi
Jedi
Posts: 816

MDaemon
SecurityPlus
WebAdmin
Sorry for the delay, just sent the email

Paul Dyer - Aug 25, 2021 11:50 pm (#9 Total: 9)  

 

Photo of Author
Paul Dyer
Newbie
Newbie
Posts: 5
Was a solution found for this? I'm testing the latest version out and seeing the same issue when behind HAProxy. I can login with the mobile client, but when I try to login with a browser, the page just refreshes and I can't login, no error. Nothing int he logs points to it (Although it also sees the firewall IP, with or without the X-ForwardFor set in HAProxy).



  All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items



 Content:

Read New | Search

 Guest:

Email to Admin



You are visiting as a Guest user.