Debian 11
Apache 2.4.54
MariaDB 10.5.18
PHP 8.1
I've had a rocky ride upgrading from 1.15.8 to 1.17.2 but after a lot of swearing at some of the plugins, the web site part of things is working! Unfortunately, the email is being an arse!

I've carefully gone through the guide https://docs.osticket.com/en/latest/OAuth2/Microsoft%20Authorization%20Guide.html

My problem comes when I login and approve the app, It returns me to my site with a 404 page. It's pointing to the Callback Endpoint and ends in
/oauth2?code=.......
It's stating URL not found.

I'm getting nothing useful in the logs either!
Can anyone give me a clue on this?

siilit

URL Rewriting is not enabled or configured properly on your webserver (Apache). Make sure the Apache URL Rewrite module is installed and enabled. Once you do that make sure you have AllowOverride All in your main Apache config. You can look at guides online that explain how to do both. Once you do that your webserver should pickup the .htacess files throughout our codebase and properly rewrite the URLs.

Cheers.

    Thanks Kevin, my flu addled brain hadn't thought of that!

    That cured the problem

    KevinTheJedi
    One further question, we scrape multiple mailboxes. I'm seeing that it generates a new instance in the Oauth2 client for each mailbox. Do we need to create individual apps within azure or will a single app be ok to share amongst the mailboxes?

      siilit

      Single app and just repeat the same config for each email. For SMTP Authentication you can set it to "Same as remote mailbox" and it will use the same info from the Remote Mailbox tab (same token, etc.)

      Cheers.

        KevinTheJedi
        I've got all but one of the mail account able to authenticate and send mail. Thanks for getting me over those hurdles.

        My last query on the email is related to email scraping.
        I've enabled the Email Fetching with absolutely no results.
        I set the cron job to fire off every 5 minutes but nothing was happening until I ticked "fetch on autocron" on the email settings and options page. It then scraped emails.

        The help for the Fetch on autocron says it won't work if no one is logged in. Is this the case even if there is a system cron job running in the background?

        What can I look at to either get the system cron job scraping properly or get the imap polling working?

          siilit

          You probably need to update the cron job to use the appropriate PHP version. Manually run the same command cron is running and see what happens.

          Cheers.

            Turns out I still had an old cron job in /etc/crontab running at the same time and using an old php version!

            That's me done for the night. Lets see if I can get 3 hours sleep before work!

            KevinTheJedi thanks for all your help

            Write a Reply...