Skip to content

Incorrect token being used for OAuth2 #17

@Andrew-Staves-Activ

Description

@Andrew-Staves-Activ

We recently changed our Znuny install to use OAuth2 for fetching due to Microsoft disabling basic auth. for IMAP/POP. At the time we switched over to this, we also tried setting MultiSMTP's accounts to use OAuth2 Tokens. The problem was that MultiSMTP appeared to be trying to authenticate with the wrong token.

We were seeing the following for an auto-response:
multismtp_connection_1
multismtp_message_1

As well as the following for a manually sent reply:
multismtp_connection_2
multismtp_message_2

It appears that the token named on the NotificationSenderEmail's account was being used regardless of which SMTP mail account the email was being sent as. I'm not sure whether that token was being used because it was associated with the NotificationSenderEmail account or whether that was a coincidence.

Install details:

  • Znuny 6.4.2
  • MultiSMTP 6.3.1

Possibly relevant configuration

  • Core::Email:
    • NotificationSenderEmail: otrs-notifications@example.com
    • SendmailModule: Kernel::System::Email::MultiSMTP
  • MultiSMTP::Core
    • MultiSMTP::UseFallback: No
    • MultiSMTP::UseSenderFromMail: No

With SMTP accounts configured like this:
image
image
image

To be explicit, the email addresses and token names are examples and have been used in place of the real ones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions