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: 1)All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items

Fernando Vinan-Cano - Aug 12, 2019 8:09 pm (#2 Total: 9)  

 

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

MDaemon
SecurityPlus
WebAdmin
Hi

The two sets of logs in my message are from the server, there's just not very much showing to point at an issue. The "unable to expand" is it, the other set is to illustrate that logging the connections as from my firewall 192.168.1.1 is meaningless as it's lumping all connections with that. I have plenty of other web applications using HAProxy as the front-end e.g. PRTG, Webmin, Cockpit, PHPBB3 on Apache, Guacamole (for RDP), Microsoft's Windows Admin Center and none of them have issues.

I'm on v19.0.3 but the issues have been happening for well over a year, just with this latest release it's finally stopped working.

I tried the mobile theme and that works fine, any full theme does not get beyond entering my credentials and the 2FA code.

Fernando Vinan-Cano - Aug 13, 2019 3:49 am (#3 Total: 9)  

 

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

MDaemon
SecurityPlus
WebAdmin
Interestingly, I switched my desktop browser to use "Mobile" and although it works and I can see the mailbox now, it suffers similarly to the other themes a few weeks back where sometimes opening or replying to an email presents me with a blank window. If I refresh it once or twice the content then appears.

Jonathan Ehman - Aug 13, 2019 7:38 am (#4 Total: 9)  

 

Photo of Author
Jonathan Ehman
Novice
Novice
Posts: 215
Thanks for the clarification Fernando.

I found the work item related to reading the X-Forwarded-For header and will see about getting it into our next release.

Replies to this message
  • Fernando Vinan-Cano (Aug 14, 2019 3:13 am)




  •   (newer msg:5)All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items



     Content:

    Read New | Search

     Guest:

    Email to Admin



    You are visiting as a Guest user.