IMAP "unexpected QUOTED (expected "]")

Infos:

  • Used Zammad version: 6.5.2-85
  • Used Zammad installation type: (source, package, docker-compose, …) docker-compose
  • Operating system: Ubuntun 24.04 LTS
  • Browser + version: Brave 1.87.186 but happens with Google Chrome as well

Expected behavior:

  • IMAP polling from M365 successful

Actual behavior:

  • Error message “Can’t use Channel::Driver::Imap: #<Net::IMAP::BadResponseError: User is authenticated but not connected.>” on all three IMAP channels!

Steps to reproduce the behavior:

Additional notes:

  • No changes have been made to M365 environment nor actual mailboxes.
  • Zammad docker image has been updated from 6.5.2-67 to 6.5.2-85 during troubleshooting - no change.
  • Migration to Microsoft 365 Graph Email has been attempted but failes with internal server error 500

zammad-railsserver-1 | I, [2026-02-23T12:49:39.357488#1-426080] INFO – : Started GET “/api/v1/external_credentials/microsoft_graph/callback?code=[FILTERED]&session_state=00220eda-11e5-d12e-f7a3-d78a4819af17” for 172.20.0.1 at 2026-02-23 12:49:39 +0100
zammad-railsserver-1 | I, [2026-02-23T12:49:39.369004#1-426080] INFO – : Processing by ExternalCredentialsController#callback as HTML
zammad-railsserver-1 | I, [2026-02-23T12:49:39.369090#1-426080] INFO – : Parameters: {“code”=>“[FILTERED]”, “session_state”=>“00220eda-11e5-d12e-f7a3-d78a4819af17”, “provider”=>“microsoft_graph”}
zammad-railsserver-1 | I, [2026-02-23T12:49:39.737500#1-426080] INFO – : Redirected to
zammad-railsserver-1 | E, [2026-02-23T12:49:39.737719#1-426080] ERROR – : Unsafe redirect to “https://helpdesk.redacted.com/#channels/microsoft_graph/error/duplicate_email_address/param/…”, pass allow_other_host: true to redirect anyway. (ActionController::Redirecting::UnsafeRedirectError)
zammad-railsserver-1 | app/controllers/external_credentials_controller.rb:45:in callback' zammad-railsserver-1 | app/controllers/application_controller/handles_transitions.rb:16:in handle_transaction’
zammad-railsserver-1 | I, [2026-02-23T12:49:39.745129#1-426080] INFO – : Completed 500 Internal Server Error in 376ms (Views: 2.6ms | ActiveRecord: 4.8ms (15 queries, 7 cached) | GC: 28.8ms)