Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect token being used for OAuth2 #17

Open
Andrew-Staves-Activ opened this issue Oct 7, 2022 · 1 comment
Open

Incorrect token being used for OAuth2 #17

Andrew-Staves-Activ opened this issue Oct 7, 2022 · 1 comment

Comments

@Andrew-Staves-Activ
Copy link

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: [email protected]
    • 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.

@joergflorian
Copy link

I‘d like to push this up a little as we see the exact same behavior in our system with latest Znuny 6.5.x and the latest add-on version.
If from both SMTP servers mails are sent around the same time, often the wrong OAuth token is taken.

Any fix or workaround for that?

Thanks for this great add-on Reneeb!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants