Author Topic: roundcube sending mail, but not updating UI  (Read 2515 times)

Offline sarderkamal

  • Newbie
  • *
  • Posts: 3
roundcube sending mail, but not updating UI
« on: July 07, 2017, 08:21:29 AM »
Hello, I am having a strange problem with roundcube, and google search could not yield anything useful.

Roundcube system:
OS : FreeBSD 11.0-STABLE #1 r312349M
RC: roundcube-1.2.5,1

Email server (different from roundcube)
OS: FreeBSD 11.0-STABLE #0 r309730
Exim: exim-4.87

I am using IMAP authentication from roundcube to get username and password, so the configuration block in RC looks like

$config['smtp_server'] = 'tls://my.mailserver.com';
$config['smtp_port'] = 587;

$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';


======

Now, the mail server is working as expected, I have users using Thunderbird and various other android devices all exchanging email quite happily.

From the roundcube, the authentication works, I can see my emails, I can click on reply or create new email.

Problem:
As I try to send email (either a new one or reply to some existing), the UI has the pop-up at the bottom right telling me that it is sending email. And it actually does, as is evident from the sendmail.log

[07-Jul-2017 12:10:35 +0100]: <7d7jebmi> User loggedInUser@domain [1.2.3.4]; Message for someotheruser@gmail.com; 250: OK id=1dTR9B-000K5e-EQ


However, the UI continues with the "Sending message. . ." for a while longer and then responds
An error occured
Request timed out



Interestingly, the message which was sent is actually in my sent box (thanks for that), but the UI is now stuck still in the compose window, and if I try to click send again, I get "Invalid compose ID" in the error log (which is expected). But in the entire process, up until that error is displayed in the UI, there is no error in the error.log; and the error.log has nothing until I hit the send button again, when it complains about Invalid compose ID.

So, technically, the main system is doing what is expected, i.e., sending email properly, but somehow the UI is unable to catch that and update itself and go back to list window -- or so is my understanding of the matter.

Suggestions/ideas/test-requests are welcome, as I am completely lost as to why RC is behaving this way, and there does not seem to be much information in google for this particular issue.

Thanks and regards
SK
« Last Edit: July 07, 2017, 08:26:22 AM by sarderkamal »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,502
    • http://SKaero.com/
Re: roundcube sending mail, but not updating UI
« Reply #1 on: July 07, 2017, 10:14:28 AM »
Is there anything in the Roundcube error log <RC root>/logs/errors? Is there anything in the browser JS console?

Offline sarderkamal

  • Newbie
  • *
  • Posts: 3
Re: roundcube sending mail, but not updating UI
« Reply #2 on: July 07, 2017, 12:00:34 PM »
Thank you SKaero for your response.

I opened up the JS Console and the error I got

Load denied by X-Frame-Options: https://my.roundcube.server/?_task=mail&_unlock=loading1499442877402&_lang=en_GB&_framed=1 does not permit framing.

Presumably this is due to the X-Frame-Options set to "DENY" at the server level (as recommended here https://www.owasp.org/index.php/Clickjacking_Defense_Cheat_Sheet#Defending_with_X-Frame-Options_Response_Headers)

Based on that, I commented out the X-Frame-Options from the server, and the site seem to be working as expected. However, I am not comfortable leaving the X-Frame-Options open; suggestions?

Thanks and regards

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,502
    • http://SKaero.com/
Re: roundcube sending mail, but not updating UI
« Reply #3 on: July 07, 2017, 12:07:18 PM »
Not 100% sure on this but I believe you can set it to "sameorigin" and it will work since its all within the same domain.

Offline sarderkamal

  • Newbie
  • *
  • Posts: 3
Re: roundcube sending mail, but not updating UI
« Reply #4 on: July 07, 2017, 12:42:31 PM »
Hi SKaero

Thank you for your response. Yes, I am aware of that and have put that as a stop-gap. But frankly, I prefer to disable it entirely, which apparently is breaking RC.

Thank you for your suggestions, it solved the immediate issue (for now), and now I need to find a solution that does not require me to leave the X-Frame open.

Best regards
SK

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,502
    • http://SKaero.com/
Re: roundcube sending mail, but not updating UI
« Reply #5 on: July 07, 2017, 01:24:11 PM »
As long as Roundcube uses frames it will need to be allowed.