roggenbrot / owatron

A Electron based Linux desktop app for Microsoft Outlook and Office 365 with desktop notifications (email/reminder), spellchecker, context menu and system tray integration
GNU General Public License v3.0
14 stars 0 forks source link

use with On premise Exchange? #1

Closed speatzle closed 3 years ago

speatzle commented 3 years ago

is it possible to use this with the on premise version of exchange? It seems so me as if this only works with the o365 version of exchange.

roggenbrot commented 3 years ago

I'm not sure, since I have no on premise version for testing available.

At the moment the Url of the owa webinterface in the settings UI is hardcoded, however, it should by possible to switch the url by changing the url in the config file.

The config file should be located in ~/.config/owatron/

Open the file and add a url config property:

{
    "url": "[On premise OWA url]",
}

If it not works, send me the output of the app when started in a terminal.

If you can help me with testing/debug the app it would be easy for me to add full support to owatron

speatzle commented 3 years ago

Switching the URL in the config by hand works, you can login to the on Premise version and auto correct seems to work.

Issues i Know about: 1) You need to login each time Owatron is restarted (guessing the cookie is called differently) Here is a list of what Cookies that Firefox Shows for a Logged in User: image

2) Notification on Email Arrival don't work

3) Double clicking an Email to open it in a popup makes a new blank windows with the title '_blank'

There is no output on the terminal at all even when running into any of the issues.

I'd be glad to help with debugging and testing of Owatron. If you can tell me what the Authentication Cookie is called in the O365 version and tell me where the code is that hooks into the notifications i can start looking at what is going wrong on both fronts.

roggenbrot commented 3 years ago

You need to login each time Owatron is restarted

Do you use some kind of NTLM authentication?

Notification on Email Arrival don't work

Can you open the dev tool console after start (ctrl-shift + i), switch to tab Console and send me the output?

Double clicking an Email to open it in a popup makes a new blank windows with the title '_blank'

This is a bug. Occurs also on O365, didn't even know that this is possible :)

speatzle commented 3 years ago

Do you use some kind of NTLM authentication?

NTLM? The LDAP connection from the Exchange to the AD Server Probably uses it, we need to login with our Active Directory Username and Password.

Can you open the dev tool console after start (ctrl-shift + i ), switch to tab Console and send me the output?

image

roggenbrot commented 3 years ago

Mmmm ok, it seems that UI version is older and not using fluentui.

At the moment notification handling is a hack. A DOM mutation listener is registered and listens for notification popup in the DOM since such notifications are rendered in FluentUI always in the same div.

I'm trying to replace that part with a real Add-In that is injected on load, but this is also tricky.

Notifications on O365 are always rendered in an div with class name .ms-Layer-content.

It seems that this div does not exist/has another name in your environment, so I guess we have to change that part for on premise usage.

Can you check the DOM for a div with such class name?

roggenbrot commented 3 years ago

NTLM? The LDAP connection ...

Can you check if Firefox has set a white list property in the config (about:config)

https://www.electronjs.org/docs/api/command-line-switches#--auth-server-whitelisturl

or

https://www.electronjs.org/docs/api/command-line-switches#--auth-negotiate-delegate-whitelisturl

speatzle commented 3 years ago

Can you check if Firefox has set a white list property in the config (about:config)

There is nothing set. Also i dont use SSO if that is what you mean by ntlm.

Can you check the DOM for a div with such class name?

i found what div contains the notifications. Here are HTML snapshots of with and Without a Email notification.

// no notification

<div class="o365cs-notifications-notificationPopupArea o365cs o365cs-base o365cst removeFocusOutline" ispopup="1"
    style="position: absolute; box-sizing: border-box; outline: 0px; z-index: 2001; top: 50px; left: 651px; display: none;"
    tabindex="-1" parentids="(21)">
    <div class="o365-NFP">
        <div style="margin-right: 15px;">
            <div class="o365cs-notifications-notificationPopup ms-bcl-nl" aria-live="polite" style="display: none;">
            </div>
            <div class="o365cs-notifications-notificationPopup ms-bcl-nl" aria-live="polite" style="display: none;">
            </div>
        </div>
    </div>
</div>

// 1 email notification
<div class="o365cs-notifications-notificationPopupArea o365cs o365cs-base o365cst removeFocusOutline" ispopup="1"
    style="position: absolute; box-sizing: border-box; outline: 0px; z-index: 2001; top: 50px; left: 651px; display: block;"
    tabindex="-1" parentids="(21)">
    <div class="o365-NFP">
        <div style="margin-right: 15px;">
            <div class="o365cs-notifications-notificationPopup ms-bcl-nl ms-bgc-w" aria-live="polite" style="">
                <div><a class="ms-bgc-nl-h o365button o365cs-notifications-newMailLink" role="link" href="#">
                        <div class="o365cs-notifications-newMailPopupButton ms-bcl-tp">
                            <div class="o365cs-notifications-newMailPopupButtonCell">
                                <div class="o365cs-notifications-newMailPopupButtonContent"> <span
                                        autoid="__Microsoft_O365_ShellG2_Owa_templates_cs_Z"
                                        class="wf-size-x14 o365cs-notifications-text ms-fcl-nd"
                                        style="display: none;">Sie haben 1 neue Nachrichten.</span>
                                    <div>
                                        <div class="o365cs-notifications-newMailPersonaImage"
                                            style="display: none; background-color: rgb(107, 165, 231); outline-color: rgb(107, 165, 231);">
                                            SL</div><img
                                            src="service.svc/s/GetPersonaPhoto?email=my@email.net&amp;UA=0&amp;size=HR64x64&amp;sc=1613032704723"
                                            class="o365cs-notifications-newMailPersonaImageDontDisplay"><span
                                            autoid="__Microsoft_O365_ShellG2_Owa_templates_cs_01"
                                            class="wf-size-x14 o365cs-notifications-text o365cs-segoeRegular">FirstName
                                            LastName</span><span autoid="__Microsoft_O365_ShellG2_Owa_templates_cs_11"
                                            class="wf-size-x12 o365cs-notifications-text o365cs-segoeSemiBold ms-fcl-tp">test</span><span
                                            autoid="__Microsoft_O365_ShellG2_Owa_templates_cs_21"
                                            class="wf-size-x12 o365cs-notifications-text o365cs-notifications-bodypreviewtext o365cs-segoeSemiLight ms-fcl-ns">test

                                        </span>
                                    </div> <button type="button"
                                        class="o365cs-notifications-closeButton ms-fcl-np ms-bgc-w-h o365button"
                                        aria-label="Schließen"><span
                                            class="o365cs-notifications-closeIcon owaimg ms-Icon--x ms-icon-font-size-16">
                                        </span></button>
                                </div>
                            </div>
                        </div>
                    </a></div>
            </div>
            <div class="o365cs-notifications-notificationPopup ms-bcl-nl" aria-live="polite" style="display: none;">
            </div>
        </div>
    </div>
</div>
roggenbrot commented 3 years ago

I've created a new release with fixes for the open email issue and an initial attempt with the give data to support your installation

speatzle commented 3 years ago

the open email popout now has the title 'owatron' but it has no content and it opens the debug console each time. Here is its console: image

the notifications also dont work but its detected now, here is the console output of the main window with a recived notification: image

roggenbrot commented 3 years ago

Can you please try again with the latest version?

speatzle commented 3 years ago

Popout still has no content. image

Notifications now show this new error message: image

roggenbrot commented 3 years ago

Can you check the output with the latest version again, please

roggenbrot commented 3 years ago

Maybe I know also the reason for your login problem. Will provide a fix for this later

speatzle commented 3 years ago

In v0.4.3 The Email Notifications now Work, Nice Job. I also tried a Calendar Reminder and got this: image

roggenbrot commented 3 years ago

Did the update also solve the popup and login problems?

speatzle commented 3 years ago

With v0.4.3 Logins still don't survive restarts and popups are empty.

roggenbrot commented 3 years ago

Sorry for the delay. I've created a new version where I've tried to add reminder support based on the screenshot above.

Can you check if it's working? Can you send me also all error that are shown in console after startup?

Does the popOutProjectManager error still occur?

speatzle commented 3 years ago

Hey, no worries about the delay.

Reminder Notification sadly still don't work: owatron-reminder-failure And Popups are also still Empty: owatron-popup-failure

Thank you for working on this with me.

roggenbrot commented 3 years ago

Can you sent me the the output as text instead as screenshot?

roggenbrot commented 3 years ago

nativefier/nativefier#408

roggenbrot commented 3 years ago

I've created a new release which hopefully should fix notifications and window open in your environment.

Sorry for the try&error releases, but since I'm not able to reproduce this problem in my environment, fixing this issue is harder then I thought.

speatzle commented 3 years ago

Sorry for the delay, had a few very busy days at work.

Reminder Notifications now work!

Popout window are Sadly still Empty though.

I have Attached the Logs as Text instead of Screenshots: owatron-main-log.log owatron-popuplog.log

roggenbrot commented 3 years ago

I've create #2 and #3 to track the remaining issues with on premise installations and will close this issue.

roggenbrot commented 3 years ago

New release, details can be found on #2