mirror of
https://github.com/LogicLabs-OU/OpenArchiver.git
synced 2026-04-06 00:31:57 +02:00
Generic IMAP ingestion fails with Unauthorized: Invalid token on cPanel/Dovecot servers
#68
Closed
opened 2026-04-05 16:16:21 +02:00 by MrUnknownDE
·
0 comments
No Branch/Tag Specified
main
gh-pages
v0.5.1-dev
v0.4.3-release
ee-legalhold
ee-retention
v0.4.3-dev
wayneshn-patch-1
v0.4.3-pre
v0.4.2-fix
v0.4.2-dev
v0.4.1-dev
mailbox-processing-opt
v0.4.0-fix
ee-init
docs-ocr
v0.3.x-fixes
issue-templates
security-update
create-funding-yml
display-versions
attachment-ocr
docs
user-api-key
demo-mode
v0.3.0
system-settings
wip
CLA-v2
role-based-access
dev
v0.5.0
v0.4.2
v0.4.1
v0.4.0
v0.3.4
v0.3.3
v0.3.2
v0.3.1
v0.3.0
v0.2.1
v0.2.0
v0.1.2
v0.1.1
v0.1.0
Labels
Clear labels
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
documentation
documentation
duplicate
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
good first issue
help wanted
help wanted
help wanted
help wanted
improvement
improvement
question
question
Milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
MrUnknownDE
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: github/OpenArchiver#68
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @richieboo on 12/31/2025
Describe the bug
Generic IMAP ingestion fails against a cPanel/Dovecot IMAP server with the error:
Authentication Failed
Unauthorized: Invalid token
This occurs even though the mailbox credentials are correct and the server supports standard IMAP authentication mechanisms.
Webmail and standard email clients authenticate successfully using the same credentials.
To Reproduce
Steps to reproduce the behavior:
Deploy Open Archiver (v0.3.3).
Go to Ingestions → Create New.
Select Provider: Generic IMAP.
Enter:
Host: mail.example.org
Port: 993
Use TLS: enabled
Allow insecure cert: enabled
Username: full email address
Password: valid mailbox password
Click Submit.
Observe the error:
Authentication Failed
Unauthorized: Invalid token
Expected behavior
Open Archiver should authenticate using AUTH LOGIN or AUTH PLAIN when those mechanisms are advertised by the IMAP server and successfully create the ingestion source.
Screenshots
Not provided.
System:
Open Archiver Version: v0.3.3
IMAP Server: cPanel / Dovecot
TLS: Enabled
Certificate: Valid Let’s Encrypt wildcard certificate
Relevant logs:
IMAP server capability and TLS verification (via openssl s_client):
AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
TLS handshake and certificate verification succeed with no errors.
Additional context
The IMAP server does not support OAuth or token-based authentication.
Only AUTH=LOGIN and AUTH=PLAIN are advertised (standard for cPanel/Dovecot).
Other Generic IMAP sources (e.g., Gmail) work correctly in the same Open Archiver instance.
This appears to be a failure to properly fall back to AUTH LOGIN / AUTH PLAIN when token-based mechanisms are not available.