Hi.
I have a fresh installation of osTicket 1.17.3 and I can't get SMTP to work.
In the web interface, I get a "5.7.8 Error: authentication failed: Invalid authentication mechanism" whenever I try to save the SMTP settings.
I'm using basic authentication (no oauth2 plugin). Port is 587. I also tried "Same as Remote Mailbox" with the same result.
The POP config is accepted and I can open tickets from emails, but SMTP doesn't work.
I know the SMTP settings are right. I also have an older osTicket installation (v1.14.3) and it works perfectly.
I can't find any reference to this particular error online. The osTicket logs and the Apache logs don't show anything. My only feedback is the message from the web interface.

I've made several fresh installations and the result is the same.

I've also tried the following:
I disabled the SMTP settings and installed sendmail and then I could send mails from osTicket, but I can't use this solution because those mails don't use my domain's MTA, so they get shut down by Google and other domains for lack of SPF, DMARC and DKIM records.

I'm out of ideas. Please help.

Ubuntu 22.04 (headless)
mysql Ver 8.0.32
PHP 8.1
osTicket 1.17.3

    KevinTheJedi Thanks for the reply. Yes, there are google results for the auth mechanism error in general, but not specific to osTicket, which is the only thing that changed. We have many other systems that use our MTA, plus thousands of users with their various email clients, and all of them work fine, except for this new installation of osTicket. Even an older osTicket works well, as I said before.

    Here are the screenshots as you requested:

    Diggin deeper I found in the MTA logs the following:
    Mar 31 10:53:48 mta0 postfix/submission/smtpd[28539]: warning: unknown[xxx.xxx.xxx.xxx]: SASL LOGIN authentication failed: Invalid authentication mechanism

    We have Dovecot for SASL auth. In the dovecot config I found that it only accepts "plain" as auth mechanism.
    I thought that osTicket used Plain as well, but evidently it uses LOGIN. I enabled "login" in the dovecot config, but the result hasn't changed.
    I don't understand why osTicket would use the LOGIN mechanism, which is older and I think mostly deprecated. And why an older version works where the latest fails.

    Any clues as to what can I do here?

      mdcastro-dc-uba-ar

      You will need to consult your server admin for further steps as this is now outside the scope of the software.

      As for why we use LOGIN is because we utilize the laminas-mail package in order to support the infamous Modern Authentication (as at the time PHP said "fuck that" and wasn't providing such support natively). We are doing a big laminas-mail update soon which should include some improvements. Hopefully they've switched from LOGIN to PLAIN since then.

      Cheers.

        KevinTheJedi Thanks. That explains it.
        I'm trying, just to see if it works, to force osTicket so use PLAIN. I modified include/pear/Net/SMTP.php so that the array that lists the methods only has the plain method. I also modified the include/pear/Auth/SASL.php so that the "login" option actually points to the "plain" class and file. I know it's hacky, but I just wanted to see if it had any impact at all... it doesn't.

        Could you by any chance point me to where is it that the auth mechanism is actually selected?
        It's good to read that this could be solved soon with that laminas-mail update.
        Thanks again.

          Write a Reply...