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: 817

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.

  All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items

Jonathan.Ehman@mdaemon.com - Aug 12, 2019 8:01 am (#1 Total: 9)  

Guest User  

Photo of Author
Posts: 1
Hello Fernando,
 
None of the server logs you sent show relevant errors.
 
However, the client side error could cause an issue.
 
What version of MDaemon are you running?
 
Have you tried to use Lite or Mobile theme?
 

Best Regards,

Jonathan Ehman
Senior Software Developer
b: 817-601-3222    e: jonathan.ehman@mdaemon.com

MDaemon Technologies
Simple Secure Email
Visit us on www.mdaemon.com | Facebook | LinkedIn | YouTube
Sent using the MDaemon Email Server
 
On Mon, 12 Aug 2019 03:12:07 -0500, "Fernando Vinan-Cano (lists-md-worldclient-issues@mdaemon.com)" <lists-md-worldclient-issues@mdaemon.com> wrote:
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, the 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.
 
View/reply at Issues using HAProxy to front-end Webmail
--MD-WC-ISSUES-------------------------------------------------------
This list is for questions and discussions about MDAEMON and 
WorldClient. To unsubscribe from this mailing list send an email to 
md-wc-issues-unsubscribe@mdaemon.com .
--POWERED BY MDAEMON!------------------------------------------------

---------------------------------------------------------------------
These forums are provided by MDaemon Technologies for user-to-user 
support and discussion.  MDaemon staff members may participate in the 
forums periodically but please recognize that this is not the official
method of receiving technical support. To receive personal technical 
support please use the form here:
http://www.mdaemon.com/Support/RequestSupport/
---------------------------------------------------------------------

--MD-WC-ISSUES-------------------------------------------------------
This list is for questions and discussions about MDAEMON and
WorldClient. To unsubscribe from this mailing list send an email to
md-wc-issues-unsubscribe@mdaemon.com .
--POWERED BY MDAEMON!------------------------------------------------

---------------------------------------------------------------------
These forums are provided by MDaemon Technologies for user-to-user
support and discussion.  MDaemon staff members may participate in the
forums periodically but please recognize that this is not the official
method of receiving technical support. To receive personal technical
support please use the form here:
http://www.mdaemon.com/Support/RequestSupport/
---------------------------------------------------------------------

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

 

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

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: 817

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: 216
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)


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

     

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

    MDaemon
    SecurityPlus
    WebAdmin
    Replying to: Jonathan Ehman (Aug 13, 2019 7:38 am)
    Thanks for the clarification Fernando. I found the work item related to reading the X-Forwarded-For header and will see about...

    That's great news thanks - I look forward to testing it in beta, but let me know if you want me to test anything else or provide any other information in the meantime. However, you'll need to message me directly as I get zero notifications of replies on the forum and have to check manually

    Replies to this message
  • Jonathan Ehman (Aug 14, 2019 7:30 am)
  • Jonathan Ehman (Aug 15, 2019 1:55 pm)


  • Jonathan Ehman - Aug 14, 2019 7:30 am (#6 Total: 9)  

     

    Photo of Author
    Jonathan Ehman
    Novice
    Novice
    Posts: 216
    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...

    Thanks Fernando,

    I will keep that in mind.

    [Last Editor: Jonathan Ehman, Aug 14, 2019 7:31 am. Total Edits: 1]

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

     

    Photo of Author
    Jonathan Ehman
    Novice
    Novice
    Posts: 216
    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: 817

    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.