Infos:
- Used Zammad version: 6.5.2-1758702414.b18da133.noble
- Used Zammad installation type: package installation on Ubuntu (APT install)
- Operating system: Ubuntu 24.04.3 LTS
- Browser + version: Chrome (latest)
Expected behavior:
- Gmail channel (Inbound email) should connect normally using OAuth2 (auth_type = XOAUTH2) and fetch IMAP messages from
imap.gmail.com:993.
Actual behavior:
- Gmail OAuth setup works (login success), but fetching emails fails.
- Zammad logs show:
ERROR -- : Can't use Channel::Driver::Imap: #<OpenSSL::SSL::SSLError: SSL_read: unexpected eof while reading>
app/models/channel/driver/imap.rb:147:in `new'
app/models/channel/driver/imap.rb:147:in `block in setup_connection'
app/models/channel/driver/imap.rb:146:in `setup_connection'
app/models/channel/driver/imap.rb:50:in `fetch'
- SSL handshake works correctly when tested manually via:
openssl s_client -connect imap.gmail.com:993 -tls1_2
which returns:
Verification: OK
Verify return code: 0 (ok)
- So the server can reach Gmail and validate certificates successfully, but Zammad’s IMAP driver aborts during SSL_read with
unexpected eof while reading.
Steps to reproduce the behavior:
- Go to Admin → Channels → Email → Add Account → Gmail OAuth
- Authenticate with Google successfully (OAuth flow completes)
- Zammad creates the channel and attempts to fetch via IMAP using XOAUTH2
- Fetch fails with the error above
- Log entries show repeated:
fetching imap (imap.gmail.com/MY_EMAIL port=993,ssl=true,starttls=false,auth_type=XOAUTH2,ssl_verify=true)
followed by the SSL_read EOF error.
Additional notes:
- IMAP is enabled inside Gmail settings.
- The same server can connect to
imap.gmail.com:993without issue using openssl. - Time sync (NTP) is correct.
- No firewall or proxy interfering.
- Error happens every time, immediately after Zammad tries to read from the SSL socket.